Documentation ¶
Index ¶
- Variables
- func Init(conf []Config) error
- type Config
- type Manager
- type Memcache
- func (m *Memcache) Add(key string, value []byte, expiration int32) error
- func (m *Memcache) Conn() *memcache.Client
- func (m *Memcache) Decrement(key string, delta uint64) (uint64, error)
- func (m *Memcache) Delete(key string) error
- func (m *Memcache) Get(key string) ([]byte, error)
- func (m *Memcache) GetMulti(keys []string) (map[string][]byte, error)
- func (m *Memcache) Increment(key string, delta uint64) (uint64, error)
- func (m *Memcache) Replace(key string, value []byte, expiration int32) error
- func (m *Memcache) Set(key string, value []byte, expiration int32) error
- func (m *Memcache) Touch(key string, seconds int32) error
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMemcacheNotExists = errors.New("指定Memcache不存在,或未初始化")
)
Functions ¶
Types ¶
type Config ¶ added in v0.2.23
type Config struct { Name string `json:"name" toml:"name"` Server []ServerConfig `json:"server" toml:"server"` }
type Memcache ¶
type Memcache struct {
// contains filtered or unexported fields
}
func (*Memcache) Decrement ¶
Decrement 按增量原子递减键的值 返回值是递减或出错后的新值 如果该值在memcache中不存在,则错误为ErrCacheMiss memcache中的值必须是十进制数,否则将返回错误
func (*Memcache) Increment ¶
Increment 按增量键原子递增 返回值是递增或出错后的新值 如果该值在memcache中不存在,则错误为ErrCacheMiss memcache中的值必须是十进制数,否则将返回错误
type ServerConfig ¶ added in v0.2.23
Click to show internal directories.
Click to hide internal directories.