Documentation ¶
Index ¶
- type BigBucket
- type Bucket
- type ConsistentRing
- func (c *ConsistentRing) AddNode(name string)
- func (c ConsistentRing) DumpNodesRange() ConsistentRing
- func (c ConsistentRing) FindBigBucketByKey(key string) (b BigBucket)
- func (c ConsistentRing) FindBucketByKey(key string) (b Bucket)
- func (a ConsistentRing) Len() int
- func (a ConsistentRing) Less(i, j int) bool
- func (a ConsistentRing) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigBucket ¶
type BigBucket struct { Name string Bucket1 *Bucket // fnv hash 1次 Bucket2 *Bucket // fnv hash 2次 Bucket3 *Bucket }
一个BigBucket对应三个Bucket虚拟节点
type ConsistentRing ¶
func (ConsistentRing) DumpNodesRange ¶
func (c ConsistentRing) DumpNodesRange() ConsistentRing
支持BigBucket
func (ConsistentRing) FindBigBucketByKey ¶
func (c ConsistentRing) FindBigBucketByKey(key string) (b BigBucket)
func (ConsistentRing) FindBucketByKey ¶
func (c ConsistentRing) FindBucketByKey(key string) (b Bucket)
func (ConsistentRing) Len ¶
func (a ConsistentRing) Len() int
func (ConsistentRing) Less ¶
func (a ConsistentRing) Less(i, j int) bool
func (ConsistentRing) Swap ¶
func (a ConsistentRing) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.