golang redis 兼容 Redis-Cluster 和 Redis-Standalone 的实现方案

兼容 Redis-Cluster 和 Redis-Standalone 的实现方案

测试代码

https://github.com/forcemeter/redis-cluster-golang

使用到的包

https://github.com/go-redis/redis

测试方法

先启动redis 测试环境

使用 docker composer 来启动一个redis-cluster集群和 redis-stanalone 单机版

https://github.com/go-redis/redis

其中,redis 版本号可以更换至 7.0,也可以调整到 6.2

image: docker.io/bitnami/redis-cluster:7.0

发表评论