mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
- Replace occurrences of `// nolint:lll` with `// nolint:ll` across files for consistency. - Reformat multiline strings, comments, and function parameters to improve clarity and adhere to style guidelines. - Add `// nolint:ll` comments where necessary to prevent linter warnings.
24 lines
747 B
Go
24 lines
747 B
Go
package rpcmiddleware
|
|
|
|
import "time"
|
|
|
|
const (
|
|
// DefaultInterceptTimeout is the default maximum time we're allowed to
|
|
// take to respond to an RPC middleware interception request.
|
|
DefaultInterceptTimeout = time.Second * 2
|
|
)
|
|
|
|
// Config is the configuration struct for the RPC middleware.
|
|
//
|
|
//nolint:ll
|
|
type Config struct {
|
|
Disabled bool `long:"disabled" description:"Disable the RPC middleware"`
|
|
InterceptTimeout time.Duration `long:"intercept-timeout" description:"The maximum time the RPC middleware is allowed to take for intercepting each RPC request"`
|
|
}
|
|
|
|
// DefaultConfig returns the default RPC middleware configuration.
|
|
func DefaultConfig() *Config {
|
|
return &Config{
|
|
InterceptTimeout: DefaultInterceptTimeout,
|
|
}
|
|
}
|