Documentation ¶
Index ¶
- func NewTracingHook() redis.Hook
- type Config
- func (x *Config) GetAddr() string
- func (x *Config) GetConnectionTimeout() int64
- func (x *Config) GetDB() int32
- func (x *Config) GetIdleTimeout() int32
- func (x *Config) GetMaxActive() int32
- func (x *Config) GetMaxIdle() int32
- func (x *Config) GetNetwork() string
- func (x *Config) GetPassword() string
- func (x *Config) GetReadTimeout() int64
- func (x *Config) GetTestOnBorrow() bool
- func (x *Config) GetWait() bool
- func (x *Config) GetWriteTimeout() int64
- type IRedis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTracingHook ¶
func NewTracingHook() redis.Hook
NewTracingHook creates a new go-redis hook instance and that will collect spans using the provided tracer.
Types ¶
type Config ¶
type Config struct { Network string `json:"network,omitempty"` Addr string `json:"addr,omitempty"` ConnectionTimeout int64 `json:"connection_timeout,omitempty"` ReadTimeout int64 `json:"read_timeout,omitempty"` WriteTimeout int64 `json:"write_timeout,omitempty"` Password string `json:"password,omitempty"` DB int32 `json:"DB,omitempty"` MaxIdle int32 `json:"max_idle,omitempty"` MaxActive int32 `json:"max_active,omitempty"` TestOnBorrow bool `json:"test_on_borrow,omitempty"` IdleTimeout int32 `json:"idle_timeout,omitempty"` Wait bool `json:"wait,omitempty"` }
Config Redis配置
func (*Config) GetConnectionTimeout ¶
func (*Config) GetIdleTimeout ¶
func (*Config) GetMaxActive ¶
func (*Config) GetMaxIdle ¶
func (*Config) GetNetwork ¶
func (*Config) GetPassword ¶
func (*Config) GetReadTimeout ¶
func (*Config) GetTestOnBorrow ¶
func (*Config) GetWriteTimeout ¶
Click to show internal directories.
Click to hide internal directories.