Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/golang/groupcache
/ functions
Functions
191 in github.com/golang/groupcache
⨍
Functions
191
◇
Types & classes
43
↓ 28 callers
Method
Get
(ctx context.Context, in *pb.GetRequest, out *pb.GetResponse)
peers.go:32
↓ 11 callers
Method
String
String returns the data as a string, making a copy if necessary.
byteview.go:55
↓ 10 callers
Method
Add
Add atomically adds n to i.
groupcache.go:482
↓ 10 callers
Method
Add
Add adds a value to the cache.
lru/lru.go:56
↓ 9 callers
Method
Do
Done is called when Do is done.
groupcache.go:185
↓ 7 callers
Function
StringSink
StringSink returns a Sink that populates the provided string pointer.
sinks.go:69
↓ 7 callers
Function
cloneBytes
(b []byte)
sinks.go:45
↓ 6 callers
Method
Add
Add adds some keys to the hash.
consistenthash/consistenthash.go:53
↓ 6 callers
Method
Len
Len returns the number of items in the cache.
lru/lru.go:116
↓ 6 callers
Function
New
(replicas int, fn Hash)
consistenthash/consistenthash.go:35
↓ 6 callers
Function
of
of returns a byte view of the []byte or string in x.
byteview_test.go:60
↓ 5 callers
Method
SetString
SetString sets the value to s.
sinks.go:31
↓ 4 callers
Method
Copy
Copy copies b into dest and returns the number of bytes copied.
byteview.go:87
↓ 4 callers
Method
Len
Len returns the view's length.
byteview.go:39
↓ 4 callers
Function
NewGroup
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 callers
Function
benchmarkGet
(b *testing.B, shards int)
consistenthash/consistenthash_test.go:94
↓ 3 callers
Method
Do
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 callers
Method
Equal
Equal returns whether the bytes in b are the same as the bytes in b2.
byteview.go:96
↓ 3 callers
Method
Get
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 callers
Function
New
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 callers
Method
Set
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 callers
Function
countFills
(f func())
groupcache_test.go:168
↓ 3 callers
Function
newGroup
If peers is nil, the peerPicker is called via a sync.Once to initialize it.
groupcache.go:89
↓ 2 callers
Function
AllocatingByteSliceSink
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 callers
Method
EqualBytes
EqualBytes returns whether the bytes in b are the same as the bytes in b2.
byteview.go:123
↓ 2 callers
Method
EqualString
EqualString returns whether the bytes in b are the same as the bytes in s.
byteview.go:105
↓ 2 callers
Method
GetKey
()
groupcachepb/groupcache.pb.go:33
↓ 2 callers
Method
IsEmpty
IsEmpty returns true if there are no items available.
consistenthash/consistenthash.go:48
↓ 2 callers
Function
NewHTTPPool
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 callers
Method
Remove
Remove removes the provided key from the cache.
lru/lru.go:86
↓ 2 callers
Method
RemoveOldest
RemoveOldest removes the oldest item from the cache.
lru/lru.go:96
↓ 2 callers
Method
SetBytes
SetBytes sets the value to the contents of v. The caller retains ownership of v.
sinks.go:35
↓ 2 callers
Method
SliceFrom
SliceFrom slices the view from the provided index until the end.
byteview.go:79
↓ 2 callers
Function
TruncatingByteSliceSink
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 callers
Function
addrToURL
(addr []string)
http_test.go:142
↓ 2 callers
Method
bytes
()
groupcache.go:459
↓ 2 callers
Method
get
(key string)
groupcache.go:436
↓ 2 callers
Method
items
()
groupcache.go:465
↓ 2 callers
Method
itemsLocked
()
groupcache.go:471
↓ 2 callers
Method
lookupCache
(key string)
groupcache.go:334
↓ 2 callers
Function
min
(a, b int)
byteview_test.go:142
↓ 2 callers
Method
populateCache
(key string, value ByteView, cache *cache)
groupcache.go:346
↓ 2 callers
Method
removeElement
(e *list.Element)
lru/lru.go:106
↓ 2 callers
Method
setBytesOwned
(b []byte)
sinks.go:249
↓ 2 callers
Method
setBytesOwned
(b []byte)
sinks.go:298
↓ 2 callers
Function
setSinkView
(s Sink, v ByteView)
sinks.go:51
↓ 2 callers
Method
stats
()
groupcache.go:408
↓ 2 callers
Method
view
view returns a frozen view of the bytes for caching.
sinks.go:42
↓ 1 callers
Method
Get
(ctx context.Context, key string, dest Sink)
groupcache.go:212
↓ 1 callers
Method
Get
Get atomically gets the value of i.
groupcache.go:487
↓ 1 callers
Function
GetGroup
GetGroup returns the named group previously created with NewGroup, or nil if there's no such group.
groupcache.go:68
↓ 1 callers
Method
GetGroup
()
groupcachepb/groupcache.pb.go:26
↓ 1 callers
Function
NewHTTPPoolOpts
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 callers
Method
PickPeer
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 callers
Function
ProtoSink
ProtoSink returns a sink that unmarshals binary proto values into m.
sinks.go:155
↓ 1 callers
Method
Reader
Reader returns an io.ReadSeeker for the bytes in v.
byteview.go:140
↓ 1 callers
Function
RegisterPeerPicker
RegisterPeerPicker registers the peer initialization function. It is called once, when the first group is created. Either RegisterPeerPicker or Regist
peers.go:57
↓ 1 callers
Method
Reset
()
testpb/test.pb.go:230
↓ 1 callers
Method
SetProto
SetProto sets the value to the encoded version of m. The caller retains ownership of m.
sinks.go:39
↓ 1 callers
Method
SetString
(v string)
sinks.go:84
↓ 1 callers
Method
Slice
Slice slices the view between the provided from and to indices.
byteview.go:71
↓ 1 callers
Method
WriteTo
WriteTo implements io.WriterTo on the bytes in v.
byteview.go:163
↓ 1 callers
Method
add
(key string, value ByteView)
groupcache.go:420
↓ 1 callers
Function
awaitAddrReady
(t *testing.T, addr string, wg *sync.WaitGroup)
http_test.go:150
↓ 1 callers
Function
beChildForTestHTTPPool
()
http_test.go:114
↓ 1 callers
Method
getFromPeer
(ctx context.Context, peer ProtoGetter, key string)
groupcache.go:308
↓ 1 callers
Method
getLocally
(ctx context.Context, key string, dest Sink)
groupcache.go:300
↓ 1 callers
Function
getPeers
(groupName string)
peers.go:76
↓ 1 callers
Method
load
load loads key either by invoking the getter locally or by sending it to another machine.
groupcache.go:241
↓ 1 callers
Function
pickFreeAddr
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 callers
Method
removeOldest
()
groupcache.go:451
↓ 1 callers
Method
setView
(v ByteView)
sinks.go:57
↓ 1 callers
Function
testKeys
(n int)
http_test.go:106
Method
At
At returns the byte at index i.
byteview.go:63
Function
BenchmarkGet128
(b *testing.B)
consistenthash/consistenthash_test.go:91
Function
BenchmarkGet32
(b *testing.B)
consistenthash/consistenthash_test.go:90
Function
BenchmarkGet512
(b *testing.B)
consistenthash/consistenthash_test.go:92
Function
BenchmarkGet8
(b *testing.B)
consistenthash/consistenthash_test.go:89
Method
ByteSlice
ByteSlice returns a copy of the data as a byte slice.
byteview.go:47
Function
ByteViewSink
ByteViewSink returns a Sink that populates a ByteView.
sinks.go:106
Method
CacheStats
CacheStats returns stats about the provided cache within the group.
groupcache.go:386
Method
Clear
Clear purges all stored items from the cache.
lru/lru.go:124
Method
Do
(key string, fn func() (interface{}, error))
groupcache_test.go:378
Method
Get
(ctx context.Context, in *pb.GetRequest, out *pb.GetResponse)
http.go:195
Method
Get
(_ context.Context, in *pb.GetRequest, out *pb.GetResponse)
groupcache_test.go:234
Method
Get
(ctx context.Context, key string, dest Sink)
groupcache.go:54
Method
Get
Get looks up a key's value from the cache.
lru/lru.go:74
Method
Get
Get gets the closest item in the hash to the provided key.
consistenthash/consistenthash.go:65
Method
GetBytes
()
testpb/test.pb.go:102
Method
GetCacheHits
()
testpb/test.pb.go:156
Method
GetCity
()
testpb/test.pb.go:33
Method
GetEvicts
()
testpb/test.pb.go:123
Method
GetFills
()
testpb/test.pb.go:163
Method
GetGets
()
testpb/test.pb.go:109
Method
GetGets
()
testpb/test.pb.go:149
Method
GetHits
()
testpb/test.pb.go:116
Method
GetHotCache
()
testpb/test.pb.go:184
Method
GetItems
()
testpb/test.pb.go:95
Method
GetLoads
()
testpb/test.pb.go:198
Method
GetLocalLoads
()
testpb/test.pb.go:219
next →
1–100 of 191, ranked by callers