networkcoordinator

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinator added in v0.7.5

type Coordinator interface {
	// GetCert returns certificate object by node reference, using discovery nodes for signing
	GetCert(context.Context, *core.RecordRef) (core.Certificate, error)

	// SetPulse uses PulseManager component for saving pulse info
	SetPulse(ctx context.Context, pulse core.Pulse) error
	// contains filtered or unexported methods
}

Coordinator interface contains NetworkState dependent methods

type NetworkCoordinator

type NetworkCoordinator struct {
	CertificateManager core.CertificateManager  `inject:""`
	NetworkSwitcher    core.NetworkSwitcher     `inject:""`
	ContractRequester  core.ContractRequester   `inject:""`
	MessageBus         core.MessageBus          `inject:""`
	CS                 core.CryptographyService `inject:""`
	PS                 core.PulseStorage        `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, registeredNodeRef *core.RecordRef) (core.Certificate, error)

GetCert method returns node certificate by requesting sign from discovery nodes

func (*NetworkCoordinator) IsStarted added in v0.7.5

func (nc *NetworkCoordinator) IsStarted() bool

IsStarted returns true if component was started and false in other way

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) Start

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

Start implements interface of Component

func (*NetworkCoordinator) ValidateCert added in v0.6.3

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

ValidateCert validates node certificate

Jump to

Keyboard shortcuts

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