pool

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

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

Go to latest
Published: Jul 7, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClosed = errors.New("pool is closed")
)

Functions

This section is empty.

Types

type Factory

type Factory func() (*grpc.ClientConn, error)

type Pool

type Pool interface {
	Get() (PoolConn, error)
	Close()
	Len() int
}

func NewChannelPool

func NewChannelPool(initialCap, maxCap int, factory Factory) (Pool, error)

type PoolConn

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

func (PoolConn) Close

func (p PoolConn) Close() error

Jump to

Keyboard shortcuts

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