Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 1.63 KB

README.md

File metadata and controls

74 lines (56 loc) · 1.63 KB

Bluzelle-go

Build Status codecov GoDoc Gitter chat

About bluzelle-go

bluzelle-go is a go client built on top of WebSocket API that connect to Bluzelle SwarmDB for basic CRUD operations. Under active development to support Bernoulli release.

Getting Started

  • Installation
go get github.com/wlwanpan/bluzelle-go
  • Compile protobuf
protoc -I=proto/proto --go_out=pb proto/proto/*.proto
  • Import
import "github.com/wlwanpan/bluzelle-go"
  • Initialize
blz := blz.Connect("127.0.0.1", 51010, "80174b53-2dda-49f1-9d6a-6a780d4")

List of API

  • Create
err := blz.Create("key1", []byte("value1"))
  • Read
value, err := blz.Read("key1")
  • Update
err := blz.Update("key1", []byte("value2"))
  • Remove
err := blz.Remove("key1")
  • Has
has, err := blz.Has("key1")
  • Keys
keys, err := blz.Keys()
  • Size
size, err := blz.Size()

Reference

Visit the official bluzelle documentation