Documentation
¶
Index ¶
- func DelClient(names ...string)
- func Init(configs ...Config) (err error)
- type ClusterConf
- type Config
- type GoRedisC
- func (s *GoRedisC) BLPop(timeout time.Duration, key string) *redis.StringSliceCmd
- func (s *GoRedisC) BitCount(key string, start, end int64) *redis.IntCmd
- func (s *GoRedisC) BitOpAnd(destKey string, keys ...string) *redis.IntCmd
- func (s *GoRedisC) BitOpNot(destKey, key string) *redis.IntCmd
- func (s *GoRedisC) BitOpOr(destKey string, keys ...string) *redis.IntCmd
- func (s *GoRedisC) BitOpXor(destKey string, keys ...string) *redis.IntCmd
- func (s *GoRedisC) BitPos(key string, bit, start, end int64) *redis.IntCmd
- func (s *GoRedisC) Close() error
- func (s *GoRedisC) Del(keys ...string) *redis.IntCmd
- func (s *GoRedisC) Eval(script string, keys []string, args ...interface{}) *redis.Cmd
- func (s *GoRedisC) EvalSha(sha string, keys []string, args ...interface{}) *redis.Cmd
- func (s *GoRedisC) Exists(key string) *redis.IntCmd
- func (s *GoRedisC) Expire(key string, seconds int) *redis.BoolCmd
- func (s *GoRedisC) ExpireAt(key string, time time.Time) *redis.BoolCmd
- func (s *GoRedisC) GeoAdd(key string, geoLocation ...*redis.GeoLocation) *redis.IntCmd
- func (s *GoRedisC) GeoDist(key, member1, member2, unit string) *redis.FloatCmd
- func (s *GoRedisC) GeoHash(key string, members ...string) *redis.StringSliceCmd
- func (s *GoRedisC) GeoPos(key string, members ...string) *redis.GeoPosCmd
- func (s *GoRedisC) GeoRadius(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
- func (s *GoRedisC) GeoRadiusByMember(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
- func (s *GoRedisC) Get(key string) *redis.StringCmd
- func (s *GoRedisC) GetBit(key string, offset int64) *redis.IntCmd
- func (s *GoRedisC) HDel(key string, fields ...string) *redis.IntCmd
- func (s *GoRedisC) HExists(key, field string) *redis.BoolCmd
- func (s *GoRedisC) HGet(key, field string) *redis.StringCmd
- func (s *GoRedisC) HGetAll(key string) *redis.MapStringStringCmd
- func (s *GoRedisC) HIncrBy(key, field string, increment int64) *redis.IntCmd
- func (s *GoRedisC) HKeys(key string) *redis.StringSliceCmd
- func (s *GoRedisC) HLen(key string) *redis.IntCmd
- func (s *GoRedisC) HMGet(key string, fields ...string) *redis.SliceCmd
- func (s *GoRedisC) HMSet(key string, fieldsAndValues map[string]string) *redis.BoolCmd
- func (s *GoRedisC) HScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (s *GoRedisC) HSet(key, field, value string) *redis.IntCmd
- func (s *GoRedisC) HSetNX(key, field, value string) *redis.BoolCmd
- func (s *GoRedisC) HVals(key string) *redis.StringSliceCmd
- func (s *GoRedisC) Incr(key string) *redis.IntCmd
- func (s *GoRedisC) IncrBy(key string, increment int64) *redis.IntCmd
- func (s *GoRedisC) Keys(pattern string) *redis.StringSliceCmd
- func (s *GoRedisC) LLen(key string) *redis.IntCmd
- func (s *GoRedisC) LPop(key string) *redis.StringCmd
- func (s *GoRedisC) LPush(key string, values ...interface{}) *redis.IntCmd
- func (s *GoRedisC) LRange(key string, start, stop int64) *redis.StringSliceCmd
- func (s *GoRedisC) LRem(key string, count int64, value string) *redis.IntCmd
- func (s *GoRedisC) MGet(keys ...string) *redis.SliceCmd
- func (s *GoRedisC) PFAdd(key string, values ...interface{}) *redis.IntCmd
- func (s *GoRedisC) PFCount(key string) *redis.IntCmd
- func (s *GoRedisC) PFMerge(dest string, keys ...string) *redis.StatusCmd
- func (s *GoRedisC) Persist(key string) *redis.BoolCmd
- func (s *GoRedisC) Ping() *redis.StatusCmd
- func (s *GoRedisC) Pipelined(fn func(redis.Pipeliner) error) ([]redis.Cmder, error)
- func (s *GoRedisC) RPop(key string) *redis.StringCmd
- func (s *GoRedisC) RPush(key string, values ...interface{}) *redis.IntCmd
- func (s *GoRedisC) SAdd(key string, values ...interface{}) *redis.IntCmd
- func (s *GoRedisC) SCard(key string) *redis.IntCmd
- func (s *GoRedisC) SDiff(keys ...string) *redis.StringSliceCmd
- func (s *GoRedisC) SDiffStore(destination string, keys ...string) *redis.IntCmd
- func (s *GoRedisC) SInter(keys ...string) *redis.StringSliceCmd
- func (s *GoRedisC) SInterStore(destination string, keys ...string) *redis.IntCmd
- func (s *GoRedisC) SIsMember(key string, value interface{}) *redis.BoolCmd
- func (s *GoRedisC) SMembers(key string) *redis.StringSliceCmd
- func (s *GoRedisC) SPop(key string) *redis.StringCmd
- func (s *GoRedisC) SRandMember(key string) *redis.StringCmd
- func (s *GoRedisC) SRem(key string, values ...interface{}) *redis.IntCmd
- func (s *GoRedisC) SScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (s *GoRedisC) SUnion(keys ...string) *redis.StringSliceCmd
- func (s *GoRedisC) SUnionStore(destination string, keys ...string) *redis.IntCmd
- func (s *GoRedisC) Scan(cursor uint64, match string, count int64) *redis.ScanCmd
- func (s *GoRedisC) ScriptLoad(script string) *redis.StringCmd
- func (s *GoRedisC) Set(key, value string) *redis.StatusCmd
- func (s *GoRedisC) Set1(key, value string, expiration time.Duration) *redis.StatusCmd
- func (s *GoRedisC) SetBit(key string, offset int64, value int) *redis.IntCmd
- func (s *GoRedisC) SetEx(key, value string, expiration time.Duration) *redis.StatusCmd
- func (s *GoRedisC) SetNX(key, value string, expiration time.Duration) *redis.BoolCmd
- func (s *GoRedisC) TTL(key string) *redis.DurationCmd
- func (s *GoRedisC) WrapKey(key string) string
- func (s *GoRedisC) WrapKeys(keys ...string) []string
- func (s *GoRedisC) ZAdd(key string, value ...redis.Z) *redis.IntCmd
- func (s *GoRedisC) ZCard(key string) *redis.IntCmd
- func (s *GoRedisC) ZCount(key string, max, min string) *redis.IntCmd
- func (s *GoRedisC) ZIncrBy(key string, increment float64, field string) *redis.FloatCmd
- func (s *GoRedisC) ZRangeByScoreWithScores(key string, opt *redis.ZRangeBy) *redis.ZSliceCmd
- func (s *GoRedisC) ZRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd
- func (s *GoRedisC) ZRank(key, field string) *redis.IntCmd
- func (s *GoRedisC) ZRemRangeByScore(key string, max, min string) *redis.IntCmd
- func (s *GoRedisC) ZRevRangeByScoreWithScores(key string, opt *redis.ZRangeBy) *redis.ZSliceCmd
- func (s *GoRedisC) ZRevRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd
- func (s *GoRedisC) ZRevRank(key, field string) *redis.IntCmd
- func (s *GoRedisC) ZScore(key, value string) *redis.FloatCmd
- func (s *GoRedisC) ZUnionStore(dest string, store *redis.ZStore) *redis.IntCmd
- func (s *GoRedisC) Zrange(key string, start, stop int64) *redis.StringSliceCmd
- func (s *GoRedisC) Zrem(key string, values ...interface{}) *redis.IntCmd
- func (s *GoRedisC) Zremrangebyrank(key string, start, stop int64) *redis.IntCmd
- func (s *GoRedisC) Zrevrange(key string, start, stop int64) *redis.StringSliceCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterConf ¶
type ClusterConf Config
func (ClusterConf) GetConfig ¶ added in v1.2.215
func (c ClusterConf) GetConfig() Config
type Config ¶
type Config struct { Name string `yaml:"Name" json:"name,optional"` //NamePrefix string `yaml:"NamePrefix" json:"namePrefix,optional"` Addrs []string `yaml:"Addrs" json:"addrs,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"` DialTimeout int `yaml:"DialTimeout" json:"dialTimeout,optional"` ReadTimeout int `yaml:"ReadTimeout" json:"readTimeout,optional"` WriteTimeout int `yaml:"WriteTimeout" json:"writeTimeout,optional"` MaxRedirects int `yaml:"MaxRedirects" json:"maxRedirects,optional"` PoolSize int `yaml:"PoolSize" json:"poolSize,optional"` Type string `yaml:"Type" json:",default=node,options=node|cluster"` PingTimeout int64 `yaml:"PingTimeout" json:"pingTimeout,optional"` Weight int `yaml:"Weight" json:",default=100"` //for gozero TODO: 这里需要有多个节点的配置 }
type GoRedisC ¶
func (*GoRedisC) BLPop ¶
Blpop uses passed in redis connection to execute blocking queries. Doesn't benefit from pooling redis connections of blocking queries
func (*GoRedisC) GeoRadius ¶
func (s *GoRedisC) GeoRadius(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
GeoRadius is the implementation of redis georadius command.
func (*GoRedisC) GeoRadiusByMember ¶
func (s *GoRedisC) GeoRadiusByMember(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
GeoRadiusByMember is the implementation of redis georadiusbymember command.
func (*GoRedisC) Ping ¶
func (s *GoRedisC) Ping() *redis.StatusCmd
Ping is the implementation of redis ping command.
func (*GoRedisC) Pipelined ¶
Pipelined lets fn to execute pipelined commands. fn key must call GetKey or GetKeys to add prefix.
func (*GoRedisC) SDiffStore ¶
Sdiffstore is the implementation of redis sdiffstore command.
func (*GoRedisC) SInterStore ¶
Sinterstore is the implementation of redis sinterstore command.
func (*GoRedisC) SRandMember ¶
Srandmember is the implementation of redis srandmember command.
func (*GoRedisC) SUnionStore ¶
Sunionstore is the implementation of redis sunionstore command.
func (*GoRedisC) ScriptLoad ¶
ScriptLoad is the implementation of redis script load command.
func (*GoRedisC) ZRangeByScoreWithScores ¶
ZrangebyscoreWithScores is the implementation of redis zrangebyscore command with scores.
func (*GoRedisC) ZRangeWithScores ¶
ZrangeWithScores is the implementation of redis zrange command with scores.
func (*GoRedisC) ZRemRangeByScore ¶
Zremrangebyscore is the implementation of redis zremrangebyscore command.
func (*GoRedisC) ZRevRangeByScoreWithScores ¶
ZrevrangebyscoreWithScores is the implementation of redis zrevrangebyscore command with scores.
func (*GoRedisC) ZRevRangeWithScores ¶
ZRevRangeWithScores is the implementation of redis zrevrange command with scores.
func (*GoRedisC) ZUnionStore ¶
Zunionstore is the implementation of redis zunionstore command.
func (*GoRedisC) Zremrangebyrank ¶
Zremrangebyrank is the implementation of redis zremrangebyrank command.