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) Del(ctx context.Context, keys ...string) *redis.IntCmd
- 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) 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) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd
- func (m *Client) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.BoolCmd
- 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 (*Client) HIncrByFloat ¶
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 cache.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.