Documentation ¶
Index ¶
- Constants
- func Load(ctx context.Context, ld advconf.Loader, keys ...string) (client *redis.Client, err error)
- func LoadCluster(ctx context.Context, ld advconf.Loader, keys ...string) (client *redis.ClusterClient, err error)
- type TracingHook
- func (h *TracingHook) AfterProcess(ctx context.Context, cmd redis.Cmder) error
- func (h *TracingHook) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error
- func (h *TracingHook) BeforeProcess(ctx context.Context, cmd redis.Cmder) (context.Context, error)
- func (h *TracingHook) BeforeProcessPipeline(ctx context.Context, cmds []redis.Cmder) (context.Context, error)
- type UnifiedRedisOptions
Constants ¶
View Source
const (
KeyPrefix = "redis"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TracingHook ¶
type TracingHook struct {
Instance string
}
func (*TracingHook) AfterProcess ¶
func (h *TracingHook) AfterProcess(ctx context.Context, cmd redis.Cmder) error
func (*TracingHook) AfterProcessPipeline ¶
func (h *TracingHook) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error
func (*TracingHook) BeforeProcess ¶
func (*TracingHook) BeforeProcessPipeline ¶
type UnifiedRedisOptions ¶
type UnifiedRedisOptions struct { Network string `json:"network" default:"tcp"` Addresses []string `json:"addresses"` // cluster only MaxRedirects int `json:"max-redirects"` // cluster only ReadOnly bool `json:"read-only"` // cluster only RouteByLatency bool `json:"route-by-latency"` // cluster only RouteRandomly bool `json:"route-randomly"` // cluster only Address string `json:"address" default:"127.0.0.1:6379"` Database int `json:"database"` Username string `json:"username"` Password string `json:"password"` MaxRetries int `json:"max-retries"` MinRetryBackoff advconf.Duration `json:"min-retry-backoff"` MaxRetryBackoff advconf.Duration `json:"max-retry-backoff"` DialTimeout advconf.Duration `json:"dial-timeout"` ReadTimeout advconf.Duration `json:"read-timeout"` WriteTimeout advconf.Duration `json:"write-timeout"` PoolSize int `json:"pool-size"` MinIdleConns int `json:"min-idle-conns"` MaxConnAge advconf.Duration `json:"max-conn-age"` PoolTimeout advconf.Duration `json:"pool-timeout"` IdleTimeout advconf.Duration `json:"idle-timeout"` IdleCheckFrequency advconf.Duration `json:"idle-check-frequency"` }
func (UnifiedRedisOptions) UnwrapRedisClusterOptions ¶
func (opts UnifiedRedisOptions) UnwrapRedisClusterOptions() *redis.ClusterOptions
func (UnifiedRedisOptions) UnwrapRedisOptions ¶
func (opts UnifiedRedisOptions) UnwrapRedisOptions() *redis.Options
Click to show internal directories.
Click to hide internal directories.