Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { Wg *sync.WaitGroup SendCb func() // SendCb is called before sending a msg iff not nil. RecvCb func() // RecvCb is called after handling a msg iff not nil. // contains filtered or unexported fields }
Node is used in the simulations and represents a node in the network. A Node can be connected to other peers. Connections are unidirectional, meaning that if NodeA is connected to NodeB, NodeB will receive messages from NodeA.
func (*Node) WithDebug ¶
func (n *Node) WithDebug(fn NodeDebugFn) *Node
type NodeDebugFn ¶
Click to show internal directories.
Click to hide internal directories.