Documentation
¶
Index ¶
- Variables
- type ApolloConfig
- func (m *ApolloConfig) GetConfig(ctx context.Context, namespace string) (*Config, error)
- func (m *ApolloConfig) Init(ctx context.Context) error
- func (m *ApolloConfig) ParseKey(ctx context.Context, key string) (*KeyParts, error)
- func (m *ApolloConfig) Watch(ctx context.Context) <-chan *center.ChangeEvent
- type Client
- func (m *Client) Close(ctx context.Context) error
- func (m *Client) Decr(ctx context.Context, key string) *redis.IntCmd
- func (m *Client) DecrBy(ctx context.Context, key string, value int64) *redis.IntCmd
- func (m *Client) Del(ctx context.Context, keys ...string) *redis.IntCmd
- func (m *Client) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *redis.Cmd
- func (m *Client) EvalSha(ctx context.Context, scriptHash string, keys []string, args ...interface{}) *redis.Cmd
- func (m *Client) Exists(ctx context.Context, key string) *redis.IntCmd
- func (m *Client) Expire(ctx context.Context, key string, expiration time.Duration) *redis.BoolCmd
- func (m *Client) Get(ctx context.Context, key string) *redis.StringCmd
- func (m *Client) GetBit(ctx context.Context, key string, offset int64) *redis.IntCmd
- func (m *Client) HDel(ctx context.Context, key string, fields ...string) *redis.IntCmd
- func (m *Client) HExists(ctx context.Context, key string, field string) *redis.BoolCmd
- func (m *Client) HGet(ctx context.Context, key string, field string) *redis.StringCmd
- func (m *Client) HGetAll(ctx context.Context, key string) *redis.StringStringMapCmd
- func (m *Client) HIncrBy(ctx context.Context, key string, field string, incr int64) *redis.IntCmd
- func (m *Client) HIncrByFloat(ctx context.Context, key string, field string, incr float64) *redis.FloatCmd
- func (m *Client) HKeys(ctx context.Context, key string) *redis.StringSliceCmd
- func (m *Client) HLen(ctx context.Context, key string) *redis.IntCmd
- func (m *Client) HMGet(ctx context.Context, key string, fields ...string) *redis.SliceCmd
- func (m *Client) HMSet(ctx context.Context, key string, fields map[string]interface{}) *redis.StatusCmd
- func (m *Client) HSet(ctx context.Context, key string, field string, value interface{}) *redis.BoolCmd
- func (m *Client) HSetNX(ctx context.Context, key string, field string, val interface{}) *redis.BoolCmd
- func (m *Client) HVals(ctx context.Context, key string) *redis.StringSliceCmd
- func (m *Client) Incr(ctx context.Context, key string) *redis.IntCmd
- func (m *Client) IncrBy(ctx context.Context, key string, value int64) *redis.IntCmd
- func (m *Client) LIndex(ctx context.Context, key string, index int64) *redis.StringCmd
- func (m *Client) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *redis.IntCmd
- func (m *Client) LLen(ctx context.Context, key string) *redis.IntCmd
- func (m *Client) LPop(ctx context.Context, key string) *redis.StringCmd
- func (m *Client) LPush(ctx context.Context, key string, values ...interface{}) *redis.IntCmd
- func (m *Client) LPushX(ctx context.Context, key string, value interface{}) *redis.IntCmd
- func (m *Client) LRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd
- func (m *Client) LRem(ctx context.Context, key string, count int64, value interface{}) *redis.IntCmd
- func (m *Client) LSet(ctx context.Context, key string, index int64, value interface{}) *redis.StatusCmd
- func (m *Client) LTrim(ctx context.Context, key string, start, stop int64) *redis.StatusCmd
- func (m *Client) MGet(ctx context.Context, keys ...string) *redis.SliceCmd
- func (m *Client) MSet(ctx context.Context, pairs ...interface{}) *redis.StatusCmd
- func (m *Client) Pipeline() *Pipeline
- func (m *Client) RPop(ctx context.Context, key string) *redis.StringCmd
- func (m *Client) RPush(ctx context.Context, key string, values ...interface{}) *redis.IntCmd
- func (m *Client) RPushX(ctx context.Context, key string, value interface{}) *redis.IntCmd
- func (m *Client) SAdd(ctx context.Context, key string, members ...interface{}) *redis.IntCmd
- func (m *Client) SCard(ctx context.Context, key string) *redis.IntCmd
- func (m *Client) SIsMember(ctx context.Context, key string, member interface{}) *redis.BoolCmd
- func (m *Client) SPop(ctx context.Context, key string) *redis.StringCmd
- func (m *Client) SPopN(ctx context.Context, key string, count int64) *redis.StringSliceCmd
- func (m *Client) SRem(ctx context.Context, key string, members ...interface{}) *redis.IntCmd
- func (m *Client) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (m *Client) ScriptExists(ctx context.Context, scriptHash string) *redis.BoolSliceCmd
- func (m *Client) ScriptLoad(ctx context.Context, script string) *redis.StringCmd
- func (m *Client) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd
- func (m *Client) SetBit(ctx context.Context, key string, offset int64, value int) *redis.IntCmd
- func (m *Client) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.BoolCmd
- func (m *Client) TTL(ctx context.Context, key string) *redis.DurationCmd
- func (m *Client) ZAdd(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd
- func (m *Client) ZAddCh(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd
- func (m *Client) ZAddNX(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd
- func (m *Client) ZAddNXCh(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd
- func (m *Client) ZAddXX(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd
- func (m *Client) ZAddXXCh(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd
- func (m *Client) ZCard(ctx context.Context, key string) *redis.IntCmd
- func (m *Client) ZCount(ctx context.Context, key, min, max string) *redis.IntCmd
- func (m *Client) ZIncr(ctx context.Context, key string, member redis.Z) *redis.FloatCmd
- func (m *Client) ZIncrBy(ctx context.Context, key string, increment float64, member string) *redis.FloatCmd
- func (m *Client) ZIncrNX(ctx context.Context, key string, member redis.Z) *redis.FloatCmd
- func (m *Client) ZIncrXX(ctx context.Context, key string, member redis.Z) *redis.FloatCmd
- func (m *Client) ZRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd
- func (m *Client) ZRangeByLex(ctx context.Context, key string, by redis.ZRangeBy) *redis.StringSliceCmd
- func (m *Client) ZRangeByScore(ctx context.Context, key string, by redis.ZRangeBy) *redis.StringSliceCmd
- func (m *Client) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *redis.ZSliceCmd
- func (m *Client) ZRank(ctx context.Context, key string, member string) *redis.IntCmd
- func (m *Client) ZRem(ctx context.Context, key string, members []interface{}) *redis.IntCmd
- func (m *Client) ZRemRangeByRank(ctx context.Context, key string, start int64, stop int64) *redis.IntCmd
- func (m *Client) ZRemRangeByScore(ctx context.Context, key, min, max string) *redis.IntCmd
- func (m *Client) ZRevRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd
- func (m *Client) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *redis.ZSliceCmd
- func (m *Client) ZRevRank(ctx context.Context, key string, member string) *redis.IntCmd
- func (m *Client) ZScore(ctx context.Context, key string, member string) *redis.FloatCmd
- type Config
- type Configer
- type EtcdConfig
- type InstanceConf
- type InstanceManager
- type KeyParts
- type Option
- type Pipeline
- func (m *Pipeline) Close() error
- func (m *Pipeline) Decr(ctx context.Context, key string) *redis.IntCmd
- func (m *Pipeline) DecrBy(ctx context.Context, key string, value int64) *redis.IntCmd
- func (m *Pipeline) Del(ctx context.Context, keys ...string) *redis.IntCmd
- func (m *Pipeline) Discard(ctx context.Context) error
- func (m *Pipeline) Exec(ctx context.Context) ([]redis.Cmder, error)
- func (m *Pipeline) Exists(ctx context.Context, key string) *redis.IntCmd
- func (m *Pipeline) Expire(ctx context.Context, key string, expiration time.Duration) *redis.BoolCmd
- func (m *Pipeline) Get(ctx context.Context, key string) *redis.StringCmd
- func (m *Pipeline) GetBit(ctx context.Context, key string, offset int64) *redis.IntCmd
- func (m *Pipeline) HDel(ctx context.Context, key string, fields ...string) *redis.IntCmd
- func (m *Pipeline) HExists(ctx context.Context, key string, field string) *redis.BoolCmd
- func (m *Pipeline) HGet(ctx context.Context, key string, field string) *redis.StringCmd
- func (m *Pipeline) HGetAll(ctx context.Context, key string) *redis.StringStringMapCmd
- func (m *Pipeline) HIncrBy(ctx context.Context, key string, field string, incr int64) *redis.IntCmd
- func (m *Pipeline) HIncrByFloat(ctx context.Context, key string, field string, incr float64) *redis.FloatCmd
- func (m *Pipeline) HKeys(ctx context.Context, key string) *redis.StringSliceCmd
- func (m *Pipeline) HLen(ctx context.Context, key string) *redis.IntCmd
- func (m *Pipeline) HMGet(ctx context.Context, key string, fields ...string) *redis.SliceCmd
- func (m *Pipeline) HMSet(ctx context.Context, key string, fields map[string]interface{}) *redis.StatusCmd
- func (m *Pipeline) HSet(ctx context.Context, key string, field string, value interface{}) *redis.BoolCmd
- func (m *Pipeline) HSetNX(ctx context.Context, key string, field string, val interface{}) *redis.BoolCmd
- func (m *Pipeline) HVals(ctx context.Context, key string) *redis.StringSliceCmd
- func (m *Pipeline) Incr(ctx context.Context, key string) *redis.IntCmd
- func (m *Pipeline) IncrBy(ctx context.Context, key string, value int64) *redis.IntCmd
- func (m *Pipeline) LIndex(ctx context.Context, key string, index int64) *redis.StringCmd
- func (m *Pipeline) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *redis.IntCmd
- func (m *Pipeline) LLen(ctx context.Context, key string) *redis.IntCmd
- func (m *Pipeline) LPop(ctx context.Context, key string) *redis.StringCmd
- func (m *Pipeline) LPush(ctx context.Context, key string, values ...interface{}) *redis.IntCmd
- func (m *Pipeline) LPushX(ctx context.Context, key string, value interface{}) *redis.IntCmd
- func (m *Pipeline) LRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd
- func (m *Pipeline) LRem(ctx context.Context, key string, count int64, value interface{}) *redis.IntCmd
- func (m *Pipeline) LSet(ctx context.Context, key string, index int64, value interface{}) *redis.StatusCmd
- func (m *Pipeline) LTrim(ctx context.Context, key string, start, stop int64) *redis.StatusCmd
- func (m *Pipeline) MGet(ctx context.Context, keys ...string) *redis.SliceCmd
- func (m *Pipeline) MSet(ctx context.Context, pairs ...interface{}) *redis.StatusCmd
- func (m *Pipeline) RPop(ctx context.Context, key string) *redis.StringCmd
- func (m *Pipeline) RPush(ctx context.Context, key string, values ...interface{}) *redis.IntCmd
- func (m *Pipeline) RPushX(ctx context.Context, key string, value interface{}) *redis.IntCmd
- func (m *Pipeline) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd
- func (m *Pipeline) SetBit(ctx context.Context, key string, offset int64, value int) *redis.IntCmd
- func (m *Pipeline) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.BoolCmd
- func (m *Pipeline) TTL(ctx context.Context, key string) *redis.DurationCmd
- func (m *Pipeline) ZAdd(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd
- func (m *Pipeline) ZAddCh(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd
- func (m *Pipeline) ZAddNX(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd
- func (m *Pipeline) ZAddNXCh(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd
- func (m *Pipeline) ZAddXX(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd
- func (m *Pipeline) ZAddXXCh(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd
- func (m *Pipeline) ZCard(ctx context.Context, key string) *redis.IntCmd
- func (m *Pipeline) ZCount(ctx context.Context, key, min, max string) *redis.IntCmd
- func (m *Pipeline) ZIncr(ctx context.Context, key string, member redis.Z) *redis.FloatCmd
- func (m *Pipeline) ZIncrBy(ctx context.Context, key string, increment float64, member string) *redis.FloatCmd
- func (m *Pipeline) ZIncrNX(ctx context.Context, key string, member redis.Z) *redis.FloatCmd
- func (m *Pipeline) ZIncrXX(ctx context.Context, key string, member redis.Z) *redis.FloatCmd
- func (m *Pipeline) ZRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd
- func (m *Pipeline) ZRangeByLex(ctx context.Context, key string, by redis.ZRangeBy) *redis.StringSliceCmd
- func (m *Pipeline) ZRangeByScore(ctx context.Context, key string, by redis.ZRangeBy) *redis.StringSliceCmd
- func (m *Pipeline) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *redis.ZSliceCmd
- func (m *Pipeline) ZRank(ctx context.Context, key string, member string) *redis.IntCmd
- func (m *Pipeline) ZRem(ctx context.Context, key string, members []interface{}) *redis.IntCmd
- func (m *Pipeline) ZRevRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd
- func (m *Pipeline) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *redis.ZSliceCmd
- func (m *Pipeline) ZRevRank(ctx context.Context, key string, member string) *redis.IntCmd
- func (m *Pipeline) ZScore(ctx context.Context, key string, member string) *redis.FloatCmd
- type SimpleConfig
- func (m *SimpleConfig) GetConfig(ctx context.Context, namespace string) (*Config, error)
- func (m *SimpleConfig) Init(ctx context.Context) error
- func (m *SimpleConfig) ParseKey(ctx context.Context, key string) (*KeyParts, error)
- func (m *SimpleConfig) Watch(ctx context.Context) <-chan *center.ChangeEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultInstanceManager = NewInstanceManager()
View Source
var RedisNil = fmt.Sprintf("redis: nil")
Functions ¶
This section is empty.
Types ¶
type ApolloConfig ¶
type ApolloConfig struct {
// contains filtered or unexported fields
}
func NewApolloConfiger ¶
func NewApolloConfiger() *ApolloConfig
func (*ApolloConfig) Watch ¶
func (m *ApolloConfig) Watch(ctx context.Context) <-chan *center.ChangeEvent
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithOptions ¶ added in v1.4.6
func NewDefaultClient ¶
func (*Client) HIncrByFloat ¶
func (*Client) ScriptExists ¶ added in v1.3.35
func (*Client) ScriptLoad ¶ added in v1.3.35
func (*Client) ZRangeByLex ¶
func (*Client) ZRangeByScore ¶
func (*Client) ZRangeWithScores ¶
func (*Client) ZRemRangeByRank ¶ added in v1.4.8
func (*Client) ZRemRangeByScore ¶ added in v1.4.8
func (*Client) ZRevRangeWithScores ¶
type Configer ¶
type Configer interface { Init(ctx context.Context) error GetConfig(ctx context.Context, namespace string) (*Config, error) ParseKey(ctx context.Context, key string) (*KeyParts, error) Watch(ctx context.Context) <-chan *center.ChangeEvent }
var DefaultConfiger Configer
func NewConfiger ¶
func NewConfiger(configType constants.ConfigerType) (Configer, error)
func NewEtcdConfiger ¶
func NewEtcdConfiger() Configer
func NewSimpleConfiger ¶
func NewSimpleConfiger() Configer
type EtcdConfig ¶
type EtcdConfig struct {
// contains filtered or unexported fields
}
func (*EtcdConfig) Watch ¶
func (m *EtcdConfig) Watch(ctx context.Context) <-chan *center.ChangeEvent
type InstanceConf ¶
func (*InstanceConf) String ¶
func (m *InstanceConf) String() string
type InstanceManager ¶
type InstanceManager struct {
// contains filtered or unexported fields
}
func NewInstanceManager ¶
func NewInstanceManager() *InstanceManager
func (*InstanceManager) Close ¶
func (m *InstanceManager) Close()
func (*InstanceManager) GetInstance ¶
func (m *InstanceManager) GetInstance(ctx context.Context, conf *InstanceConf) (*Client, error)
func (*InstanceManager) Watch ¶
func (m *InstanceManager) Watch(ctx context.Context)
type Option ¶ added in v1.4.6
type Option interface {
// contains filtered or unexported methods
}
func WithNoFixKey ¶ added in v1.4.6
func WithUseWrapper ¶ added in v1.4.6
func WithWrapper ¶ added in v1.4.6
type Pipeline ¶ added in v1.4.6
type Pipeline struct {
// contains filtered or unexported fields
}
func (*Pipeline) HIncrByFloat ¶ added in v1.4.6
func (*Pipeline) ZRangeByLex ¶ added in v1.4.6
func (*Pipeline) ZRangeByScore ¶ added in v1.4.6
func (*Pipeline) ZRangeWithScores ¶ added in v1.4.6
func (*Pipeline) ZRevRangeWithScores ¶ added in v1.4.6
type SimpleConfig ¶
type SimpleConfig struct { }
func (*SimpleConfig) Watch ¶
func (m *SimpleConfig) Watch(ctx context.Context) <-chan *center.ChangeEvent
Click to show internal directories.
Click to hide internal directories.