Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Network ¶
type Network struct { p2p.ReadyDoneAwareNetwork // contains filtered or unexported fields }
Network is the splitter network. It is a wrapper around the default network implementation and should be passed in to engine constructors that require a network to register with. When an engine is registered with the splitter network, a splitter engine is created for the given channel (if one doesn't already exist) and the engine is registered with that splitter engine. As a result, multiple engines can register with the splitter network on the same channel and will each receive all events on that channel.
func NewNetwork ¶
NewNetwork returns a new splitter network.
func (*Network) Done ¶
func (n *Network) Done() <-chan struct{}
Done returns a done channel that is closed once the network has fully stopped. For the splitter network, this is true once the wrapped network has stopped.
func (*Network) Ready ¶
func (n *Network) Ready() <-chan struct{}
Ready returns a ready channel that is closed once the network has fully started. For the splitter network, this is true once the wrapped network has started.