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 Username string Password string Database string Precision string New func(name string) (NConn, error) // contains filtered or unexported fields }
func NewConnPool ¶
func (*ConnPool) ForceClose ¶
type InfluxdbClient ¶
type InfluxdbClient struct { Address string Username string Password string Database string UserAgent string Precision string Timeout time.Duration UDPPayload int `toml:"udp_payload"` // contains filtered or unexported fields }
func (InfluxdbClient) Close ¶
func (this InfluxdbClient) Close() error
func (InfluxdbClient) Closed ¶
func (this InfluxdbClient) Closed() bool
func (*InfluxdbClient) Connect ¶
func (this *InfluxdbClient) Connect() error
func (InfluxdbClient) Name ¶
func (this InfluxdbClient) Name() string
func (*InfluxdbClient) Write ¶
func (this *InfluxdbClient) Write(points []*client.Point) error
influx write
type InfluxdbConnPoolHelper ¶
type InfluxdbConnPoolHelper struct { sync.RWMutex M map[string]*ConnPool MaxConns int MaxIdle int ConnTimeout int CallTimeout int }
func CreateInfluxdbCliPools ¶
func CreateInfluxdbCliPools(maxConns, maxIdle, connTimeout, callTimeout int, cluster []string) *InfluxdbConnPoolHelper
func (*InfluxdbConnPoolHelper) Destroy ¶
func (this *InfluxdbConnPoolHelper) Destroy()
func (*InfluxdbConnPoolHelper) Get ¶
func (this *InfluxdbConnPoolHelper) Get(address string) (*ConnPool, bool)
func (*InfluxdbConnPoolHelper) Proc ¶
func (this *InfluxdbConnPoolHelper) Proc() []string
func (*InfluxdbConnPoolHelper) Send ¶
func (this *InfluxdbConnPoolHelper) Send(addr string, points []*client.Point) (err error)
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
Click to show internal directories.
Click to hide internal directories.