operator

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCleanExit = errors.New("clean exit")

Functions

This section is empty.

Types

type Command

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

func (*Command) Return

func (c *Command) Return(err error)

type HTTPOption

type HTTPOption func(r *mux.Router)

type Operator

type Operator struct {
	*shutter.Shutter

	ReadyFunc func()
	// contains filtered or unexported fields
}

func New

func New(logger *zap.Logger, chainSuperviser manageos.ChainSuperviser, chainReadiness manageos.Readiness, options *Options) (*Operator, error)

func (*Operator) ConfigureAutoBackup

func (m *Operator) ConfigureAutoBackup(autoBackupInterval time.Duration, autoBackupBlockFrequency int, expectedHostname, hostname string)

func (*Operator) ConfigureAutoSnapshot

func (m *Operator) ConfigureAutoSnapshot(autoSnapshotInterval time.Duration, autoSnapshotBlockFrequency int, expectedHostname, hostname string)

func (*Operator) ConfigureAutoVolumeSnapshot

func (m *Operator) ConfigureAutoVolumeSnapshot(autoVolumeSnapshotInterval time.Duration, autoVolumeSnapshotBlockFrequency int, autoVolumeSnapshotSpecificBlocks []uint64)

func (*Operator) Launch

func (m *Operator) Launch(startOnLaunch bool, httpListenAddr string, options ...HTTPOption) error

func (*Operator) RunAtSpecificBlocks

func (m *Operator) RunAtSpecificBlocks(specificBlocks []uint64, commandName string)

func (*Operator) RunEveryPeriod

func (m *Operator) RunEveryPeriod(period time.Duration, commandName string)

RunEveryPeriod will skip a run if Nodeos is NOT alive when period expired.

func (*Operator) RunEveryXBlock

func (m *Operator) RunEveryXBlock(freq uint32, commandName string)

func (*Operator) RunHTTPServer

func (m *Operator) RunHTTPServer(httpListenAddr string, options ...HTTPOption) *http.Server

func (*Operator) SetMaintenance

func (m *Operator) SetMaintenance()

type Options

type Options struct {
	BackupTag            string
	BackupStoreURL       string
	SnapshotStoreURL     string
	VolumeSnapshotAppVer string
	Namespace            string //k8s namespace
	Pod                  string //k8s podname
	PVCPrefix            string
	Project              string //gcp project

	BootstrapDataURL        string
	AutoRestoreSource       string
	NumberOfSnapshotsToKeep int
	RestoreBackupName       string
	RestoreSnapshotName     string
	Profiler                *profiler.Profiler
	StartFailureHandlerFunc func()

	EnableSupervisorMonitoring bool

	// Delay before shutting manager when sigterm received
	ShutdownDelay time.Duration

	ReadyFunc func()
}

Jump to

Keyboard shortcuts

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