grpcpool

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

README

grpc-pool

Create a pool of dialed channels and use them in a pooled manner.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	Close() error
	Get() *grpc.ClientConn
}

type ConnectionPool

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

func NewConnectionPool added in v0.0.2

func NewConnectionPool(activeCount int, dialFunc func() (*grpc.ClientConn, error)) (*ConnectionPool, error)

func (*ConnectionPool) Close

func (self *ConnectionPool) Close()

func (*ConnectionPool) Get

func (self *ConnectionPool) Get() (Connection, error)

type GrpcConnection

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

func (*GrpcConnection) Close

func (self *GrpcConnection) Close() error

func (*GrpcConnection) Get

func (self *GrpcConnection) Get() *grpc.ClientConn

type Pool

type Pool interface {
	Get() (Connection, error)
	Close()
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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