manageos

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

README

dfuse EOSIO node manager

reference License

This service manages the execution of the nodeos binary as part of dfuse.

Installation

Build and run from here:

Overview

  1. Operator (process commands, owns the superviser, owns the http handlers that sends the commands to him)

  2. Superviser is the the one managing the actual blockchain software (nodeos, geth..). It is made of an embedded generic superviser struct, plus specific nodeos/geth embedding it. It owns the plugins.

Contributing

Issues and PR in this repo related strictly to the core manageos engine

Report any protocol-specific issues in their respective repositories

Please first refer to the general dfuse contribution guide, if you wish to contribute to this code base.

This codebase uses unit tests extensively, please write and run tests.

License

Apache 2.0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DisableDebugDeepmindOption = StartOption("disable-debug-deep-mind")
View Source
var EnableDebugDeepmindOption = StartOption("enable-debug-deep-mind")

Functions

func AugmentStackSizeLimit

func AugmentStackSizeLimit() error

Types

type BackupableChainSuperviser

type BackupableChainSuperviser interface {
	TakeBackup(backupTag string, backupStoreURL string) error
	RestoreBackup(backupName, backupTag string, backupStoreURL string) error
}

type BootstrapableChainSuperviser

type BootstrapableChainSuperviser interface {
	Bootstrap(dataName string, dataStore dstore.Store) error
}

type ChainSuperviser

type ChainSuperviser interface {
	GetCommand() string
	GetName() string
	LastExitCode() int

	RegisterPostRestoreHandler(func())

	Start(options ...StartOption) error
	Stop() error

	HasData() bool
	IsRunning() bool
	Stopped() <-chan struct{}
	ServerID() (string, error)

	LastSeenBlockNum() uint64
}

type DeepMindDebuggable

type DeepMindDebuggable interface {
	DebugDeepMind(enabled bool)
}

type HeadBlockUpdater

type HeadBlockUpdater func(uint64, string, time.Time)

type MetricsAndReadinessManager

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

func NewMetricsAndReadinessManager

func NewMetricsAndReadinessManager(headBlockTimeDrift *dmetrics.HeadTimeDrift, headBlockNumber *dmetrics.HeadBlockNum, readinessMaxLatency time.Duration) *MetricsAndReadinessManager

func (*MetricsAndReadinessManager) IsReady

func (m *MetricsAndReadinessManager) IsReady() bool

func (*MetricsAndReadinessManager) Launch

func (m *MetricsAndReadinessManager) Launch()

func (*MetricsAndReadinessManager) UpdateHeadBlock

func (m *MetricsAndReadinessManager) UpdateHeadBlock(num uint64, ID string, t time.Time)

type MonitorableChainSuperviser

type MonitorableChainSuperviser interface {
	Monitor()
}

type ProducerChainSuperviser

type ProducerChainSuperviser interface {
	IsProducing() (bool, error)
	IsActiveProducer() bool

	ResumeProduction() error
	PauseProduction() error

	WaitUntilEndOfNextProductionRound(timeout time.Duration) error
}

type ProductionEvent

type ProductionEvent int
const (
	EventProduced ProductionEvent = iota
	EventReceived
)

type ProductionState

type ProductionState int
const (
	StatePre       ProductionState = iota // Just before we produce, don't restart
	StateProducing                        // We're producing right now
	StatePost                             // Right after production
	StateStale                            // We haven't produced for 12 minutes
)

func (ProductionState) String

func (s ProductionState) String() string

type Readiness

type Readiness interface {
	IsReady() bool
}

type SnapshotableChainSuperviser

type SnapshotableChainSuperviser interface {
	TakeSnapshot(snapshotStore dstore.Store, numberOfSnapshotsToKeep int) error
	RestoreSnapshot(snapshotName string, snapshotStore dstore.Store) error
}

type StartOption

type StartOption string

type VolumeSnapshotableChainSuperviser

type VolumeSnapshotableChainSuperviser interface {
	TakeVolumeSnapshot(volumeSnapshotTag, project, namespace, pod, prefix string, lastSeenBlockNum uint64) error
}

Jump to

Keyboard shortcuts

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