Documentation ¶
Index ¶
- type Agent
- func (agent *Agent) CheckKeyExist(key string) (exist int64, err error)
- func (agent *Agent) Del(key string) (err error)
- func (agent *Agent) Get(key string) (value []byte, err error)
- func (agent *Agent) GetKeyList(key string) (keys []string, err error)
- func (agent *Agent) InitPool() *redis.Client
- func (agent *Agent) MGet(key ...string) (values []interface{}, err error)
- func (agent *Agent) Publish(channel string, message string) (err error)
- func (agent *Agent) Set(key string, value []byte, expire int) (err error)
- func (agent *Agent) Subscribe(channel string) *redis.PubSub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct { Pool *redis.Client RedisHost string `conf:"env"` RedisPort int `conf:"env"` RedisPassword string `conf:"env"` RedisDb int `conf:"env"` RedisExpireTime int `conf:"env"` PoolSize int `conf:"env"` KeyCount int `conf:"env"` // 单次获取的最大key数量 PipelineWaitTime int `conf:"env"` // pipeline 等待时间 单位秒 }
func (*Agent) CheckKeyExist ¶
1 exist 0 not exist
Click to show internal directories.
Click to hide internal directories.