Documentation ¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) CounterKey(part string) string
- func (c *Client) Decr(key string) (int64, error)
- func (c *Client) DecrBy(key string, count int) (int64, error)
- func (c *Client) Get(key string) (string, error)
- func (c *Client) GetCounter(key string) (int64, error)
- func (c *Client) Incr(key string) (int64, error)
- func (c *Client) IncrBy(key string, count int) (int64, error)
- func (c *Client) Lock(key string, expireTime ...int) error
- func (c *Client) Remove(key string) error
- func (c *Client) Set(key, value string, expireTime ...int) error
- func (c *Client) Unlock(key string) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewCacheClient ¶
func (*Client) CounterKey ¶
type Options ¶
type Options struct { Addr string `yaml:"addr" mapstructure:"addr"` Password string `yaml:"password" mapstructure:"password"` DB int `yaml:"db" mapstructure:"db"` PoolSize int `yaml:"pool_size" mapstructure:"pool_size"` // 读写超时时间 TimeOut int `yaml:"timeout" mapstructure:"timeout"` // 缓存 key 统一前缀 Prefix string `yaml:"prefix" mapstructure:"prefix"` }
Click to show internal directories.
Click to hide internal directories.