Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMaxConn = fmt.Errorf("maximum connections reached")
Functions ¶
This section is empty.
Types ¶
type ConnPool ¶
type ConnPool struct { sync.RWMutex Name string Address string MaxConns int32 MaxIdle int32 Cnt int64 Ts int64 New func(name string) (NConn, error) // contains filtered or unexported fields }
func NewConnPool ¶
func (*ConnPool) ForceClose ¶
type RpcClient ¶
type RpcClient struct {
// contains filtered or unexported fields
}
RpcCient, 要实现io.Closer接口
type SafeRpcConnPools ¶
type SafeRpcConnPools struct { sync.RWMutex M map[string]*ConnPool MaxConns int32 MaxIdle int32 ConnTimeout int32 CallTimeout int32 }
ConnPools Manager
func CreateSafeRpcConnPools ¶
func CreateSafeRpcConnPools(maxConns, maxIdle, connTimeout, callTimeout int32, cluster []string) *SafeRpcConnPools
func (*SafeRpcConnPools) Destroy ¶
func (this *SafeRpcConnPools) Destroy()
func (*SafeRpcConnPools) Proc ¶
func (this *SafeRpcConnPools) Proc() []string
Click to show internal directories.
Click to hide internal directories.