Consistent holds the information about the members of the consistent hash circle.
| 107 | |
| 108 | // Consistent holds the information about the members of the consistent hash circle. |
| 109 | type 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. |
| 123 | func New(members []Member, config Config) *Consistent { |
nothing calls this directly
no outgoing calls
no test coverage detected