Documentation ¶
Index ¶
- Constants
- type BaseConfig
- func (c *BaseConfig) AddConfigVar(key, value string)
- func (c *BaseConfig) GetAllKeysSorted() []string
- func (c *BaseConfig) GetAllVars() map[string]string
- func (c *BaseConfig) GetBoolParamValueOrDefault(key string, defaultValue bool) (val bool)
- func (c *BaseConfig) GetInt64ParamValueOrDefault(key string, defaultValue int64) (val int64)
- func (c *BaseConfig) GetIntParamValueOrDefault(key string, defaultValue int) (val int)
- func (c *BaseConfig) GetStringParamValueOrDefault(key string, defaultValue string) (val string)
- func (c *BaseConfig) HttpReadTimeoutMs() int
- func (c *BaseConfig) HttpWriteTimeoutMs() int
- func (c *BaseConfig) LogLevel() string
- func (c *BaseConfig) ScanEnvVariables()
- func (c *BaseConfig) TopicPartitions() int
- func (c *BaseConfig) WsKeepALiveInterval() int64
- func (c *BaseConfig) WsPongTimeoutSec() int
- func (c *BaseConfig) WsReadBufferSizeBytes() int
- func (c *BaseConfig) WsWriteBufferSizeBytes() int
- func (c *BaseConfig) WsWriteCompress() bool
- func (c *BaseConfig) WsWriteTimeoutSec() int
Constants ¶
const ( CfgLoglevel = "LOG_LEVEL" CfgHttpReadTimeoutMs = "HTTP_READ_TIMEOUT_MS" CfgHttpWriteTimeoutMs = "HTTP_WRITE_TIMEOUT_MS" CfgWsKeepAliveSec = "WS_KEEP_ALIVE_SEC" CfgWsReadBufferSizeBytes = "WS_READ_BUFFER_SIZE_BYTES" CfgWsWriteBufferSizeBytes = "WS_WRITE_BUFFER_SIZE_BYTES" CfgWsWriteCompress = "WS_WRITE_COMPRESS" CfgWsWriteTimeoutSec = "WS_WRITE_TIMEOUT" CfgWsPongTimeoutSec = "WS_PONG_TIMEOUT" CfgTopicPartitions = "TOPIC_PARTITIONS" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseConfig ¶
type BaseConfig struct {
// contains filtered or unexported fields
}
func (*BaseConfig) AddConfigVar ¶ added in v1.1.2
func (c *BaseConfig) AddConfigVar(key, value string)
AddConfigVar adds or updates configuration variable
func (*BaseConfig) GetAllKeysSorted ¶
func (c *BaseConfig) GetAllKeysSorted() []string
GetAllKeysSorted gets a list of all the configuration keys
func (*BaseConfig) GetAllVars ¶
func (c *BaseConfig) GetAllVars() map[string]string
GetAllVars gets a map of all the configuration variables and values
func (*BaseConfig) GetBoolParamValueOrDefault ¶
func (c *BaseConfig) GetBoolParamValueOrDefault(key string, defaultValue bool) (val bool)
GetBoolParamValueOrDefault gets environment variable as bool
func (*BaseConfig) GetInt64ParamValueOrDefault ¶
func (c *BaseConfig) GetInt64ParamValueOrDefault(key string, defaultValue int64) (val int64)
GetInt64ParamValueOrDefault gets environment variable as int64
func (*BaseConfig) GetIntParamValueOrDefault ¶
func (c *BaseConfig) GetIntParamValueOrDefault(key string, defaultValue int) (val int)
GetIntParamValueOrDefault gets environment variable as int
func (*BaseConfig) GetStringParamValueOrDefault ¶
func (c *BaseConfig) GetStringParamValueOrDefault(key string, defaultValue string) (val string)
GetStringParamValueOrDefault gets environment variable as string
func (*BaseConfig) HttpReadTimeoutMs ¶
func (c *BaseConfig) HttpReadTimeoutMs() int
HttpReadTimeoutMs gets HTTP read time out in milliseconds
func (*BaseConfig) HttpWriteTimeoutMs ¶
func (c *BaseConfig) HttpWriteTimeoutMs() int
HttpWriteTimeoutMs gets HTTP write time out in milliseconds
func (*BaseConfig) ScanEnvVariables ¶
func (c *BaseConfig) ScanEnvVariables()
ScanEnvVariables scans all environment variables and map their values to existing configuration keys
func (*BaseConfig) TopicPartitions ¶ added in v1.2.16
func (c *BaseConfig) TopicPartitions() int
TopicPartitions gets default number of partitions per topic
func (*BaseConfig) WsKeepALiveInterval ¶
func (c *BaseConfig) WsKeepALiveInterval() int64
WsKeepALiveInterval gets web socket keep alive interval (in seconds)
func (*BaseConfig) WsPongTimeoutSec ¶
func (c *BaseConfig) WsPongTimeoutSec() int
WsPongTimeoutSec gets web socket PONG time out in seconds
func (*BaseConfig) WsReadBufferSizeBytes ¶
func (c *BaseConfig) WsReadBufferSizeBytes() int
WsReadBufferSizeBytes gets web socket read buffer size
func (*BaseConfig) WsWriteBufferSizeBytes ¶
func (c *BaseConfig) WsWriteBufferSizeBytes() int
WsWriteBufferSizeBytes gets web socket write buffer size
func (*BaseConfig) WsWriteCompress ¶
func (c *BaseConfig) WsWriteCompress() bool
WsWriteCompress gets web socket compression on write flag
func (*BaseConfig) WsWriteTimeoutSec ¶
func (c *BaseConfig) WsWriteTimeoutSec() int
WsWriteTimeoutSec gets web socket write time out in seconds