Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (m *Client) Close() error
- func (m *Client) Del(keys ...string) *redis.IntCmd
- func (m *Client) Get(key string) *redis.StringCmd
- func (m *Client) Incr(key string) *redis.IntCmd
- func (m *Client) Set(key string, value interface{}, expiration time.Duration) *redis.StatusCmd
- func (m *Client) SetNX(key string, value interface{}, expiration time.Duration) *redis.BoolCmd
- type Config
- type Configer
- type EtcdConfig
- type InstanceManager
- type SimpleConfig
Constants ¶
View Source
const ( CONFIG_TYPE_SIMPLE = iota CONFIG_TYPE_ETCD )
Variables ¶
View Source
var DefaultConfiger = NewSimpleConfiger()
View Source
var DefaultInstanceManager = NewInstanceManager()
View Source
var RedisNil = fmt.Sprintf("redis: nil")
Functions ¶
This section is empty.
Types ¶
type Configer ¶
func NewConfiger ¶
func NewEtcdConfiger ¶
func NewEtcdConfiger() Configer
func NewSimpleConfiger ¶
func NewSimpleConfiger() Configer
type EtcdConfig ¶
type EtcdConfig struct {
// contains filtered or unexported fields
}
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, namespace string) *Client
type SimpleConfig ¶
type SimpleConfig struct { }
Click to show internal directories.
Click to hide internal directories.