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

Function NewGroup

groupcache.go:84–86  ·  view source on GitHub ↗

NewGroup creates a coordinated group-aware Getter from a Getter. The returned Getter tries (but does not guarantee) to run only one Get call at once for a given key across an entire set of peer processes. Concurrent callers both in the local process and in other processes receive copies of the answ

(name string, cacheBytes int64, getter Getter)

Source from the content-addressed store, hash-verified

82//
83// The group name must be unique for each getter.
84func NewGroup(name string, cacheBytes int64, getter Getter) *Group {
85 return newGroup(name, cacheBytes, getter, nil)
86}
87
88// If peers is nil, the peerPicker is called via a sync.Once to initialize it.
89func newGroup(name string, cacheBytes int64, getter Getter, peers PeerPicker) *Group {

Callers 3

testSetupFunction · 0.85
TestHTTPPoolFunction · 0.85
beChildForTestHTTPPoolFunction · 0.85

Calls 1

newGroupFunction · 0.85

Tested by 3

testSetupFunction · 0.68
TestHTTPPoolFunction · 0.68
beChildForTestHTTPPoolFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…