package internal

import "cloud.google.com/go/bigtable/internal/transport"

Index

Types

type BigtableChannelPool

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

BigtableChannelPool implements ConnPool and routes requests to the connection pool according to load balancing strategy.

To benefit from automatic load tracking, use the Invoke and NewStream methods directly on the BigtableChannelPool instance.

func NewBigtableChannelPool

func NewBigtableChannelPool(connPoolSize int, strategy btopt.LoadBalancingStrategy, dial func() (*grpc.ClientConn, error)) (*BigtableChannelPool, error)

NewBigtableChannelPool creates a pool of connPoolSize and takes the dial func()

func (*BigtableChannelPool) Close

func (p *BigtableChannelPool) Close() error

Close closes all connections in the pool.

func (*BigtableChannelPool) Conn

func (p *BigtableChannelPool) Conn() *grpc.ClientConn

Conn provides connbased on selectfunc()

func (*BigtableChannelPool) Invoke

func (p *BigtableChannelPool) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error

Invoke selects the least loaded connection and calls Invoke on it. This method provides automatic load tracking.

func (*BigtableChannelPool) NewStream

func (p *BigtableChannelPool) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)

NewStream selects the least loaded connection and calls NewStream on it. This method provides automatic load tracking via a wrapped stream.

func (*BigtableChannelPool) Num

func (p *BigtableChannelPool) Num() int

Num returns the number of connections in the pool.

Source Files

connpool.go

Version
v1.41.0 (latest)
Published
Dec 15, 2025
Platform
linux/amd64
Imports
8 packages
Last checked
4 months ago

Tools for package owners.