connectionmanager

package
v0.0.0-...-37eefcc Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNodeNotPresent = errors.New("node not present")
)

Functions

This section is empty.

Types

type ConnectionManager

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

func CreateConnectionManager

func CreateConnectionManager(log *zap.Logger, rpcTimeout time.Duration) *ConnectionManager

CreateConnectionManager returns the connection manager It does not initialise the connections. This will have to be done by using the AddNewConnection

func (*ConnectionManager) Add

func (cm *ConnectionManager) Add(serverID string, address string) error

Adds new connection to the connection manager

func (*ConnectionManager) CheckHealth

func (cm *ConnectionManager) CheckHealth(nodeId dht.NodeID) bool

func (*ConnectionManager) Close

func (cm *ConnectionManager) Close()

Closes all the connections maintained by the connection manager

func (*ConnectionManager) GetJobStore

func (cm *ConnectionManager) GetJobStore(nodeID dht.NodeID) (js.JobStoreWithReplicator, error)

GetJobStore returns an existing job store client

Jump to

Keyboard shortcuts

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