Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HashKeyIdx = "idx" HashKeyExi = "exi" HashKeyVarIdx = "%idx" ShardKeyVarDb = "%db" ShardKeyVarMm = "%mm" )
Functions ¶
This section is empty.
Types ¶
type ConsistentHash ¶
type ConsistentHash struct {
// contains filtered or unexported fields
}
func NewConsistentHash ¶
func NewConsistentHash(nodeTotal int, hashKey string) *ConsistentHash
func (*ConsistentHash) Get ¶
func (ch *ConsistentHash) Get(key string) int
Click to show internal directories.
Click to hide internal directories.