networkcoordinator

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkCoordinator

type NetworkCoordinator struct {
	Certificate         core.Certificate         `inject:""`
	NetworkSwitcher     core.NetworkSwitcher     `inject:""`
	ContractRequester   core.ContractRequester   `inject:""`
	GenesisDataProvider core.GenesisDataProvider `inject:""`
	// contains filtered or unexported fields
}

NetworkCoordinator encapsulates logic of network configuration

func New

func New() (*NetworkCoordinator, error)

New creates new NetworkCoordinator

func (*NetworkCoordinator) GetCert added in v0.6.3

func (nc *NetworkCoordinator) GetCert(ctx context.Context, nodeRef core.RecordRef) (core.Certificate, error)

GetCert method returns node certificate

func (*NetworkCoordinator) Init added in v0.6.3

func (nc *NetworkCoordinator) Init(ctx context.Context) error

Init implements interface of Component

func (*NetworkCoordinator) SetPulse added in v0.6.3

func (nc *NetworkCoordinator) SetPulse(ctx context.Context, pulse core.Pulse) error

SetPulse writes pulse data on local storage

func (*NetworkCoordinator) ValidateCert added in v0.6.3

func (nc *NetworkCoordinator) ValidateCert(ctx context.Context, certificate core.Certificate) (bool, error)

ValidateCert validates node certificate

func (*NetworkCoordinator) WriteActiveNodes

func (nc *NetworkCoordinator) WriteActiveNodes(ctx context.Context, number core.PulseNumber, activeNodes []core.Node) error

WriteActiveNodes writes active nodes to ledger

Jump to

Keyboard shortcuts

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