state

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkSwitcher

type NetworkSwitcher struct {
	NodeNetwork        core.NodeNetwork        `inject:""`
	Certificate        core.Certificate        `inject:""`
	SwitcherWorkAround core.SwitcherWorkAround `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) 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

Jump to

Keyboard shortcuts

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