Documentation ¶
Index ¶
- type Config
- type Option
- func WithAuthCredentials(fn func(rueidis.AuthCredentialsContext) (rueidis.AuthCredentials, error)) Option
- func WithDialFn(fn func(string, *net.Dialer, *tls.Config) (conn net.Conn, err error)) Option
- func WithDialer(dialer *net.Dialer) Option
- func WithNewCacheStoreFn(fn rueidis.NewCacheStoreFn) Option
- func WithSendToReplicas(fn func(cmd rueidis.Completed) bool) Option
- func WithSentinelDialer(dialer *net.Dialer) Option
- type Options
- type SSLConfig
- type SentinelConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { InitAddress []string `json:"initAddress" yaml:"initAddress"` Addr []string `json:"addr" yaml:"addr"` Username string `json:"username" yaml:"username"` Password string `json:"password" yaml:"password"` ClientName string `json:"clientName" yaml:"clientName"` ClientSetInfo []string `json:"clientSetInfo" yaml:"clientSetInfo"` ClientTrackingOptions []string `json:"clientTrackingOptions" yaml:"clientTrackingOptions"` DB int `json:"db" yaml:"db"` CacheSizeEachConn int `json:"cacheSizeEachConn" yaml:"cacheSizeEachConn"` RingScaleEachConn int `json:"ringScaleEachConn" yaml:"ringScaleEachConn"` ReadBufferEachConn int `json:"readBufferEachConn" yaml:"readBufferEachConn"` WriteBufferEachConn int `json:"writeBufferEachConn" yaml:"writeBufferEachConn"` BlockingPoolSize int `json:"blockingPoolSize" yaml:"blockingPoolSize"` PipelineMultiplex int `json:"pipelineMultiplex" yaml:"pipelineMultiplex"` ConnWriteTimeout time.Duration `json:"connWriteTimeout" yaml:"connWriteTimeout"` MaxFlushDelay time.Duration `json:"maxFlushDelay" yaml:"maxFlushDelay"` ShuffleInit bool `json:"shuffleInit" yaml:"shuffleInit"` ClientNoTouch bool `json:"clientNoTouch" yaml:"clientNoTouch"` DisableRetry bool `json:"disableRetry" yaml:"disableRetry"` DisableCache bool `json:"disableCache" yaml:"disableCache"` AlwaysPipelining bool `json:"alwaysPipelining" yaml:"alwaysPipelining"` AlwaysRESP2 bool `json:"alwaysRESP2" yaml:"alwaysRESP2"` ForceSingleClient bool `json:"forceSingleClient" yaml:"forceSingleClient"` ReplicaOnly bool `json:"replicaOnly" yaml:"replicaOnly"` ClientNoEvict bool `json:"clientNoEvict" yaml:"clientNoEvict"` Sentinel SentinelConfig `json:"sentinel" yaml:"sentinel"` SSL SSLConfig `json:"ssl" yaml:"ssl"` }
type Option ¶
type Option func(options *Options)
func WithAuthCredentials ¶
func WithAuthCredentials(fn func(rueidis.AuthCredentialsContext) (rueidis.AuthCredentials, error)) Option
func WithDialFn ¶
func WithDialer ¶
func WithNewCacheStoreFn ¶
func WithNewCacheStoreFn(fn rueidis.NewCacheStoreFn) Option
func WithSentinelDialer ¶
type Options ¶
type Options struct { AuthCredentialsFn func(rueidis.AuthCredentialsContext) (rueidis.AuthCredentials, error) Dialer *net.Dialer DialFn func(string, *net.Dialer, *tls.Config) (conn net.Conn, err error) SentinelDialer *net.Dialer SendToReplicas func(cmd rueidis.Completed) bool NewCacheStoreFn rueidis.NewCacheStoreFn }
type SentinelConfig ¶
type SentinelConfig struct { Enable bool `json:"enable" yaml:"enable"` MasterSet string `json:"masterSet" yaml:"masterSet"` Username string `json:"username" yaml:"username"` Password string `json:"password" yaml:"password"` ClientName string `json:"clientName" yaml:"clientName"` SSL SSLConfig `json:"ssl" yaml:"ssl"` }
Click to show internal directories.
Click to hide internal directories.