MCPcopy Create free account
hub / github.com/bradfitz/gomemcache / Each

Method Each

memcache/selector.go:93–102  ·  view source on GitHub ↗

Each iterates over each server calling the given function

(f func(net.Addr) error)

Source from the content-addressed store, hash-verified

91
92// Each iterates over each server calling the given function
93func (ss *ServerList) Each(f func(net.Addr) error) error {
94 ss.mu.RLock()
95 defer ss.mu.RUnlock()
96 for _, a := range ss.addrs {
97 if err := f(a); nil != err {
98 return err
99 }
100 }
101 return nil
102}
103
104// keyBufPool returns []byte buffers for use by PickServer's call to
105// crc32.ChecksumIEEE to avoid allocations. (but doesn't avoid the

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected