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

Function New

memcache/memcache.go:122–126  ·  view source on GitHub ↗

New returns a memcache client using the provided server(s) with equal weight. If a server is listed multiple times, it gets a proportional amount of weight.

(server ...string)

Source from the content-addressed store, hash-verified

120// with equal weight. If a server is listed multiple times,
121// it gets a proportional amount of weight.
122func New(server ...string) *Client {
123 ss := new(ServerList)
124 ss.SetServers(server...)
125 return NewFromSelector(ss)
126}
127
128// NewFromSelector returns a new Client using the provided ServerSelector.
129func NewFromSelector(ss ServerSelector) *Client {

Callers 5

TestLocalhostFunction · 0.85
TestUnixSocketFunction · 0.85
TestFakeServerFunction · 0.85
TestTLSFunction · 0.85
BenchmarkOnItemFunction · 0.85

Calls 2

NewFromSelectorFunction · 0.85
SetServersMethod · 0.80

Tested by 5

TestLocalhostFunction · 0.68
TestUnixSocketFunction · 0.68
TestFakeServerFunction · 0.68
TestTLSFunction · 0.68
BenchmarkOnItemFunction · 0.68