goload_grpc

package
v0.0.0-...-7f6ced5 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionPool

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

func NewConnectionPool

func NewConnectionPool(
	count int,
	target string,
	opts ...grpc.DialOption,
) *ConnectionPool

Creates a new GRPC based connection pool for the given `target` and with the `opts` from GRPC.

The connections are safe to be used from multiple goroutines.

func (*ConnectionPool) Close

func (pool *ConnectionPool) Close()

Closes all of the connections in the pool

func (*ConnectionPool) Connection

func (pool *ConnectionPool) Connection() *grpc.ClientConn

Picks a random connection from the pool.

Jump to

Keyboard shortcuts

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