MCPcopy Create free account
hub / github.com/PacktPublishing/System-Programming-Essentials-with-Go / HashRing

Struct HashRing

ch13/hashring.go:16–20  ·  view source on GitHub ↗

HashRing represents the consistent hash ring

Source from the content-addressed store, hash-verified

14
15// HashRing represents the consistent hash ring
16type HashRing struct {
17 nodes []Node
18 hashes []uint32
19 lock sync.RWMutex
20}
21
22// NewHashRing creates a new HashRing
23func NewHashRing() *HashRing {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected