Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { RateLimit RateLimit `mapstructure:",squash"` TLS TLS `mapstructure:",squash"` Tracing Tracing `mapstructure:",squash"` Metrics Metrics `mapstructure:",squash"` Logger Logger `mapstructure:",squash"` Docs Docs `mapstructure:",squash"` // HTTP and GRPC server timeout [default = 30s] Timeout *time.Duration `mapstructure:"TIMEOUT"` Network string `mapstructure:"NETWORK"` Addr string `mapstructure:"ADDR"` Debug bool `mapstructure:"DEBUG"` Name string `mapstructure:"-"` Version string `mapstructure:"-"` }
func LoadConfig ¶
type RateLimit ¶
type RateLimit struct { Disabled bool `mapstructure:"RATE_LIMIT_DISABLED"` // Window - defines time duration per window [default = 10s] Window *time.Duration `mapstructure:"RATE_LIMIT_WINDOW"` // Bucket - defines bucket number for each window [default = 100] Bucket *int32 `mapstructure:"RATE_LIMIT_BUCKET"` // CPUThreshold [default = 800] CPUThreshold *int64 `mapstructure:"RATE_LIMIT_CPU_THRESHOLD"` }
Click to show internal directories.
Click to hide internal directories.