sharedconn

package
v0.0.0-...-be15534 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StatusIsEOF

func StatusIsEOF(status *grpcstatus.Status) bool

StatusIsEOF checks whether status is caused by client send closing.

Types

type Conn

type Conn struct {
	*grpc.ClientConn
	// contains filtered or unexported fields
}

Conn is a connection.

type ConnAndClient

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

ConnAndClient indicates a connection and a EventFeedV2 client.

func (*ConnAndClient) Client

Client gets an EventFeedV2 client.

func (*ConnAndClient) Multiplexing

func (c *ConnAndClient) Multiplexing() bool

Multiplexing indicates whether the client can be used for multiplexing or not.

func (*ConnAndClient) Release

func (c *ConnAndClient) Release()

Release releases a ConnAndClient object.

type ConnAndClientPool

type ConnAndClientPool struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ConnAndClientPool is a pool of ConnAndClient.

func NewConnAndClientPool

func NewConnAndClientPool(
	credential *security.Credential,
	grpcMetrics *grpc_prometheus.ClientMetrics,
	maxStreamsPerConn ...int,
) *ConnAndClientPool

NewConnAndClientPool creates a new ConnAndClientPool.

func (*ConnAndClientPool) Connect

func (c *ConnAndClientPool) Connect(ctx context.Context, addr string) (cc *ConnAndClient, err error)

Connect connects to addr.

Jump to

Keyboard shortcuts

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