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 int MaxIdle int Cnt 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 int MaxIdle int ConnTimeout int CallTimeout int }
ConnPools Manager
func CreateSafeRpcConnPools ¶
func CreateSafeRpcConnPools(maxConns, maxIdle, connTimeout, callTimeout int, cluster []string) *SafeRpcConnPools
func (*SafeRpcConnPools) Call ¶
func (this *SafeRpcConnPools) Call(addr, method string, args interface{}, resp interface{}) error
同步发送, 完成发送或超时后 才能返回
func (*SafeRpcConnPools) Destroy ¶
func (this *SafeRpcConnPools) Destroy()
func (*SafeRpcConnPools) Proc ¶
func (this *SafeRpcConnPools) Proc() []string
type TsdbClient ¶
type TsdbClient struct {
// contains filtered or unexported fields
}
TSDB
func (TsdbClient) Close ¶
func (this TsdbClient) Close() error
func (TsdbClient) Closed ¶
func (this TsdbClient) Closed() bool
func (TsdbClient) Name ¶
func (this TsdbClient) Name() string
type TsdbConnPoolHelper ¶
type TsdbConnPoolHelper struct {
// contains filtered or unexported fields
}
func NewTsdbConnPoolHelper ¶
func NewTsdbConnPoolHelper(address string, maxConns, maxIdle, connTimeout, callTimeout int) *TsdbConnPoolHelper
func (*TsdbConnPoolHelper) Destroy ¶
func (this *TsdbConnPoolHelper) Destroy()
func (*TsdbConnPoolHelper) Send ¶
func (this *TsdbConnPoolHelper) Send(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.