API Reference redis_cluster v0.8.0
View SourceModules
This module is a thin wrapper around the RedisCluster.Cluster module.
The main module for interacting with a Redis cluster. Typically you will use the
RedisCluster module. Though this module can be used directly for more dynamic use
cases, such as connecting to a Redis cluster at runtime or in Livebook demos.
Parses the output of the ROLE command. This is used when using a standalone Redis instance instead of a cluster.
Parses the output of the CLUSTER SHARDS command. This is the expected way to discover a cluster as of Redis v7.0.0. Older versions use the CLUSTER SLOTS command.
Parses the output of the CLUSTER SLOTS command. This is included to support Redis clusters older than v7.0.0.
A module for fetching the cluster information from a Redis cluster. Aside from internal use, this may be used for testing and debugging. Be aware this module will open a connection for each call.
A struct to hold the configuration for working with a Redis cluster.
A shim module to start a Redix connection. This is necessary to send the READONLY command to replicas. When in read-write mode, replicas will redirect to the master. This must be done per connection, not node.
A module for tracking the hash slots in a Redis cluster with an ETS table.
This is not a module you should be calling directly.
You might use all_slots/1 or all_slots_as_table/1 for debugging purposes.
This module handles the key operations, namely hashing the keys and finding the appropriate hash slots. For more information on how Redis uses hash slots, see the Redis Cluster documentation.
A simple in-memory locking mechanism using Erlang's :persistent_term.
A Redis monitoring client for debugging and testing purposes.
A module for parsing Redis monitor messages.
Redis Cluster connection supervisor. A "pool" in this context is a set of connections that point to the same Redis node (host and port). A Redis cluster will have a pool of connections for each node in the cluster.
A behaviour module for Redis adapters. This is intended for mocking Redis in the tests. Though it could also be used to work with Redis libraries other than Redix.
A GenServer that discovers Redis shards in a cluster and manages the connection pools.
This module doesn't actively monitor the cluster for changes. Instead it waits for a
call to rediscover_shards/1 to trigger a discovery process. This generally happens
when a MOVED redirect is encountered, indicating the cluster topology has changed.
A module for formatting lists of lists/tuples into a table-like string representation. Row data is converted to strings, padded for alignment, and formatted with headers. Assumes the header list and all row lists are of the same length.
Telemetry integration for Redis cluster operations.