3 ms·
This example gives a flavor of the client-server mode. Seems to be using some custom binary protocol - that seems like a surprising choice. https://github.com/
by harikb 6y ago
This example gives a flavor of the client-server mode. Seems to be using some custom binary protocol - that seems like a surprising choice.
https://github.com/buraksezer/olric#golang-client https://github.com/buraksezer/olric#golang-client
var clientConfig = &client.Config{
Addrs: []string{"localhost:3320"},
DialTimeout: 10 * time.Second,
KeepAlive: 10 * time.Second,
MaxConn: 100,
}
client, err := client.New(clientConfig)
if err != nil {
return err
}
dm := client.NewDMap("foobar")
err := dm.Put("key", "value")
// Handle this error