MCPcopy Index your code
hub / github.com/dropbox/godropbox / NewMultiConnectionPool

Function NewMultiConnectionPool

net2/base_connection_pool.go:82–88  ·  view source on GitHub ↗

This returns a connection pool that manages multiple (network, address) entries. The connections to each (network, address) entry acts independently. For example ("tcp", "localhost:11211") could act as memcache shard 0 and ("tcp", "localhost:11212") could act as memcache shard 1.

(options ConnectionOptions)

Source from the content-addressed store, hash-verified

80// independently. For example ("tcp", "localhost:11211") could act as memcache
81// shard 0 and ("tcp", "localhost:11212") could act as memcache shard 1.
82func NewMultiConnectionPool(options ConnectionOptions) ConnectionPool {
83 return newBaseConnectionPool(
84 options,
85 func(poolOptions rp.Options) rp.ResourcePool {
86 return rp.NewMultiResourcePool(poolOptions, nil)
87 })
88}
89
90// See ConnectionPool for documentation.
91func (p *connectionPoolImpl) NumActive() int32 {

Callers 1

InitMethod · 0.92

Calls 1

newBaseConnectionPoolFunction · 0.85

Tested by

no test coverage detected