redis-go-cluster 介绍
redis-go-cluster 是基于 Redigo 实现的 Golang Redis 客户端。redis-go-cluster 可以在本地缓存 slot
信息,并且当集群修改的时候会自动更新。此客户端管理每个节点连接池,使用 goroutine 来尽可能的并发执行,达到了高效,低延迟。
-
Most commands of keys, strings, lists, sets, sorted sets, hashes.
-
MGET/MSET
-
Pipelining
不支持:
-
Cluster commands
-
Pub/Sub
-
Transaction
-
Lua script
使用
import "github.com/chasex/redis-go-cluster" cluster, err := redis.NewCluster( &redis.Options{ StartNodes: []string{"127.0.0.1:7000", "127.0.0.1:7001", "127.0.0.1:7002"}, ConnTimeout: 50 * time.Millisecond, ReadTimeout: 50 * time.Millisecond, WriteTimeout: 50 * time.Millisecond, KeepAlive: 16, AliveTime: 60 * time.Second, })
redis-go-cluster 官网
https://github.com/chasex/redis-go-cluster
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。