nodeos

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fields

func Fields() []zap.Field

Types

type NodeosBackupInfo

type NodeosBackupInfo struct {
	ChainIDStr          string `yaml:"chainIdStr"`
	ServerVersion       string `yaml:"serverVersion"`
	LastBlockSeen       uint32 `yaml:"lastBlockSeen"`
	ServerVersionString string `yaml:"serverVersionString"`
}

type NodeosSuperviser

type NodeosSuperviser struct {
	*superviser.Superviser
	// contains filtered or unexported fields
}

func NewSuperviser

func NewSuperviser(logger, nodeosLogger *zap.Logger, debugDeepMind bool, headBlockUpdateFunc manageos.HeadBlockUpdater, options *SuperviserOptions) (*NodeosSuperviser, error)

func (*NodeosSuperviser) Bootstrap

func (s *NodeosSuperviser) Bootstrap(bootstrapDataName string, bootstrapDataStore dstore.Store) error

func (*NodeosSuperviser) GetCommand

func (s *NodeosSuperviser) GetCommand() string

func (*NodeosSuperviser) GetName

func (s *NodeosSuperviser) GetName() string

func (*NodeosSuperviser) HasData

func (s *NodeosSuperviser) HasData() bool

func (*NodeosSuperviser) IsActiveProducer

func (s *NodeosSuperviser) IsActiveProducer() bool

func (*NodeosSuperviser) IsProducing

func (s *NodeosSuperviser) IsProducing() (bool, error)

func (*NodeosSuperviser) IsRunning

func (s *NodeosSuperviser) IsRunning() bool

func (*NodeosSuperviser) LastSeenBlockNum

func (s *NodeosSuperviser) LastSeenBlockNum() uint64

func (*NodeosSuperviser) LaunchConnectionWatchdog

func (s *NodeosSuperviser) LaunchConnectionWatchdog(terminating <-chan struct{})

func (*NodeosSuperviser) Monitor

func (s *NodeosSuperviser) Monitor()

Monitor manages the 'readinessProbe' bool for healthz purposes and the stateos drift/headblock.

This should be performed through a go routine.

func (*NodeosSuperviser) PauseProduction

func (s *NodeosSuperviser) PauseProduction() error

func (*NodeosSuperviser) RestoreBackup

func (s *NodeosSuperviser) RestoreBackup(backupName, backupTag string, backupStoreURL string) error

func (*NodeosSuperviser) RestoreSnapshot

func (s *NodeosSuperviser) RestoreSnapshot(snapshotName string, snapshotStore dstore.Store) error

func (*NodeosSuperviser) ResumeProduction

func (s *NodeosSuperviser) ResumeProduction() error

func (*NodeosSuperviser) ServerID

func (s *NodeosSuperviser) ServerID() (string, error)

func (*NodeosSuperviser) Start

func (s *NodeosSuperviser) Start(options ...manageos.StartOption) error

func (*NodeosSuperviser) TakeBackup

func (s *NodeosSuperviser) TakeBackup(backupTag string, backupStoreURL string) error

func (*NodeosSuperviser) TakeSnapshot

func (s *NodeosSuperviser) TakeSnapshot(snapshotStore dstore.Store, numberOfSnapshotsToKeep int) error

func (*NodeosSuperviser) WaitUntilEndOfNextProductionRound

func (s *NodeosSuperviser) WaitUntilEndOfNextProductionRound(timeout time.Duration) error

type SuperviserOptions

type SuperviserOptions struct {
	// LocalNodeEndpoint is the URL to reach the locally managed node (`http://localhost:8888` if empty)
	LocalNodeEndpoint string

	// ConfigPath points to the path where the config.ini lives (`/etc/nodeos` if empty)
	ConfigDir string

	// NodeosBinPath points to the file system location of the`nodeos` binary. Required.
	BinPath string

	// NodeosDataDir points to the location of the data dir. Required.
	DataDir string

	// Hostname is the hostname of the current machine. Leave blank for auto-detection.
	Hostname string

	// ProducerHostname is the hostname of the machine that should be
	// an active producer.  If `hostname` matches this name, the node
	// will *not* be started with `--pause-on-startup`. If you are not
	// managing a node that is configured to produce, you can safely
	// ignore this config entry.
	ProducerHostname string

	// Wheter or not to read the producing hostname from Viper config
	ProducerHostnameFromViper bool

	// TrustedProducer is the EOS account name of a Block Producer
	// we trust all blocks signed from.
	TrustedProducer string

	// ForceProduction will force isActiveProducer to return true and make mana
	ForceProduction bool

	// AdditionalArgs are parameters you want to pass down to `nodeos`
	// in addition to the ones `manageos` would add itself.  You're
	// better off putting long-running parameters in the `config.ini`
	// though.
	AdditionalArgs []string

	// NoBlocksLog
	// NoBlocksLog is useful when extracting data from the chain only (mindreader) without calls to "get_block", etc.
	// It will *DELETE* the blocks.log and blocks.index on start (as well as on restore, restart, etc.)
	// When using that flag, the node CANNOT perform a pitreos backup, only restore (with exclude filters),
	// to prevent inadvertently deleting blocks.log from other nodes
	NoBlocksLog bool

	// Redirects all output to zlog instance configured for this process
	// instead of the standard console output
	LogToZap bool
}

Jump to

Keyboard shortcuts

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