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) 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) 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) 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 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 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) 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 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.