MCPcopy Create free account

hub / github.com/golang/groupcache / functions

Functions191 in github.com/golang/groupcache

↓ 28 callersMethodGet
(ctx context.Context, in *pb.GetRequest, out *pb.GetResponse)
peers.go:32
↓ 11 callersMethodString
String returns the data as a string, making a copy if necessary.
byteview.go:55
↓ 10 callersMethodAdd
Add atomically adds n to i.
groupcache.go:482
↓ 10 callersMethodAdd
Add adds a value to the cache.
lru/lru.go:56
↓ 9 callersMethodDo
Done is called when Do is done.
groupcache.go:185
↓ 7 callersFunctionStringSink
StringSink returns a Sink that populates the provided string pointer.
sinks.go:69
↓ 7 callersFunctioncloneBytes
(b []byte)
sinks.go:45
↓ 6 callersMethodAdd
Add adds some keys to the hash.
consistenthash/consistenthash.go:53
↓ 6 callersMethodLen
Len returns the number of items in the cache.
lru/lru.go:116
↓ 6 callersFunctionNew
(replicas int, fn Hash)
consistenthash/consistenthash.go:35
↓ 6 callersFunctionof
of returns a byte view of the []byte or string in x.
byteview_test.go:60
↓ 5 callersMethodSetString
SetString sets the value to s.
sinks.go:31
↓ 4 callersMethodCopy
Copy copies b into dest and returns the number of bytes copied.
byteview.go:87
↓ 4 callersMethodLen
Len returns the view's length.
byteview.go:39
↓ 4 callersFunctionNewGroup
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
groupcache.go:84
↓ 4 callersFunctionbenchmarkGet
(b *testing.B, shards int)
consistenthash/consistenthash_test.go:94
↓ 3 callersMethodDo
Do executes and returns the results of the given function, making sure that only one execution is in-flight for a given key at a time. If a duplicate
singleflight/singleflight.go:41
↓ 3 callersMethodEqual
Equal returns whether the bytes in b are the same as the bytes in b2.
byteview.go:96
↓ 3 callersMethodGet
Get returns the value identified by key, populating dest. The returned data must be unversioned. That is, key must uniquely describe the loaded data,
groupcache.go:48
↓ 3 callersFunctionNew
New creates a new Cache. If maxEntries is zero, the cache has no limit and it's assumed that eviction is done by the caller.
lru/lru.go:47
↓ 3 callersMethodSet
Set updates the pool's list of peers. Each peer value should be a valid base URL, for example "http://example.net:8000".
http.go:119
↓ 3 callersFunctioncountFills
(f func())
groupcache_test.go:168
↓ 3 callersFunctionnewGroup
If peers is nil, the peerPicker is called via a sync.Once to initialize it.
groupcache.go:89
↓ 2 callersFunctionAllocatingByteSliceSink
AllocatingByteSliceSink returns a Sink that allocates a byte slice to hold the received value and assigns it to *dst. The memory is not retained by gr
sinks.go:214
↓ 2 callersMethodEqualBytes
EqualBytes returns whether the bytes in b are the same as the bytes in b2.
byteview.go:123
↓ 2 callersMethodEqualString
EqualString returns whether the bytes in b are the same as the bytes in s.
byteview.go:105
↓ 2 callersMethodGetKey
()
groupcachepb/groupcache.pb.go:33
↓ 2 callersMethodIsEmpty
IsEmpty returns true if there are no items available.
consistenthash/consistenthash.go:48
↓ 2 callersFunctionNewHTTPPool
NewHTTPPool initializes an HTTP pool of peers, and registers itself as a PeerPicker. For convenience, it also registers itself as an http.Handler with
http.go:80
↓ 2 callersMethodRemove
Remove removes the provided key from the cache.
lru/lru.go:86
↓ 2 callersMethodRemoveOldest
RemoveOldest removes the oldest item from the cache.
lru/lru.go:96
↓ 2 callersMethodSetBytes
SetBytes sets the value to the contents of v. The caller retains ownership of v.
sinks.go:35
↓ 2 callersMethodSliceFrom
SliceFrom slices the view from the provided index until the end.
byteview.go:79
↓ 2 callersFunctionTruncatingByteSliceSink
TruncatingByteSliceSink returns a Sink that writes up to len(*dst) bytes to *dst. If more bytes are available, they're silently truncated. If fewer by
sinks.go:273
↓ 2 callersFunctionaddrToURL
(addr []string)
http_test.go:142
↓ 2 callersMethodbytes
()
groupcache.go:459
↓ 2 callersMethodget
(key string)
groupcache.go:436
↓ 2 callersMethoditems
()
groupcache.go:465
↓ 2 callersMethoditemsLocked
()
groupcache.go:471
↓ 2 callersMethodlookupCache
(key string)
groupcache.go:334
↓ 2 callersFunctionmin
(a, b int)
byteview_test.go:142
↓ 2 callersMethodpopulateCache
(key string, value ByteView, cache *cache)
groupcache.go:346
↓ 2 callersMethodremoveElement
(e *list.Element)
lru/lru.go:106
↓ 2 callersMethodsetBytesOwned
(b []byte)
sinks.go:249
↓ 2 callersMethodsetBytesOwned
(b []byte)
sinks.go:298
↓ 2 callersFunctionsetSinkView
(s Sink, v ByteView)
sinks.go:51
↓ 2 callersMethodstats
()
groupcache.go:408
↓ 2 callersMethodview
view returns a frozen view of the bytes for caching.
sinks.go:42
↓ 1 callersMethodGet
(ctx context.Context, key string, dest Sink)
groupcache.go:212
↓ 1 callersMethodGet
Get atomically gets the value of i.
groupcache.go:487
↓ 1 callersFunctionGetGroup
GetGroup returns the named group previously created with NewGroup, or nil if there's no such group.
groupcache.go:68
↓ 1 callersMethodGetGroup
()
groupcachepb/groupcache.pb.go:26
↓ 1 callersFunctionNewHTTPPoolOpts
NewHTTPPoolOpts initializes an HTTP pool of peers with the given options. Unlike NewHTTPPool, this function does not register the created pool as an H
http.go:91
↓ 1 callersMethodPickPeer
PickPeer returns the peer that owns the specific key and true to indicate that a remote peer was nominated. It returns nil, false if the key owner is
peers.go:41
↓ 1 callersFunctionProtoSink
ProtoSink returns a sink that unmarshals binary proto values into m.
sinks.go:155
↓ 1 callersMethodReader
Reader returns an io.ReadSeeker for the bytes in v.
byteview.go:140
↓ 1 callersFunctionRegisterPeerPicker
RegisterPeerPicker registers the peer initialization function. It is called once, when the first group is created. Either RegisterPeerPicker or Regist
peers.go:57
↓ 1 callersMethodReset
()
testpb/test.pb.go:230
↓ 1 callersMethodSetProto
SetProto sets the value to the encoded version of m. The caller retains ownership of m.
sinks.go:39
↓ 1 callersMethodSetString
(v string)
sinks.go:84
↓ 1 callersMethodSlice
Slice slices the view between the provided from and to indices.
byteview.go:71
↓ 1 callersMethodWriteTo
WriteTo implements io.WriterTo on the bytes in v.
byteview.go:163
↓ 1 callersMethodadd
(key string, value ByteView)
groupcache.go:420
↓ 1 callersFunctionawaitAddrReady
(t *testing.T, addr string, wg *sync.WaitGroup)
http_test.go:150
↓ 1 callersFunctionbeChildForTestHTTPPool
()
http_test.go:114
↓ 1 callersMethodgetFromPeer
(ctx context.Context, peer ProtoGetter, key string)
groupcache.go:308
↓ 1 callersMethodgetLocally
(ctx context.Context, key string, dest Sink)
groupcache.go:300
↓ 1 callersFunctiongetPeers
(groupName string)
peers.go:76
↓ 1 callersMethodload
load loads key either by invoking the getter locally or by sending it to another machine.
groupcache.go:241
↓ 1 callersFunctionpickFreeAddr
This is racy. Another process could swoop in and steal the port between the call to this function and the next listen call. Should be okay though. The
http_test.go:133
↓ 1 callersMethodremoveOldest
()
groupcache.go:451
↓ 1 callersMethodsetView
(v ByteView)
sinks.go:57
↓ 1 callersFunctiontestKeys
(n int)
http_test.go:106
MethodAt
At returns the byte at index i.
byteview.go:63
FunctionBenchmarkGet128
(b *testing.B)
consistenthash/consistenthash_test.go:91
FunctionBenchmarkGet32
(b *testing.B)
consistenthash/consistenthash_test.go:90
FunctionBenchmarkGet512
(b *testing.B)
consistenthash/consistenthash_test.go:92
FunctionBenchmarkGet8
(b *testing.B)
consistenthash/consistenthash_test.go:89
MethodByteSlice
ByteSlice returns a copy of the data as a byte slice.
byteview.go:47
FunctionByteViewSink
ByteViewSink returns a Sink that populates a ByteView.
sinks.go:106
MethodCacheStats
CacheStats returns stats about the provided cache within the group.
groupcache.go:386
MethodClear
Clear purges all stored items from the cache.
lru/lru.go:124
MethodDo
(key string, fn func() (interface{}, error))
groupcache_test.go:378
MethodGet
(ctx context.Context, in *pb.GetRequest, out *pb.GetResponse)
http.go:195
MethodGet
(_ context.Context, in *pb.GetRequest, out *pb.GetResponse)
groupcache_test.go:234
MethodGet
(ctx context.Context, key string, dest Sink)
groupcache.go:54
MethodGet
Get looks up a key's value from the cache.
lru/lru.go:74
MethodGet
Get gets the closest item in the hash to the provided key.
consistenthash/consistenthash.go:65
MethodGetBytes
()
testpb/test.pb.go:102
MethodGetCacheHits
()
testpb/test.pb.go:156
MethodGetCity
()
testpb/test.pb.go:33
MethodGetEvicts
()
testpb/test.pb.go:123
MethodGetFills
()
testpb/test.pb.go:163
MethodGetGets
()
testpb/test.pb.go:109
MethodGetGets
()
testpb/test.pb.go:149
MethodGetHits
()
testpb/test.pb.go:116
MethodGetHotCache
()
testpb/test.pb.go:184
MethodGetItems
()
testpb/test.pb.go:95
MethodGetLoads
()
testpb/test.pb.go:198
MethodGetLocalLoads
()
testpb/test.pb.go:219
next →1–100 of 191, ranked by callers