networkbuilder

package
v0.0.0-...-91837a0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: BSD-3-Clause Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Network

type Network struct {
	Nodes map[string]*Node
	// contains filtered or unexported fields
}

Network defines the Network structure of the Nodes in the Topology

func New

func New() *Network

New creates the Network builder

func (*Network) AddNode

func (n *Network) AddNode(node *Node) *Network

func (*Network) ConnectedBTNodeIDs

func (n *Network) ConnectedBTNodeIDs(btNodeID string) *Network

func (*Network) GetConnectedBTNodeIDs

func (n *Network) GetConnectedBTNodeIDs() string

func (*Network) GetNumBootstrapNodes

func (n *Network) GetNumBootstrapNodes() int

func (*Network) GetSnowQuorumSize

func (n *Network) GetSnowQuorumSize() int

func (*Network) GetSnowSampleSize

func (n *Network) GetSnowSampleSize() int

func (*Network) GetTxFee

func (n *Network) GetTxFee() uint64

func (*Network) HasBootstrapNodes

func (n *Network) HasBootstrapNodes(b bool) *Network

func (*Network) Image

func (n *Network) Image(image string) *Network

func (*Network) RemoveNode

func (n *Network) RemoveNode(node *Node) *Network

func (*Network) SnowSize

func (n *Network) SnowSize(snowSampleSize int, snowQuorumSize int) *Network

func (*Network) TxFee

func (n *Network) TxFee(txFee uint64) *Network

type Node

type Node struct {
	ID string
	// contains filtered or unexported fields
}

func NewNode

func NewNode(nodeID string) *Node

func (*Node) BootstrapAttempts

func (node *Node) BootstrapAttempts(i int) *Node

func (*Node) BootstrapNode

func (node *Node) BootstrapNode(bootstrap bool) *Node

func (*Node) BootstrapNodeID

func (node *Node) BootstrapNodeID(i int) *Node

func (*Node) ConnectedBTNodeIDs

func (node *Node) ConnectedBTNodeIDs(btNodes string) *Node

func (*Node) GetBootstrapAttempts

func (node *Node) GetBootstrapAttempts() int

func (*Node) GetBootstrapNodeID

func (node *Node) GetBootstrapNodeID() int

func (*Node) GetConnectedBTNodeIDs

func (node *Node) GetConnectedBTNodeIDs() string

func (*Node) GetHTTPPort

func (node *Node) GetHTTPPort() int

func (*Node) GetImage

func (node *Node) GetImage() string

func (*Node) GetPrivateKey

func (node *Node) GetPrivateKey() string

func (*Node) GetStaking

func (node *Node) GetStaking() bool

func (*Node) GetStakingPort

func (node *Node) GetStakingPort() int

func (*Node) GetTLSCert

func (node *Node) GetTLSCert() string

func (*Node) HasCerts

func (node *Node) HasCerts() bool

func (*Node) Image

func (node *Node) Image(imageName string) *Node

func (*Node) IsBootstrapNode

func (node *Node) IsBootstrapNode() bool

func (*Node) IsStaking

func (node *Node) IsStaking(b bool) *Node

func (*Node) PrivateKey

func (node *Node) PrivateKey(key string) *Node

func (*Node) String

func (node *Node) String() string

func (*Node) TLSCert

func (node *Node) TLSCert(cert string) *Node

Jump to

Keyboard shortcuts

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