grpcpool

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConn = errors.New("invalid connection")
)

Functions

This section is empty.

Types

type GRPCPool

type GRPCPool struct {
	sync.RWMutex
	// contains filtered or unexported fields
}
var (
	Pool GRPCPool
)

func (*GRPCPool) Get

func (p *GRPCPool) Get(addr string) (*grpc.ClientConn, error)

func (*GRPCPool) Put

func (p *GRPCPool) Put(addr string, conn *grpc.ClientConn) error

func (*GRPCPool) Release

func (p *GRPCPool) Release(addr string)

释放连接池

func (*GRPCPool) ReleaseAll

func (p *GRPCPool) ReleaseAll()

释放所有连接池

Jump to

Keyboard shortcuts

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