Skip to content

k3rn3l-p4n1c/entanglement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Entanglement

Entanglement sync your data in cluster between node

How to use

Node Ip
Server1 10.0.0.1
Server2 10.0.0.2

First run bootstrap

conf := entanglement.DefaultConfig()

conf.RaftAddr = "10.0.0.1:12700"
conf.HttpAddr = "10.0.0.1:12701"

system := entanglement.Bootstrap(conf)
e := system.New("foo")

Now join other nodes

conf := entanglement.DefaultConfig()

conf.RaftAddr = "10.0.0.2:12700"
conf.HttpAddr = "10.0.0.2:12701"
conf.JoinAddr = "10.0.0.1:12701"

system := entanglement.Bootstrap(conf)
e := system.New("foo")

Write data on Server1

e.Set("baar")

Read data on the other node

v, _ := e.Get("baar")
println(v)

About

sync your data in cluster between node

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages