conn

package
v1.68.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyRegistered = errors.New("client connection already registered")

ErrAlreadyRegistered indicates the client connection for a given storage has already been registered

View Source
var ErrConnectionNotFound = errors.New("client connection not found")

ErrConnectionNotFound indicates the connection for a given storage has not yet been registered

Functions

This section is empty.

Types

type ClientConnections

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

ClientConnections contains ready to use grpc client connections

func NewClientConnections

func NewClientConnections() *ClientConnections

NewClientConnections creates a new ClientConnections struct

func (*ClientConnections) GetConnection

func (c *ClientConnections) GetConnection(storageName string) (*grpc.ClientConn, error)

GetConnection gets the grpc client connection based on an address

func (*ClientConnections) RegisterNode

func (c *ClientConnections) RegisterNode(storageName, listenAddr, token string) error

RegisterNode will direct traffic to the supplied downstream connection when the storage location is encountered.

Jump to

Keyboard shortcuts

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