Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewmessageBusLockerMock ¶ added in v0.7.5
NewmessageBusLockerMock returns a mock for github.com/insolar/insolar/network/state.messageBusLocker
Types ¶
type NetworkSwitcher ¶
type NetworkSwitcher struct { NodeNetwork core.NodeNetwork `inject:""` SwitcherWorkAround core.SwitcherWorkAround `inject:""` MBLocker messageBusLocker `inject:""` // contains filtered or unexported fields }
NetworkSwitcher is a network FSM using for bootstrapping
func NewNetworkSwitcher ¶
func NewNetworkSwitcher() (*NetworkSwitcher, error)
NewNetworkSwitcher creates new NetworkSwitcher
func (*NetworkSwitcher) Acquire ¶ added in v0.7.5
func (ns *NetworkSwitcher) Acquire(ctx context.Context)
Acquire increases lock counter and locks message bus if it wasn't lock before
func (*NetworkSwitcher) GetState ¶
func (ns *NetworkSwitcher) GetState() core.NetworkState
GetState method returns current network state
func (*NetworkSwitcher) OnPulse ¶
OnPulse method checks current state and finds out reasons to update this state
func (*NetworkSwitcher) Release ¶ added in v0.7.5
func (ns *NetworkSwitcher) Release(ctx context.Context)
Release decreases lock counter and unlocks message bus if it wasn't lock by someone else
Click to show internal directories.
Click to hide internal directories.