Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages