zset:golang中的排序集

时间:2021-05-29 15:00:44
【文件属性】:
文件名称:zset:golang中的排序集
文件大小:8KB
文件格式:ZIP
更新时间:2021-05-29 15:00:44
redis golang sorted-set zset Go zset 使用 golang 在 Redis 中实现排序集。 去做 键类型为字符串的int64,或仅等待泛型。 安装 go get -u github.com/liyiheng/zset 用法 移除了 SortedSet 中的 RWLock。 如果需要,您自己实施即可。 s := zset . New () // add data s . Set ( 66 , 1001 , "test1" ) s . Set ( 77 , 1002 , "test2" ) s . Set ( 88 , 1003 , "test3" ) s . Set ( 100 , 1004 , "liyiheng" ) s . Set ( 99 , 1005 , "test4" ) s . Set ( 44 , 1006 , "test5" ) // update data s . Set ( 44 , 1001
【文件预览】:
zset-master
----zset.go(17KB)
----zset_test.go(3KB)
----LICENSE(1KB)
----.gitignore(11B)
----README.md(2KB)
----benchmark.sh(45B)

网友评论