rpc

package
v0.0.0-...-b39efbf Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCConnection

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

GRPCConnection manages all grpc connections

func NewGRPCConnection

func NewGRPCConnection() *GRPCConnection

NewGRPCConnection creates a new GRPCConnection instance

func (*GRPCConnection) Close

func (g *GRPCConnection) Close(ctx context.Context, address string) error

Close recieves a connection and closes it

func (*GRPCConnection) Connect

func (g *GRPCConnection) Connect(ctx context.Context, address string) (*grpc.ClientConn, error)

Connect connects to an `address` and stores it in the internal map

func (*GRPCConnection) GetConnection

func (g *GRPCConnection) GetConnection(address string) *grpc.ClientConn

GetConnection receives a address and returns its connection. If a connection is not available return nil

func (*GRPCConnection) Shutdown

func (g *GRPCConnection) Shutdown() []error

Shutdown closes all the connections

Jump to

Keyboard shortcuts

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