pool

package
v0.0.0-...-35fa672 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoConn = errors.New("no conn")
)

Functions

This section is empty.

Types

type GRPCPool

type GRPCPool struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

GRPCPool pool info

func Init

func Init(targets []string, timeout time.Duration) (*GRPCPool, error)

func (*GRPCPool) Get

func (c *GRPCPool) Get() (*grpc.ClientConn, error)

Get get from pool

func (*GRPCPool) PoolFactory

func (c *GRPCPool) PoolFactory() (*grpc.ClientConn, error)

Jump to

Keyboard shortcuts

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