Versions in this module Expand all Collapse all v1 v1.0.0 Jun 22, 2015 Changes in this version + const DefaultTimeout + var ErrBadIncrDec = errors.New("memcache: incr or decr on non-numeric value") + var ErrBadMagic = errors.New("memcache: bad magic number in response") + var ErrCASConflict = errors.New("memcache: compare-and-swap conflict") + var ErrCacheMiss = errors.New("memcache: cache miss") + var ErrMalformedKey = errors.New("malformed: key is too long or contains invalid characters") + var ErrNoServers = errors.New("memcache: no servers configured or available") + var ErrNoStats = errors.New("memcache: no statistics available") + var ErrNotStored = errors.New("memcache: item not stored") + var ErrServerError = errors.New("memcache: server error") + type Addr struct + func NewAddr(addr net.Addr) *Addr + func (a *Addr) String() string + type Client struct + func New(server ...string) (*Client, error) + func NewFromServers(servers Servers) *Client + func (c *Client) Add(item *Item) error + func (c *Client) Close() error + func (c *Client) CompareAndSwap(item *Item) error + func (c *Client) Decrement(key string, delta uint64) (newValue uint64, err error) + func (c *Client) Delete(key string) error + func (c *Client) Flush(expiration int) error + func (c *Client) Get(key string) (*Item, error) + func (c *Client) GetMulti(keys []string) (map[string]*Item, error) + func (c *Client) Increment(key string, delta uint64) (newValue uint64, err error) + func (c *Client) MaxIdleConnsPerAddr() int + func (c *Client) Set(item *Item) error + func (c *Client) SetMaxIdleConnsPerAddr(maxIdle int) + func (c *Client) SetTimeout(timeout time.Duration) + func (c *Client) Timeout() time.Duration + type ConnectTimeoutError struct + Addr net.Addr + func (cte *ConnectTimeoutError) Error() string + func (cte *ConnectTimeoutError) Temporary() bool + func (cte *ConnectTimeoutError) Timeout() bool + type Item struct + Expiration int32 + Flags uint32 + Key string + Object interface{} + Value []byte + type ServerList struct + func NewServerList(servers ...string) (*ServerList, error) + func (s *ServerList) PickServer(key string) (*Addr, error) + func (s *ServerList) Servers() ([]*Addr, error) + type Servers interface + PickServer func(key string) (*Addr, error) + Servers func() ([]*Addr, error)