微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Godown Go 开发的​分布式 KeyValue 数据库

程序名称:Godown

授权协议: MIT

操作系统: 跨平台

开发语言: Google Go

Godown 介绍

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())
    }
}

Godown 官网

https://github.com/namreg/godown

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐