Documentation
¶
Index ¶
- Variables
- func Add(name string, c *Config) error
- func AddByUnix(name string, c *UnixConfig) error
- func Del(key string) error
- func Get(key string) ([]byte, error)
- func GetMcClient() *memcache.Client
- func GetRedisConn(name string) (*redis.Client, error)
- func InitMcClient(c *MConfig)
- func NewRedisClientWithConfig(c *Config) (*redis.Client, error)
- type Config
- type MConfig
- type UnixConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoClient error = errors.New("no memcache client")
Functions ¶
func AddByUnix ¶
func AddByUnix(name string, c *UnixConfig) error
func GetMcClient ¶
func InitMcClient ¶
func InitMcClient(c *MConfig)
Types ¶
type Config ¶
type MConfig ¶
type MConfig struct { Addrs []string `toml:"addrs" json:"addrs"` PoolSize int `toml:"pool_size" json:"pool_size"` }
memcache 的配置
func (*MConfig) GetPoolSize ¶
type UnixConfig ¶
Click to show internal directories.
Click to hide internal directories.