Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMaxConn = fmt.Errorf("maximum connections reached")
Functions ¶
This section is empty.
Types ¶
type ClusteredConnPool ¶
ConnPools Manager
func CreateClusteredConnPool ¶
func CreateClusteredConnPool(connPoolFactory func(addr string) *ConnPool, cluster []string) *ClusteredConnPool
func (*ClusteredConnPool) Call ¶
func (this *ClusteredConnPool) Call(addr string, arg interface{}) (interface{}, error)
同步发送, 完成发送或超时后 才能返回
func (*ClusteredConnPool) Destroy ¶
func (this *ClusteredConnPool) Destroy()
func (*ClusteredConnPool) Get ¶
func (this *ClusteredConnPool) Get(address string) (*ConnPool, bool)
func (*ClusteredConnPool) Stats ¶
func (this *ClusteredConnPool) Stats() []*ConnPoolStats
type ConnPool ¶
type ConnPool struct { sync.RWMutex Name string Address string MaxConns int MaxIdle int ConnTimeout int CallTimeout int Cnt int64 New func(name string, pool *ConnPool) (PoolClient, error) // contains filtered or unexported fields }
func NewConnPool ¶
func (*ConnPool) Fetch ¶
func (this *ConnPool) Fetch() (PoolClient, error)
func (*ConnPool) ForceClose ¶
func (this *ConnPool) ForceClose(conn PoolClient)
func (*ConnPool) Release ¶
func (this *ConnPool) Release(conn PoolClient)
func (*ConnPool) Stats ¶
func (this *ConnPool) Stats() *ConnPoolStats
type ConnPoolStats ¶
func (*ConnPoolStats) String ¶
func (this *ConnPoolStats) String() string
Click to show internal directories.
Click to hide internal directories.