networkcoordinator

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 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 NetworkCoordinator

type NetworkCoordinator struct {
	// contains filtered or unexported fields
}

NetworkCoordinator encapsulates logic of network configuration

func New

func New() (*NetworkCoordinator, error)

New creates new NetworkCoordinator

func (*NetworkCoordinator) Authorize

func (nc *NetworkCoordinator) Authorize(nodeRef core.RecordRef, seed []byte, signatureRaw []byte) (string, core.NodeRole, error)

Authorize authorizes node by verifying it's signature

func (*NetworkCoordinator) RegisterNode

func (nc *NetworkCoordinator) RegisterNode(publicKey string, role string) (*core.RecordRef, error)

RegisterNode registers node in nodedomain

func (*NetworkCoordinator) Start

func (nc *NetworkCoordinator) Start(c core.Components) error

Start implements interface of Component

func (*NetworkCoordinator) Stop

func (nc *NetworkCoordinator) Stop() error

Stop implements interface of Component

func (*NetworkCoordinator) WriteActiveNodes

func (nc *NetworkCoordinator) WriteActiveNodes(number core.PulseNumber, activeNodes []*core.ActiveNode) error

WriteActiveNodes write active nodes to ledger

Jump to

Keyboard shortcuts

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