pachyderm: Index | Files

package pool

import ""


Package Files


type Pool Uses

type Pool struct {
    // contains filtered or unexported fields

Pool stores a pool of grpc connections to a k8s service, it's useful in places where you would otherwise need to keep recreating connections.

func NewPool Uses

func NewPool(kubeClient *kube.Clientset, namespace string, serviceName string, port int, queueSize int64, opts ...grpc.DialOption) (*Pool, error)

NewPool creates a new connection pool with connections to pods in the given service.

func (*Pool) Close Uses

func (p *Pool) Close() error

Close closes all connections stored in the pool, it returns an error if any of the calls to Close error.

func (*Pool) Do Uses

func (p *Pool) Do(ctx context.Context, f func(cc *grpc.ClientConn) error) error

Do allows you to do something with a grpc.ClientConn. Errors returned from f will be returned by Do.

Package pool imports 9 packages (graph). Updated 2019-03-04. Refresh now. Tools for package owners.