net

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(address Address) (*grpc.ClientConn, error)

Connect creates a gRPC client connection to the given address

Types

type Address

type Address string

Address is the address of a partition

type Conns

type Conns struct {
	Address Address
	// contains filtered or unexported fields
}

Conns is a gRPC client connection manager

func NewConns

func NewConns(address Address) *Conns

NewConns returns a new gRPC client connection manager

func (*Conns) Close

func (c *Conns) Close() error

Close closes the connections

func (*Conns) Connect

func (c *Conns) Connect() (*grpc.ClientConn, error)

Connect gets the connection to the service

func (*Conns) Reconnect

func (c *Conns) Reconnect(leader Address)

Reconnect reconnects the client to the given leader if necessary

Jump to

Keyboard shortcuts

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