MCPcopy Index your code
hub / github.com/golang/groupcache / New

Function New

consistenthash/consistenthash.go:35–45  ·  view source on GitHub ↗
(replicas int, fn Hash)

Source from the content-addressed store, hash-verified

33}
34
35func New(replicas int, fn Hash) *Map {
36 m := &Map{
37 replicas: replicas,
38 hash: fn,
39 hashMap: make(map[int]string),
40 }
41 if m.hash == nil {
42 m.hash = crc32.ChecksumIEEE
43 }
44 return m
45}
46
47// IsEmpty returns true if there are no items available.
48func (m *Map) IsEmpty() bool {

Callers 5

NewHTTPPoolOptsFunction · 0.92
SetMethod · 0.92
TestHashingFunction · 0.70
TestConsistencyFunction · 0.70
benchmarkGetFunction · 0.70

Calls

no outgoing calls

Tested by 3

TestHashingFunction · 0.56
TestConsistencyFunction · 0.56
benchmarkGetFunction · 0.56