Versions in this module Expand all Collapse all v0 v0.0.1 Sep 19, 2020 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 ErrClusterConfigMiss = errors.New("memcache: cluster config miss") + var ErrInvalidPollingDuration = errors.New("Discovery polling duration is invalid") + 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 + MaxIdleConns int + Timeout time.Duration + func New(server ...string) *Client + func NewDiscoveryClient(discoveryAddress string, pollingDuration time.Duration) (*Client, error) + func NewFromSelector(ss ServerSelector) *Client + func (c *Client) Add(item *Item) 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) GetConfig(configType string) (clusterConfig *ClusterConfig, 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) Replace(item *Item) error + func (c *Client) Set(item *Item) error + func (c *Client) Touch(key string, seconds int32) (err error) + type ClusterConfig struct + ConfigID int64 + NodeAddresses []ClusterNode + type ClusterNode struct + Host string + Port int64 + 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(f func(net.Addr) error) error + func (ss *ServerList) PickAnyServer() (net.Addr, 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 + PickAnyServer func() (net.Addr, error) + PickServer func(key string) (net.Addr, error)