Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Endpoint string `env:"ENDPOINT" envDefault:":6379" comment:"Endpoint = host:port,host:port addresses of ring shards."` Cluster bool `env:"CLUSTER" comment:"Cluster = enable cluster mode"` Database int `env:"DATABASE" required:"true" comment:"Database to be selected after connecting to the server."` Username string `` /* 231-byte string literal not displayed */ Password string `` /* 285-byte string literal not displayed */ HeartbeatFrequency time.Duration `` /* 155-byte string literal not displayed */ MaxRetries int `env:"MAX_RETRIES" comment:"Maximum number of retries before giving up. Default is 3 retries; -1 (not 0) disables retries."` MinRetryBackoff time.Duration `env:"MIN_RETRY_BACKOFF" comment:"Minimum backoff between each retry. Default is 8 milliseconds; -1 disables backoff."` MaxRetryBackoff time.Duration `env:"MAX_RETRY_BACKOFF" comment:"Maximum backoff between each retry. Default is 512 milliseconds; -1 disables backoff."` DialTimeout time.Duration `env:"DIAL_TIMEOUT" comment:"Dial timeout for establishing new connections. Default is 5 seconds."` ReadTimeout time.Duration `` /* 190-byte string literal not displayed */ WriteTimeout time.Duration `` /* 148-byte string literal not displayed */ PoolSize int `` /* 134-byte string literal not displayed */ MinIdleConns int `env:"MIN_IDLE_CONNS" comment:"Minimum number of idle connections which is useful when establishing new connection is slow."` PoolTimeout time.Duration `` /* 161-byte string literal not displayed */ // TODO: need to implement the ability to install tls // TLS Config to use. When set TLS will be negotiated. TLSConfig *tls.Config }
Click to show internal directories.
Click to hide internal directories.