MCPcopy Create free account
hub / github.com/buraksezer/consistent / Consistent

Struct Consistent

consistent.go:109–120  ·  view source on GitHub ↗

Consistent holds the information about the members of the consistent hash circle.

Source from the content-addressed store, hash-verified

107
108// Consistent holds the information about the members of the consistent hash circle.
109type Consistent struct {
110 mu sync.RWMutex
111
112 config Config
113 hasher Hasher
114 sortedSet []uint64
115 partitionCount uint64
116 loads map[string]float64
117 members map[string]*Member
118 partitions map[int]*Member
119 ring map[uint64]*Member
120}
121
122// New creates and returns a new Consistent object.
123func New(members []Member, config Config) *Consistent {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected