V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
hulk
V2EX  ›  Go 编程语言

基于 Go-Redis 之上实现的 Redis 读写分离以及 Sharding 库

  •  
  •   hulk ·
    git-hulk · 2020-02-25 18:16:16 +08:00 · 3570 次点击
    这是一个创建于 1528 天前的主题,其中的信息可能已经有所发展或是发生改变。

    基于 Go-Redis 之上实现的 Redis 读写分离以及 Sharding 库:

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

    3 条回复    2020-02-27 19:17:09 +08:00
    acczefly
        1
    acczefly  
       2020-02-26 09:58:23 +08:00
    赞, 内部大量使用了吗?
    hulk
        2
    hulk  
    OP
       2020-02-26 11:17:43 +08:00
    @acczefly 还没有呢,目前个别业务开始引入。不过整体代码比较简单且单元测试覆盖比较完整,没什么问题。
    anttu
        3
    anttu  
       2020-02-27 19:17:09 +08:00
    go get github.com/meitu/go-redis-pool
    # github.com/meitu/go-redis-pool
    github.com/meitu/go-redis-pool/pool.go:874:18: cannot use conn.cmdable.HSet(key, field, value) (type *redis.IntCmd) as type *redis.BoolCmd in return argument
    github.com/meitu/go-redis-pool/pool.go:954:19: cannot use conn.cmdable.HMSet(key, values...) (type *redis.BoolCmd) as type *redis.IntCmd in return argument

    请问下我下载报这 2 个错误是为啥呢,我以前下载过 redis 的其他包,比如集群、哨兵模式的连接池。 但是不在同一个用户下。 是同名了么?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2137 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 11:36 · PVG 19:36 · LAX 04:36 · JFK 07:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.