pools

package
v4.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

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

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

func (OpenTsdbClient) Close

func (t OpenTsdbClient) Close() error

func (OpenTsdbClient) Closed

func (t OpenTsdbClient) Closed() bool

func (OpenTsdbClient) Name

func (t OpenTsdbClient) Name() string

type OpenTsdbConnPoolHelper

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

func NewOpenTsdbConnPoolHelper

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

func (*OpenTsdbConnPoolHelper) Send

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