package
0.0.0-20240805133030-fdaf6a95408e
Repository: https://github.com/grafana/gomemcache.git
Documentation: pkg.go.dev

# Functions

New returns a memcache client using the provided server(s) with equal weight.
NewFromSelector returns a new Client using the provided ServerSelector.
NewWithBackgroundReconnect returns the same thing as New(server ...string), but takes a context and timeout to initiate a bakground reconnect cron.
WithAllocator creates a new Option that makes use of a specific memory Allocator for result values (Item.Value) loaded from memcached.

# Constants

DefaultMaxIdleConns is the default maximum number of idle connections kept for any single address.
DefaultTimeout is the default socket read/write timeout.

# Variables

ErrCacheMiss means that a Get failed because the item wasn't present.
ErrCASConflict means that a CompareAndSwap call failed due to the cached value being modified between the Get and the CompareAndSwap.
ErrMalformedKey is returned when an invalid key is used.
ErrNoServers is returned when no servers are configured or available.
ErrNoStats means that no statistics were available.
ErrNotStored means that a conditional write operation (i.e.
ErrServerError means that a server error occurred.

# Structs

Client is a memcache client.
ConnectTimeoutError is the error type used when it takes too long to connect to the desired host.
Item is an item to be got or stored in a memcached server.
Options are used to modify the behavior of an individual Get or GetMulti call made by the Client.
ServerList is a simple ServerSelector.

# Interfaces

Allocator allows memory for memcached result values (Item.Value) to be managed by callers of the Client instead of by the Client itself.
ServerSelector is the interface that selects a memcache server as a function of the item's key.

# Type aliases

Option is a callback used to modify the Options that a particular Client method uses.