Discover Packages
github.com/aliexpressru/gomemcached
pool
package
Version:
v0.2.1
Opens a new window with list of versions in this module.
Published: Feb 19, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
var (
ErrClosedPool = fmt .Errorf ("pool is closed")
ErrNewFuncNil = fmt .Errorf ("newFunc for pool is nil, can not create connection")
ErrAcquireTimeout = fmt .Errorf ("timeout for Acquire from the pool. Need to increase the maxCap for pool")
)
Pool common connection pool
New create a pool with capacity
Close is closed a connection
Destroy close all connections and deactivate the pool
Get returns a conn from store or create one
Len returns current connections in pool
Pop return available conn without block
Put set back conn into store again
Source Files
¶
Click to show internal directories.
Click to hide internal directories.