Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionInfo ¶
type ConnectionInfo struct { Conns []*grpc.ClientConn // connections Index int64 // index of the next connection }
connection info
type ConnectionPool ¶
type ConnectionPool struct {
// contains filtered or unexported fields
}
connection pool
func NewConnectionPool ¶
func NewConnectionPool() *ConnectionPool
func (*ConnectionPool) GetConnection ¶
func (connPool *ConnectionPool) GetConnection(ctx context.Context, addr string) (*grpc.ClientConn, error)
get connection from pool
func (*ConnectionPool) Init ¶
func (connPool *ConnectionPool) Init(clientOpts []grpc.DialOption) error
init connection pool
Click to show internal directories.
Click to hide internal directories.