Skip to content

Memcache consistent hash portable for Go. Exploring consistent hashing in Go.

License

Notifications You must be signed in to change notification settings

iMega/gomemcache-selector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This contains implementation of the consistent hash for memcache (client available at https://github.com/bradfitz/gomemcache/). It was written using and for the Go programming language.

Using

$ go get github.com/imega/gomemcache-selector/php-memcache

Example

import (
        "github.com/bradfitz/gomemcache/memcache"
        "github.com/imega/gomemcache-selector/php-memcache"
)

func main() {
    selector := phpmemcache.New("10.0.0.1:11211", "10.0.0.2:11211", "10.0.0.3:11212")
    mc := memcache.NewFromSelector(selector)

    mc.Set(&memcache.Item{Key: "foo", Value: []byte("my value")})

    it, err := mc.Get("foo")
    ...
}

Reference

About

Memcache consistent hash portable for Go. Exploring consistent hashing in Go.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages