hqpko / hconsistent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hconsistent

example:

package main

import (
	"fmt"

	"github.com/hqpko/hconsistent"
)

func main() {
	c := hconsistent.NewConsistentHash()
	c.Add("host-1")
	c.Add("host-2")
	c.Add("host-3")
	host := c.Get("key-01")
	fmt.Println(host)
}

About

License:MIT License


Languages

Language:Go 100.0%