connectionpool

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

func (*Connection) GetConnStatus added in v1.0.1

func (t *Connection) GetConnStatus() connectivity.State

func (*Connection) GetGRPCConn

func (t *Connection) GetGRPCConn() *grpc.ClientConn

func (*Connection) GetId

func (t *Connection) GetId() uint64

func (*Connection) GetIdledMilliTimestamp added in v1.0.1

func (t *Connection) GetIdledMilliTimestamp() int64

func (*Connection) GetTarget

func (t *Connection) GetTarget() string

func (*Connection) GetUsingStatus added in v1.0.1

func (t *Connection) GetUsingStatus() uintptr

func (*Connection) GetUsingStatusDesc added in v1.0.1

func (t *Connection) GetUsingStatusDesc() string

func (*Connection) IsIdleUsingStatus added in v1.0.1

func (t *Connection) IsIdleUsingStatus() bool

type ConnectionPool

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

func NewConnectionPool

func NewConnectionPool(kw KwArgsConnPool) (*ConnectionPool, error)

func (*ConnectionPool) AllocateConnection added in v1.0.1

func (t *ConnectionPool) AllocateConnection() (retConn *Connection, retErr error)

func (*ConnectionPool) GetBusyConnectionsCount added in v1.0.1

func (t *ConnectionPool) GetBusyConnectionsCount() int32

func (*ConnectionPool) GetConnectionsCount added in v1.0.1

func (t *ConnectionPool) GetConnectionsCount() int

func (*ConnectionPool) GetIdledConnectionsCount added in v1.0.1

func (t *ConnectionPool) GetIdledConnectionsCount() int32

func (*ConnectionPool) GetReadyConnectionsCount added in v1.0.1

func (t *ConnectionPool) GetReadyConnectionsCount() (retCount int)

func (*ConnectionPool) GetStatus added in v1.0.1

func (t *ConnectionPool) GetStatus() uintptr

func (*ConnectionPool) GetUsingStatusConnectionsCount added in v1.0.1

func (t *ConnectionPool) GetUsingStatusConnectionsCount(usingStatus uintptr) (retCount int)

func (*ConnectionPool) RecycleConnection

func (t *ConnectionPool) RecycleConnection(conn *Connection) error

func (*ConnectionPool) Start

func (t *ConnectionPool) Start() error

func (*ConnectionPool) Stop

func (t *ConnectionPool) Stop(disableClean bool) error

type KwArgsConnPool added in v1.0.1

type KwArgsConnPool struct {
	Target   string
	DialOpts []grpc.DialOption

	NewConnTimeout time.Duration

	MaxConnNum                   int
	MinIdledConnNum              int
	MaxIdledDurationMilliseconds uint64
	CheckIdledConnNumInterval    time.Duration
}

Jump to

Keyboard shortcuts

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