redundancy

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilMessenger = errors.New("nil messenger")

ErrNilMessenger signals that a nil messenger has been provided

View Source
var ErrNilObserverPrivateKey = errors.New("nil observer private key")

ErrNilObserverPrivateKey signals that a nil observer private key has been provided

Functions

func NewBootstrapNodeRedundancy

func NewBootstrapNodeRedundancy(nodePrivateKey crypto.PrivateKey) (*bootstrapNodeRedundancy, error)

NewBootstrapNodeRedundancy returns a new instance of bootstrapNodeRedundancy It should be used for bootstrap only!

func NewNodeRedundancy

func NewNodeRedundancy(arg ArgNodeRedundancy) (*nodeRedundancy, error)

NewNodeRedundancy creates a node redundancy object which implements NodeRedundancyHandler interface

Types

type ArgNodeRedundancy

type ArgNodeRedundancy struct {
	MaxRoundsOfInactivity int
	Messenger             P2PMessenger
	ObserverPrivateKey    crypto.PrivateKey
}

ArgNodeRedundancy represents the DTO structure used by the nodeRedundancy's constructor

type P2PMessenger

type P2PMessenger interface {
	ID() core.PeerID
	IsInterfaceNil() bool
}

P2PMessenger defines a subset of the p2p.Messenger interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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