Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.17 KB

README.md

File metadata and controls

46 lines (32 loc) · 1.17 KB

consistent

Consistent hash package for Go.

Installation

go get stathat.com/c/consistent

Examples

Look at the godoc.

Status

This package was extracted from production code powering StatHat, so clearly we feel that it is production-ready, but it should still be considered experimental as other uses of it could reveal issues we aren't experiencing.

Contact us

We'd love to hear from you if you are using consistent. Get in touch: @stathat or contact us here.

About

Written by Patrick Crosby at StatHat. Twitter: @stathat

  • Support custom hash function in Config to New instance
  • Support default number of replicas in Config to New instance
  • Support number of replicas for every single member(both in Add and Remove)
	x := New(newConfig())
	x.Add("def", 40)
	x.Remove("def")
  • Add function: SetWithReplicas(),MemberReplicas()