Documentation ¶
Index ¶
- func Init(configs ...Config) (err error)
- type ClusterConf
- type Config
- type GoRedis
- func (s *GoRedis) BLPop(timeout time.Duration, key string) *redis.StringSliceCmd
- func (s *GoRedis) BitCount(key string, start, end int64) *redis.IntCmd
- func (s *GoRedis) BitOpAnd(destKey string, keys ...string) *redis.IntCmd
- func (s *GoRedis) BitOpNot(destKey, key string) *redis.IntCmd
- func (s *GoRedis) BitOpOr(destKey string, keys ...string) *redis.IntCmd
- func (s *GoRedis) BitOpXor(destKey string, keys ...string) *redis.IntCmd
- func (s *GoRedis) BitPos(key string, bit, start, end int64) *redis.IntCmd
- func (s *GoRedis) Del(keys ...string) *redis.IntCmd
- func (s *GoRedis) Eval(script string, keys []string, args ...interface{}) *redis.Cmd
- func (s *GoRedis) EvalSha(sha string, keys []string, args ...interface{}) *redis.Cmd
- func (s *GoRedis) Exists(key string) *redis.IntCmd
- func (s *GoRedis) Expire(key string, seconds int) *redis.BoolCmd
- func (s *GoRedis) ExpireAt(key string, time time.Time) *redis.BoolCmd
- func (s *GoRedis) GeoAdd(key string, geoLocation ...*redis.GeoLocation) *redis.IntCmd
- func (s *GoRedis) GeoDist(key, member1, member2, unit string) *redis.FloatCmd
- func (s *GoRedis) GeoHash(key string, members ...string) *redis.StringSliceCmd
- func (s *GoRedis) GeoPos(key string, members ...string) *redis.GeoPosCmd
- func (s *GoRedis) GeoRadius(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
- func (s *GoRedis) GeoRadiusByMember(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
- func (s *GoRedis) Get(key string) *redis.StringCmd
- func (s *GoRedis) GetBit(key string, offset int64) *redis.IntCmd
- func (s *GoRedis) HDel(key string, fields ...string) *redis.IntCmd
- func (s *GoRedis) HExists(key, field string) *redis.BoolCmd
- func (s *GoRedis) HGet(key, field string) *redis.StringCmd
- func (s *GoRedis) HGetAll(key string) *redis.MapStringStringCmd
- func (s *GoRedis) HIncrBy(key, field string, increment int64) *redis.IntCmd
- func (s *GoRedis) HKeys(key string) *redis.StringSliceCmd
- func (s *GoRedis) HLen(key string) *redis.IntCmd
- func (s *GoRedis) HMGet(key string, fields ...string) *redis.SliceCmd
- func (s *GoRedis) HMSet(key string, fieldsAndValues map[string]string) *redis.BoolCmd
- func (s *GoRedis) HScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (s *GoRedis) HSet(key, field, value string) *redis.IntCmd
- func (s *GoRedis) HSetNX(key, field, value string) *redis.BoolCmd
- func (s *GoRedis) HVals(key string) *redis.StringSliceCmd
- func (s *GoRedis) Incr(key string) *redis.IntCmd
- func (s *GoRedis) IncrBy(key string, increment int64) *redis.IntCmd
- func (s *GoRedis) Keys(pattern string) *redis.StringSliceCmd
- func (s *GoRedis) LLen(key string) *redis.IntCmd
- func (s *GoRedis) LPop(key string) *redis.StringCmd
- func (s *GoRedis) LPush(key string, values ...interface{}) *redis.IntCmd
- func (s *GoRedis) LRange(key string, start, stop int64) *redis.StringSliceCmd
- func (s *GoRedis) LRem(key string, count int64, value string) *redis.IntCmd
- func (s *GoRedis) MGet(keys ...string) *redis.SliceCmd
- func (s *GoRedis) PFAdd(key string, values ...interface{}) *redis.IntCmd
- func (s *GoRedis) PFCount(key string) *redis.IntCmd
- func (s *GoRedis) PFMerge(dest string, keys ...string) *redis.StatusCmd
- func (s *GoRedis) Persist(key string) *redis.BoolCmd
- func (s *GoRedis) Ping() *redis.StatusCmd
- func (s *GoRedis) Pipelined(fn func(redis.Pipeliner) error) ([]redis.Cmder, error)
- func (s *GoRedis) RPop(key string) *redis.StringCmd
- func (s *GoRedis) RPush(key string, values ...interface{}) *redis.IntCmd
- func (s *GoRedis) SAdd(key string, values ...interface{}) *redis.IntCmd
- func (s *GoRedis) SCard(key string) *redis.IntCmd
- func (s *GoRedis) SDiff(keys ...string) *redis.StringSliceCmd
- func (s *GoRedis) SDiffStore(destination string, keys ...string) *redis.IntCmd
- func (s *GoRedis) SInter(keys ...string) *redis.StringSliceCmd
- func (s *GoRedis) SInterStore(destination string, keys ...string) *redis.IntCmd
- func (s *GoRedis) SIsMember(key string, value interface{}) *redis.BoolCmd
- func (s *GoRedis) SMembers(key string) *redis.StringSliceCmd
- func (s *GoRedis) SPop(key string) *redis.StringCmd
- func (s *GoRedis) SRandMember(key string) *redis.StringCmd
- func (s *GoRedis) SRem(key string, values ...interface{}) *redis.IntCmd
- func (s *GoRedis) SScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (s *GoRedis) SUnion(keys ...string) *redis.StringSliceCmd
- func (s *GoRedis) SUnionStore(destination string, keys ...string) *redis.IntCmd
- func (s *GoRedis) Scan(cursor uint64, match string, count int64) *redis.ScanCmd
- func (s *GoRedis) ScriptLoad(script string) *redis.StringCmd
- func (s *GoRedis) Set(key, value string) *redis.StatusCmd
- func (s *GoRedis) SetBit(key string, offset int64, value int) *redis.IntCmd
- func (s *GoRedis) SetEx(key, value string, expiration time.Duration) *redis.StatusCmd
- func (s *GoRedis) String() string
- func (s *GoRedis) TTL(key string) *redis.DurationCmd
- func (s *GoRedis) WrapKey(key string) string
- func (s *GoRedis) WrapKeys(keys ...string) []string
- func (s *GoRedis) ZAdd(key string, value ...redis.Z) *redis.IntCmd
- func (s *GoRedis) ZCard(key string) *redis.IntCmd
- func (s *GoRedis) ZCount(key string, max, min string) *redis.IntCmd
- func (s *GoRedis) ZIncrBy(key string, increment float64, field string) *redis.FloatCmd
- func (s *GoRedis) ZRangeByScoreWithScores(key string, opt *redis.ZRangeBy) *redis.ZSliceCmd
- func (s *GoRedis) ZRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd
- func (s *GoRedis) ZRank(key, field string) *redis.IntCmd
- func (s *GoRedis) ZRemRangeByScore(key string, max, min string) *redis.IntCmd
- func (s *GoRedis) ZRevRangeByScoreWithScores(key string, opt *redis.ZRangeBy) *redis.ZSliceCmd
- func (s *GoRedis) ZRevRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd
- func (s *GoRedis) ZRevRank(key, field string) *redis.IntCmd
- func (s *GoRedis) ZScore(key, value string) *redis.FloatCmd
- func (s *GoRedis) ZUnionStore(dest string, store *redis.ZStore) *redis.IntCmd
- func (s *GoRedis) Zrange(key string, start, stop int64) *redis.StringSliceCmd
- func (s *GoRedis) Zrem(key string, values ...interface{}) *redis.IntCmd
- func (s *GoRedis) Zremrangebyrank(key string, start, stop int64) *redis.IntCmd
- func (s *GoRedis) Zrevrange(key string, start, stop int64) *redis.StringSliceCmd
- type RedisHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterConf ¶ added in v1.2.56
type ClusterConf []Config
func (ClusterConf) GetCacheConf ¶ added in v1.2.56
func (c ClusterConf) GetCacheConf() cache.CacheConf
兼容go-zore
type Config ¶
type Config struct { Name string `yaml:"Name" json:"name,optional"` Addr string `yaml:"Addr" json:"addr,optional"` Password string `yaml:"Password" json:"password,optional"` DB int `yaml:"DB" json:"db,optional"` Prefix string `yaml:"Prefix" json:"prefix,optional"` AutoPing bool `yaml:"AutoPing" json:"autoPing,optional"` TLS bool `yaml:"TLS" json:"tls,optional"` Type string `yaml:"Type" json:",default=node,options=node|cluster"` Weight int `yaml:"Weight" json:",default=100"` //for gozero }
type GoRedis ¶
func (*GoRedis) BLPop ¶ added in v1.2.56
Blpop uses passed in redis connection to execute blocking queries. Doesn't benefit from pooling redis connections of blocking queries
func (*GoRedis) BitOpAnd ¶ added in v1.2.56
BitOpAnd is redis bit operation (and) command implementation.
func (*GoRedis) BitOpNot ¶ added in v1.2.56
BitOpNot is redis bit operation (not) command implementation.
func (*GoRedis) BitOpOr ¶ added in v1.2.56
BitOpOr is redis bit operation (or) command implementation.
func (*GoRedis) BitOpXor ¶ added in v1.2.56
BitOpXor is redis bit operation (xor) command implementation.
func (*GoRedis) ExpireAt ¶ added in v1.2.56
Expireat is the implementation of redis expireat command.
func (*GoRedis) GeoRadius ¶ added in v1.2.56
func (s *GoRedis) GeoRadius(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
GeoRadius is the implementation of redis georadius command.
func (*GoRedis) GeoRadiusByMember ¶ added in v1.2.56
func (s *GoRedis) GeoRadiusByMember(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
GeoRadiusByMember is the implementation of redis georadiusbymember command.
func (*GoRedis) Ping ¶ added in v1.2.56
func (s *GoRedis) Ping() *redis.StatusCmd
Ping is the implementation of redis ping command.
func (*GoRedis) Pipelined ¶ added in v1.2.56
Pipelined lets fn to execute pipelined commands. fn key must call GetKey or GetKeys to add prefix.
func (*GoRedis) SDiffStore ¶ added in v1.2.56
Sdiffstore is the implementation of redis sdiffstore command.
func (*GoRedis) SInterStore ¶ added in v1.2.56
Sinterstore is the implementation of redis sinterstore command.
func (*GoRedis) SIsMember ¶ added in v1.2.56
Sismember is the implementation of redis sismember command.
func (*GoRedis) SMembers ¶ added in v1.2.56
Smembers is the implementation of redis smembers command.
func (*GoRedis) SRandMember ¶ added in v1.2.56
Srandmember is the implementation of redis srandmember command.
func (*GoRedis) SUnionStore ¶ added in v1.2.56
Sunionstore is the implementation of redis sunionstore command.
func (*GoRedis) ScriptLoad ¶ added in v1.2.56
ScriptLoad is the implementation of redis script load command.
func (*GoRedis) ZRangeByScoreWithScores ¶ added in v1.2.56
ZrangebyscoreWithScores is the implementation of redis zrangebyscore command with scores.
func (*GoRedis) ZRangeWithScores ¶ added in v1.2.56
ZrangeWithScores is the implementation of redis zrange command with scores.
func (*GoRedis) ZRemRangeByScore ¶ added in v1.2.56
Zremrangebyscore is the implementation of redis zremrangebyscore command.
func (*GoRedis) ZRevRangeByScoreWithScores ¶ added in v1.2.56
ZrevrangebyscoreWithScores is the implementation of redis zrevrangebyscore command with scores.
func (*GoRedis) ZRevRangeWithScores ¶ added in v1.2.56
ZRevRangeWithScores is the implementation of redis zrevrange command with scores.
func (*GoRedis) ZRevRank ¶ added in v1.2.56
Zrevrank is the implementation of redis zrevrank command.
func (*GoRedis) ZUnionStore ¶ added in v1.2.56
Zunionstore is the implementation of redis zunionstore command.
func (*GoRedis) Zremrangebyrank ¶ added in v1.2.56
Zremrangebyrank is the implementation of redis zremrangebyrank command.
type RedisHook ¶ added in v1.2.56
type RedisHook struct {
Prefix string `yaml:"Prefix" json:"prefix,optional"`
}
func (*RedisHook) ProcessHook ¶ added in v1.2.56
func (s *RedisHook) ProcessHook(next redis0.ProcessHook) redis0.ProcessHook
func (*RedisHook) ProcessPipelineHook ¶ added in v1.2.56
func (s *RedisHook) ProcessPipelineHook(next redis0.ProcessPipelineHook) redis0.ProcessPipelineHook