Versions in this module Expand all Collapse all v1 v1.0.2 Aug 28, 2024 v1.0.1 Aug 28, 2024 Changes in this version + const DefaultMaxIdleConns + const DefaultTimeout + 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 Client struct + DialContext func(ctx context.Context, network, address string) (net.Conn, error) + MaxIdleConns int + Timeout time.Duration + func New(server ...string) *Client + func NewFromSelector(ss ServerSelector) *Client + func (c *Client) Add(item *Item) error + func (c *Client) Append(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) DeleteAll() error + func (c *Client) FlushAll() error + func (c *Client) Get(key string) (item *Item, err 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) Ping() error + func (c *Client) Prepend(item *Item) error + func (c *Client) Replace(item *Item) error + func (c *Client) Set(item *Item) error + func (c *Client) Touch(key string, seconds int32) (err error) + type ConnectTimeoutError struct + Addr net.Addr + func (cte *ConnectTimeoutError) Error() string + type Item struct + CasID uint64 + Expiration int32 + Flags uint32 + Key string + Value []byte + type ServerList struct + func (ss *ServerList) Each(f func(net.Addr) error) error + func (ss *ServerList) PickServer(key string) (net.Addr, error) + func (ss *ServerList) SetServers(servers ...string) error + type ServerSelector interface + Each func(func(net.Addr) error) error + PickServer func(key string) (net.Addr, error)