Godown — Go 开发的分布式 Key-Value 数据库
技术小能手 2018-11-07 10:54:41 浏览50 评论0摘要: Godown 是一个 Go 语言开发的简单、高效分布式 Key-Value 数据库,灵感来源 Redis,基于 Raft 协议,支持 String, Bitmap, Map, List。 演示视频 使用示例 通过 Go 客户端进行连接 package main import ( "fmt" "github.
Godown 是一个 Go 语言开发的简单、高效分布式 Key-Value 数据库,灵感来源 Redis,基于 Raft 协议,支持 String, Bitmap, Map, List。
演示视频
使用示例
通过 Go 客户端进行连接
package main
import ( "fmt"
"github.com/namreg/godown/client")
func main() {
c, err := client.New("127.0.0.1:4000")
if err != nil {
panic(err)
}
defer c.Close()
res := c.Get("key")
if res.Err() != nil {
panic(res.Err())
}
if res.IsNil() {
fmt.Print("key does not exist")
} else {
fmt.Println(res.Int64())
}
}
本文来自云栖社区合作伙伴“开源中国”
本文作者:局长
相关文章
- 11月7日云栖精选夜读 | 69 个经典 Spring …
- Java线程:并发协作-生产者消费者模型
- Cocos2d-x 酷跑游戏例子
- 测试分布式系统的线性一致性
- 存储系统的分类
- 线程知识点
- 有意义的命名
- 开源大数据周刊-第80期
- 分布式系统(Distributed System)资料
- 一篇文章,掌握所有开源数据库的现状