rslock
rslock copied to clipboard
Add Redis Cluster support
Addresses https://github.com/hexcowboy/rslock/issues/21.
Please review the Docker setup (tests) with extra care, as I'm new to Docker.
Changes
- Add Redis Cluster support via:
-
LockManager::new_cluster(uris: Vec<Vec<T>>) -
LockManager::from_cluster_clients(clients: Vec<ClusterClient>)
-
- Add cluster integration tests (
single_cluster,multi_cluster) - Add Docker Compose test environment with 3 Redis clusters
- Update README with cluster usage and locking behavior
Testing
Test single-cluster (simple lock) and multi-cluster (Redlock) behavior:
# Executes both single and multi-cluster examples
docker compose -f examples/docker-compose-cluster.yml up --build