Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 521 Bytes

File metadata and controls

30 lines (18 loc) · 521 Bytes

consistent hash


Description

Simple ConsistentHash library

Installation

$ go get github.com/wayne666/consistent-hash

Usage

import "github.com/wayne666/consistent-hash"

c := ConsistentHash.New()
c.Add("stationA")
c.Add("stationB")
c.Add("stationC")
c.Add("stationD")

station, error := c.Get("Wayne")

AUTHOR

Written by WayneZhou, cumtxhzyy[at]gmail.com

COPYRIGHT

Copyright (c) 2015 WayneZhou. This library is free software; you can redistribute it and/or modify it.