pools

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2020 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnPools

type ConnPools struct {
	sync.RWMutex
	P           map[string]*pool.ConnPool
	MaxConns    int
	MaxIdle     int
	ConnTimeout int
	CallTimeout int
}

ConnPools is responsible for the Connection Pool lifecycle management.

func NewConnPools

func NewConnPools(maxConns, maxIdle, connTimeout, callTimeout int, cluster []string) *ConnPools

func (*ConnPools) Call

func (cp *ConnPools) Call(addr, method string, args interface{}, resp interface{}) error

Call will block until request failed or timeout.

func (*ConnPools) Get

func (cp *ConnPools) Get(address string) (*pool.ConnPool, bool)

func (*ConnPools) UpdatePools

func (cp *ConnPools) UpdatePools(addrs []string) []string

type OpenTsdbClient added in v1.4.0

type OpenTsdbClient struct {
	// contains filtered or unexported fields
}

func (OpenTsdbClient) Close added in v1.4.0

func (t OpenTsdbClient) Close() error

func (OpenTsdbClient) Closed added in v1.4.0

func (t OpenTsdbClient) Closed() bool

func (OpenTsdbClient) Name added in v1.4.0

func (t OpenTsdbClient) Name() string

type OpenTsdbConnPoolHelper added in v1.4.0

type OpenTsdbConnPoolHelper struct {
	// contains filtered or unexported fields
}

func NewOpenTsdbConnPoolHelper added in v1.4.0

func NewOpenTsdbConnPoolHelper(address string, maxConns, maxIdle, connTimeout, callTimeout int) *OpenTsdbConnPoolHelper

func (*OpenTsdbConnPoolHelper) Send added in v1.4.0

func (t *OpenTsdbConnPoolHelper) Send(data []byte) (err error)

type RpcClient

type RpcClient struct {
	// contains filtered or unexported fields
}

RpcClient implements the io.Closer interface

func (RpcClient) Call

func (rc RpcClient) Call(method string, args, reply interface{}) error

func (RpcClient) Close

func (rc RpcClient) Close() error

func (RpcClient) Closed

func (rc RpcClient) Closed() bool

func (RpcClient) Name

func (rc RpcClient) Name() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL