Module rsmc_core::client[][src]

Expand description

This module implements the high-level client used to communicate with a memcached cluster. Regardless of the async runtime used, all implementations use the same client interface with the same API.

Structs

A client manages connections to every node in a memcached cluster using consistent hashing to decide which connection to use based on the key.

Set configuration values for a memcached client.

An implementation of Compressor that does nothing. This is useful if you want to disable compression.

Enums

An error causing during client communication with Memcached.

Traits

A Compressor is used to implement compression of packet values. A default implementation is provided for NoCompressor, as well as [ZlibCompressor].

A connection is an async interface to memcached, which requires a concrete implementation using an underlying async runtime (e.g. tokio or async-std.)

Type Definitions

The result of a multi_*() request. A map of all keys for which there was an error for specific keys. These can be treated as get misses and ignored, but it may be desirable to log these errors to uncover underlying issues.

The result of doing a multi_get(). The Ok result will be a tuple of ok, err responses. The err responses can be treated as get misses, but should be logged somewhere for visibility. Lots of them could indicate a serious underlying issue.

The result of of a multi_get() request. A map of all of keys for which memcached returned a found response, and their corresponding values.

The result of doing a multi_set(), multi_delete(), etc…

A connection pool for multiple connections. Using a pool is recommended for best performance since it eliminates the overhead of having to constantly recreate TCP connections, while also balancing the total number of connections open at a time.