recovery

package
v7.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DebugTimeout time.Duration = 10

DebugTimeout sets the timeout for how long the debug message is shown before power cycle.

Variables

This section is empty.

Functions

This section is empty.

Types

type PermissiveRecoverer

type PermissiveRecoverer struct {
	RecoveryCommand string
}

PermissiveRecoverer properties RecoveryCommand: unix command with absolute file path

func (PermissiveRecoverer) Recover

func (pr PermissiveRecoverer) Recover(message string) error

Recover logs error message in panic mode. Can jump into a shell for later debugging.

type Recoverer

type Recoverer interface {
	Recover(message string) error
}

Recoverer interface offers recovering from critical errors in different ways. Currently permissiverecoverer with log output and securerecovery with shutdown capabilities are supported.

type SecureRecoverer

type SecureRecoverer struct {
	Reboot   bool
	Sync     bool
	Debug    bool
	RandWait bool
}

SecureRecoverer properties Reboot: does a reboot if true Sync: sync file descriptors and devices Debug: enables debug messages

func (SecureRecoverer) Recover

func (sr SecureRecoverer) Recover(message string) error

Recover by reboot or poweroff without or with sync

Jump to

Keyboard shortcuts

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