orchestrator

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package orchestrator manages network node operations and database interactions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkDetails

type NetworkDetails struct {
	NetworkID string
	PeerID    string
	SwarmPort string
	SwarmKey  string
}

NetworkDetails provides information about an instantiated network

type NetworkDiagnostics

type NetworkDiagnostics struct {
	ipfs.NodeInfo
	ipfs.NodeStats
}

NetworkDiagnostics describe detailed statistics and information about a node

type NetworkStatus

type NetworkStatus struct {
	NetworkDetails
	Uptime    time.Duration
	DiskUsage int64
}

NetworkStatus denotes high-level details about requested network, intended for consumer use

type Orchestrator

type Orchestrator struct {
	Registry *registry.NodeRegistry
	// contains filtered or unexported fields
}

Orchestrator contains most primary application logic and manages node availability

func New

func New(logger *zap.SugaredLogger, address string, ports config.Ports, dev bool,
	c ipfs.NodeClient, networks temporal.PrivateNetworks) (*Orchestrator, error)

New instantiates and bootstraps a new Orchestrator

func (*Orchestrator) NetworkDiagnostics

func (o *Orchestrator) NetworkDiagnostics(ctx context.Context, network string) (NetworkDiagnostics, error)

NetworkDiagnostics retrieves detailed statistics and information about a node

func (*Orchestrator) NetworkDown

func (o *Orchestrator) NetworkDown(ctx context.Context, network string) error

NetworkDown brings a network offline

func (*Orchestrator) NetworkRemove

func (o *Orchestrator) NetworkRemove(ctx context.Context, network string) error

NetworkRemove removes network assets

func (*Orchestrator) NetworkStatus

func (o *Orchestrator) NetworkStatus(ctx context.Context, network string) (NetworkStatus, error)

NetworkStatus retrieves the status of the node for the given status

func (*Orchestrator) NetworkUp

func (o *Orchestrator) NetworkUp(ctx context.Context, network string) (NetworkDetails, error)

NetworkUp intializes a node for given network

func (*Orchestrator) NetworkUpdate

func (o *Orchestrator) NetworkUpdate(ctx context.Context, network string) error

NetworkUpdate updates given network's configuration from database

func (*Orchestrator) Run

func (o *Orchestrator) Run(ctx context.Context) error

Run initializes the orchestrator's background tasks. Cancelling the context will end the tasks and release the orchestrator's resources.

Jump to

Keyboard shortcuts

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