StaticPeerTopology

org.sigilaris.node.gossip.StaticPeerTopology
See theStaticPeerTopology companion class

Companion for StaticPeerTopology providing parsing from raw strings.

Attributes

Companion
class
Source
PeerRegistry.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def fromValidated(localNodeIdentity: PeerIdentity, knownPeers: Set[PeerIdentity], directNeighbors: Set[PeerIdentity]): Either[String, StaticPeerTopology]

Builds a topology from already-validated peer identities.

Builds a topology from already-validated peer identities.

Attributes

Source
PeerRegistry.scala
def parse(localNodeIdentity: String, knownPeers: List[String], directNeighbors: List[String]): Either[String, StaticPeerTopology]

Parses a static peer topology from raw string values, validating that direct neighbors are a subset of known peers and the local node is not in known peers.

Parses a static peer topology from raw string values, validating that direct neighbors are a subset of known peers and the local node is not in known peers.

Value parameters

directNeighbors

the list of direct neighbor identity strings

knownPeers

the list of known peer identity strings

localNodeIdentity

the local node identity string

Attributes

Returns

the validated topology, or an error message

Source
PeerRegistry.scala