Skip to content

wangaoone/ecRedis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecRedis

ecRedis is the client library for InfiniCache

Examples

A simple client example with PUT/GET:

package main

import (
	"github.com/wangaoone/ecRedis"
	"math/rand"
	"strings"
)

var addrList = "127.0.0.1:6378"

func main() {
	// initial object with random value
	var val []byte
	val = make([]byte, 1024)
	rand.Read(val)

	// parse server address
	addrArr := strings.Split(addrList, ",")

	// initial new ecRedis client
	client := ecRedis.NewClient(10, 2, 32)

	// start dial and PUT/GET
	client.Dial(addrArr)
	client.EcSet("foo", val)
	client.EcGet("foo", 1024)
}

Packages

No packages published

Languages