Versions in this module Expand all Collapse all v0 v0.0.1 Dec 18, 2020 Changes in this version + const DefaultMaxIdleConns + const DefaultTimeout + var AllViews = []*view.View + 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") + var KeyCallsView = &view.View + var KeyError = tag.NewKey("error") + var KeyLatencyView = &view.View + var KeyLengthView = &view.View + var KeyMethod = tag.NewKey("method") + var KeyStatus = tag.NewKey("status") + var KeyValueLengthView = &view.View + type Client struct + MaxIdleConns int + Timeout time.Duration + func New(server ...string) *Client + func NewFromSelector(ss ServerSelector) *Client + func (c *Client) Add(ctx context.Context, item *Item) error + func (c *Client) CompareAndSwap(ctx context.Context, item *Item) error + func (c *Client) Decrement(ctx context.Context, key string, delta uint64) (newValue uint64, err error) + func (c *Client) Delete(ctx context.Context, key string) error + func (c *Client) DeleteAll(ctx context.Context) error + func (c *Client) FlushAll(ctx context.Context) error + func (c *Client) Get(ctx context.Context, key string) (item *Item, err error) + func (c *Client) GetMulti(ctx context.Context, keys []string) (m map[string]*Item, err error) + func (c *Client) Increment(ctx context.Context, key string, delta uint64) (newValue uint64, err error) + func (c *Client) Replace(ctx context.Context, item *Item) error + func (c *Client) Set(ctx context.Context, item *Item) error + func (c *Client) Touch(ctx context.Context, key string, seconds int32) error + type ConnectTimeoutError struct + Addr net.Addr + func (cte *ConnectTimeoutError) Error() string + type Item struct + Expiration int32 + Flags uint32 + Key string + Value []byte + type ServerList struct + func (ss *ServerList) Each(ctx context.Context, f func(context.Context, 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(context.Context, func(context.Context, net.Addr) error) error + PickServer func(key string) (net.Addr, error)