Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTlsFunc = func(cnf *config.RedisConfig) (*tls.Config, error) { if strings.EqualFold(cnf.Tls.Key, "false") { return nil, result.RErrNotSupport } if strings.EqualFold(cnf.Tls.Key, "true") { return &tls.Config{}, nil } if strings.EqualFold(cnf.Tls.Key, "skip-verify") || strings.EqualFold(cnf.Tls.Key, "preferred") { return &tls.Config{InsecureSkipVerify: true}, nil } cert, rootCertPool, err := commontls.GetCertificate(&cnf.Tls) if err != nil { return nil, err } return &tls.Config{ RootCAs: rootCertPool, Certificates: []tls.Certificate{cert}, }, nil }
Functions ¶
func UseTls ¶ added in v1.9.15
func UseTls(cnf *config.RedisConfig, opts ...commonoption.Option) (*tls.Config, error)
func WithTlsOption ¶ added in v1.9.15
func WithTlsOption(f func(cnf *config.RedisConfig) (*tls.Config, error)) commonoption.Option
Types ¶
type Adapter ¶ added in v1.1.23
type Adapter struct {
// contains filtered or unexported fields
}
func NewAdapter ¶ added in v1.1.23
func NewAdapter(name string, cfg *config.RedisConfig, sentinelCfg *config.RedisConfig, clusterCfg *config.RedisConfig, opts ...commonoption.Option) (*Adapter, error)
type Client ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func (*Connector) GetSelector ¶ added in v1.22.10
type Logger ¶ added in v1.1.23
type Logger struct {
config.RedisLogger
}
Click to show internal directories.
Click to hide internal directories.