Documentation ¶
Index ¶
- Variables
- func DefaultHasher() *hasher
- type Config
- type Hasher
- type Member
- type Ring
- func (c *Ring) Add(member Member)
- func (c *Ring) AverageLoad() float64
- func (c *Ring) FindPartitionID(key []byte) int
- func (c *Ring) GetClosestN(key []byte, count int) ([]Member, error)
- func (c *Ring) GetClosestNForPartition(partID, count int) ([]Member, error)
- func (c *Ring) GetMembers() []Member
- func (c *Ring) GetPartitionOwner(partID int) Member
- func (c *Ring) LoadDistribution() map[string]float64
- func (c *Ring) LocateKey(key []byte) Member
- func (c *Ring) Remove(name string)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInsufficientMemberCount = errors.New("insufficient member count")
)
Functions ¶
func DefaultHasher ¶
func DefaultHasher() *hasher
Types ¶
type Ring ¶
type Ring struct {
// contains filtered or unexported fields
}
func (*Ring) AverageLoad ¶
func (*Ring) FindPartitionID ¶
func (*Ring) GetClosestNForPartition ¶
func (*Ring) GetMembers ¶
func (*Ring) GetPartitionOwner ¶
func (*Ring) LoadDistribution ¶
Click to show internal directories.
Click to hide internal directories.