peermanager

package
v0.5.20 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CName = "common.commonspace.peermanager"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerManager

type PeerManager interface {
	app.Component
	// GetResponsiblePeers dials or gets from cache responsible peers
	GetResponsiblePeers(ctx context.Context) (peers []peer.Peer, err error)
	// GetNodePeers dials or gets from cache node peers
	GetNodePeers(ctx context.Context) (peers []peer.Peer, err error)
	// BroadcastMessage sends message to all peers
	BroadcastMessage(ctx context.Context, msg drpc.Message) error
	// SendMessage sends message to peer
	SendMessage(ctx context.Context, peerId string, msg drpc.Message) error
	// KeepAlive sends keepAlive messages to needed peers
	KeepAlive(ctx context.Context)
}

type PeerManagerProvider

type PeerManagerProvider interface {
	app.Component
	NewPeerManager(ctx context.Context, spaceId string) (sm PeerManager, err error)
}

Directories

Path Synopsis
Package mock_peermanager is a generated GoMock package.
Package mock_peermanager is a generated GoMock package.

Jump to

Keyboard shortcuts

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