Documentation ¶
Index ¶
- type ClusterConfig
- type Config
- type MgrConfig
- type Redis
- func (rds *Redis) Client() *redis.Client
- func (rds *Redis) Close() error
- func (rds *Redis) Eval(src string, keys []string, args ...interface{}) (interface{}, error)
- func (rds *Redis) EvalSha(tag string, keys []string, args ...interface{}) (interface{}, error)
- func (rds *Redis) LoadScript(tag string, src string) error
- type RedisCluster
- func (rds *RedisCluster) Client() *redis.ClusterClient
- func (rds *RedisCluster) Close() error
- func (rds *RedisCluster) Eval(src string, keys []string, args ...interface{}) (interface{}, error)
- func (rds *RedisCluster) EvalSha(tag string, keys []string, args ...interface{}) (interface{}, error)
- func (rds *RedisCluster) LoadScript(tag string, src string) error
- type RedisMgr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterConfig ¶
type ClusterConfig struct { Addrs []string `json:"Addrs"` Password string `json:"Password"` // Database int `json:"Database"` PoolSize int `json:"PoolSize"` DialTimeout int `json:"DialTimeout"` ReadTimeout int `json:"ReadTimeout"` WriteTimeout int `json:"WriteTimeout"` PoolTimeout int `json:"PoolTimeout"` IdleTimeout int `json:"IdleTimeout"` IdleCheckFrequency int `json:"IdleCheckFrequency"` KeepaliveInterval int `json:"KeepaliveInterval"` MaxRedirects int `json:"MaxRedirects"` ReadOnly bool `json:"ReadOnly"` RouteByLatency bool `json:"RouteByLatency"` // contains filtered or unexported fields }
type Config ¶
type Config struct { ID string `json:"ID"` Addr string `json:"Addr"` Password string `json:"Password"` Database int `json:"Database"` PoolSize int `json:"PoolSize"` DialTimeout int `json:"DialTimeout"` ReadTimeout int `json:"ReadTimeout"` WriteTimeout int `json:"WriteTimeout"` PoolTimeout int `json:"PoolTimeout"` IdleTimeout int `json:"IdleTimeout"` IdleCheckFrequency int `json:"IdleCheckFrequency"` KeepaliveInterval int `json:"KeepaliveInterval"` MaxRetries int `json:"MaxRetries"` // ReadOnly bool `json:"ReadOnly"` TLSConfig *tls.Config `json:"TLSConfig"` Network string `json:"Network"` // contains filtered or unexported fields }
type RedisCluster ¶
func NewCluster ¶
func NewCluster(conf ClusterConfig) *RedisCluster
func (*RedisCluster) Client ¶
func (rds *RedisCluster) Client() *redis.ClusterClient
func (*RedisCluster) Close ¶
func (rds *RedisCluster) Close() error
func (*RedisCluster) Eval ¶
func (rds *RedisCluster) Eval(src string, keys []string, args ...interface{}) (interface{}, error)
func (*RedisCluster) EvalSha ¶
func (rds *RedisCluster) EvalSha(tag string, keys []string, args ...interface{}) (interface{}, error)
func (*RedisCluster) LoadScript ¶
func (rds *RedisCluster) LoadScript(tag string, src string) error
应用层应在初始化阶段完成所有LoadScript操作, 初始化后不应再调用此方法
Click to show internal directories.
Click to hide internal directories.