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) PubSubMaxOutstandingBytes() int
- func (c *BaseConfig) PubSubMaxOutstandingMessages() int
- func (c *BaseConfig) PubSubNumOfGoroutines() int
- 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" // CfgPubSubNumOfGoroutines NumGoroutines specifies the number of goroutines that will be used // to pull messages from the subscription in parallel. Each goroutine // opens a separate StreamingPull stream. A higher number of goroutines // might increase throughput but also increases the system's load. // Defaults to DefaultReceiveSettings.NumGoroutines when set to 0. CfgPubSubNumOfGoroutines = "PUBSUB_NUM_OF_GOROUTINES" // CfgPubSubMaxOutstandingMessages defines the maximum number of unprocessed // messages (messages that have been received but not yet acknowledged // or expired). Setting this to a lower number can prevent the consumer // from being overwhelmed by a large volume of incoming messages. // If set to 0, the default is DefaultReceiveSettings.MaxOutstandingMessages. // A negative value indicates no limit. CfgPubSubMaxOutstandingMessages = "PUBSUB_MAX_OUTSTANDING_MESSAGES" // CfgPubSubMaxOutstandingBytes is the maximum total size of unprocessed messages. // This setting helps to control memory usage by limiting the total size // of messages that can be held in memory at a time. If set to 0, the // default is DefaultReceiveSettings.MaxOutstandingBytes. A negative // value indicates no limit on the byte size of unprocessed messages. CfgPubSubMaxOutstandingBytes = "PUSUB_MAX_OUTSTANDING_BYTES" )
const ( DefaultPubSubNumOfGoroutines = 0 DefaultPubSubMaxOutstandingMessages DefaultPubSubMaxOutstandingBytes = 0 )
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) PubSubMaxOutstandingBytes ¶ added in v1.2.81
func (c *BaseConfig) PubSubMaxOutstandingBytes() int
func (*BaseConfig) PubSubMaxOutstandingMessages ¶ added in v1.2.81
func (c *BaseConfig) PubSubMaxOutstandingMessages() int
func (*BaseConfig) PubSubNumOfGoroutines ¶ added in v1.2.81
func (c *BaseConfig) PubSubNumOfGoroutines() int
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