Expand description
The sabi data access library for Redis in Rust.
sabi_redis is a Rust crate that provides a streamlined way to access various Redis configurations
within the sabi framework. It includes DataSrc and DataConn implementations designed to make
your development process more efficient.
This crate supports multiple Redis configurations:
- Standalone: For a single Redis server.
- Sentinel: For a Redis Sentinel managed setup, providing automatic failover.
- Cluster: For a distributed Redis Cluster setup.
- Pub/Sub: For processing Redis Pub/Sub messages. It includes subscribers for:
- Standalone: For a standalone Redis server.
- Sentinel: For a Redis Sentinel setup.
- Cluster: For a Redis Cluster setup. Each of these subscribers has both synchronous and asynchronous implementations.
Each configuration has both synchronous and asynchronous (compatible with tokio)
implementations, which can be enabled via features.
§Features
To use this crate, enable the features corresponding to your Redis setup and preferred execution model:
standalone-sync(default): Synchronous connection to a standalone Redis server.standalone-async: Asynchronous connection to a standalone Redis server.sentinel-sync: Synchronous connection to a Redis Sentinel setup.sentinel-async: Asynchronous connection to a Redis Sentinel setup.cluster-sync: Synchronous connection to a Redis Cluster.cluster-async: Asynchronous connection to a Redis Cluster.
Modules§
- cluster
cluster-syncorcluster-async - This module provides components for connecting to a Redis Cluster.
- pubsub
- This module provides components for processing Redis Pub/Sub messages.
- sentinel
sentinel-syncorsentinel-async - This module provides components for connecting to a Redis Sentinel managed setup.
Structs§
- Redis
Async Data Conn standalone-async - A data connection for a standalone Redis server, providing asynchronous operations.
- Redis
Async Data Src standalone-async - A data source for standalone Redis, used to initialize and provide
RedisAsyncDataConninstances. - Redis
Data Conn standalone-sync - A data connection for a standalone Redis server, providing synchronous operations.
- Redis
Data Src standalone-sync - A data source for standalone Redis, used to initialize and provide
RedisDataConninstances.
Enums§
- Redis
Async Error standalone-async - The error type for asynchronous Redis operations.
- Redis
Sync Error standalone-sync - The error type for synchronous Redis operations.