state

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: Apache-2.0, BSD-3-Clause-Clear Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewmessageBusLockerMock added in v0.7.5

func NewmessageBusLockerMock(t minimock.Tester) *messageBusLockerMock

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

func (ns *NetworkSwitcher) OnPulse(ctx context.Context, pulse core.Pulse) error

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

Jump to

Keyboard shortcuts

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