MCPcopy Create free account
hub / github.com/dadgar/onecache / newConsistentRing

Function newConsistentRing

onecache/ring.go:47–53  ·  view source on GitHub ↗

newConsistentRing returns a constinent ring and takes the name of this node and the number of its replicas.

(name string, replicas int)

Source from the content-addressed store, hash-verified

45// newConsistentRing returns a constinent ring and takes the name of this node
46// and the number of its replicas.
47func newConsistentRing(name string, replicas int) *consistentRing {
48 return &consistentRing{
49 self: name,
50 ring: consistent.New(),
51 replicas: replicas,
52 }
53}
54
55// getOwnedKeys returns the set of keys owned by this node.
56func (c *consistentRing) getOwnedKeys(keys []string) []string {

Callers 1

CreateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected