membership

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DummyMultiAddrs

func DummyMultiAddrs(membership map[t.NodeID]t.NodeAddress) (map[t.NodeID]t.NodeAddress, error)

DummyMultiAddrs returns a set of libp2p multiaddresses based on the given membership, generating host keys deterministically based on node IDs. The node IDs must be convertable to numbers, otherwise DummyMultiAddrs returns an error.

func FromFile

func FromFile(f *os.File) (map[t.NodeID]t.NodeAddress, error)

func FromFileName

func FromFileName(fileName string) (map[t.NodeID]t.NodeAddress, error)

func GetIDs

func GetIDs(membership map[t.NodeID]t.NodeAddress) []t.NodeID

func GetIPs

func GetIPs(membership map[t.NodeID]t.NodeAddress) (map[t.NodeID]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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