MCPcopy
hub / github.com/bradfitz/gomemcache / ServerSelector

Interface ServerSelector

memcache/selector.go:31–36  ·  view source on GitHub ↗

ServerSelector is the interface that selects a memcache server as a function of the item's key. All ServerSelector implementations must be safe for concurrent use by multiple goroutines.

Source from the content-addressed store, hash-verified

29// All ServerSelector implementations must be safe for concurrent use
30// by multiple goroutines.
31type ServerSelector interface {
32 // PickServer returns the server address that a given item
33 // should be shared onto.
34 PickServer(key string) (net.Addr, error)
35 Each(func(net.Addr) error) error
36}
37
38// ServerList is a simple ServerSelector. Its zero value is usable.
39type ServerList struct {

Callers 5

onItemMethod · 0.65
withKeyAddrMethod · 0.65
GetMultiMethod · 0.65
FlushAllMethod · 0.65
PingMethod · 0.65

Implementers 1

ServerListmemcache/selector.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…