Documentation ¶
Index ¶
- Variables
- type BackupModule
- type BackupModuleConfig
- type BackupModuleFactory
- type BackupSchedule
- type Bootstrapper
- type Command
- type HTTPOption
- type Operator
- func (o *Operator) Launch(httpListenAddr string, options ...HTTPOption) error
- func (o *Operator) LaunchBackupSchedules()
- func (o *Operator) RegisterBackupModule(name string, mod BackupModule) error
- func (o *Operator) RegisterBackupSchedule(sched *BackupSchedule)
- func (o *Operator) RunEveryPeriod(period time.Duration, commandName string, params map[string]string)
- func (o *Operator) RunEveryXBlock(freq uint32, commandName string, params map[string]string)
- func (o *Operator) RunHTTPServer(httpListenAddr string, options ...HTTPOption) *http.Server
- type Options
- type RestorableBackupModule
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCleanExit = errors.New("clean exit")
Functions ¶
This section is empty.
Types ¶
type BackupModule ¶
type BackupModuleConfig ¶
type BackupModuleFactory ¶
type BackupModuleFactory func(conf BackupModuleConfig) (BackupModule, error)
type BackupSchedule ¶
type BackupSchedule struct { BlocksBetweenRuns int TimeBetweenRuns time.Duration RequiredHostnameMatch string // will not run backup if !empty env.Hostname != HostnameMatch BackuperName string // must match id of backupModule }
func NewBackupSchedule ¶
func NewBackupSchedule(freqBlocks, freqTime, requiredHostname, backuperName string) (*BackupSchedule, error)
func ParseBackupConfigs ¶
func ParseBackupConfigs( logger *zap.Logger, backupConfigs []string, backupModuleFactories map[string]BackupModuleFactory, ) ( mods map[string]BackupModule, scheds []*BackupSchedule, err error, )
type Bootstrapper ¶
type Bootstrapper interface {
Bootstrap() error
}
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
func (*Command) MarshalLogObject ¶
func (c *Command) MarshalLogObject(encoder zapcore.ObjectEncoder) error
type HTTPOption ¶
type Operator ¶
type Operator struct { *shutter.Shutter Superviser nodeManager.ChainSuperviser // contains filtered or unexported fields }
func New ¶
func New(zlogger *zap.Logger, chainSuperviser nodeManager.ChainSuperviser, chainReadiness nodeManager.Readiness, options *Options) (*Operator, error)
func (*Operator) Launch ¶
func (o *Operator) Launch(httpListenAddr string, options ...HTTPOption) error
func (*Operator) LaunchBackupSchedules ¶
func (o *Operator) LaunchBackupSchedules()
func (*Operator) RegisterBackupModule ¶
func (o *Operator) RegisterBackupModule(name string, mod BackupModule) error
func (*Operator) RegisterBackupSchedule ¶
func (o *Operator) RegisterBackupSchedule(sched *BackupSchedule)
func (*Operator) RunEveryPeriod ¶
func (*Operator) RunEveryXBlock ¶
func (*Operator) RunHTTPServer ¶
func (o *Operator) RunHTTPServer(httpListenAddr string, options ...HTTPOption) *http.Server
type Options ¶
type Options struct { Bootstrapper Bootstrapper EnableSupervisorMonitoring bool // Delay before sending Stop() to superviser, during which we return NotReady ShutdownDelay time.Duration }
type RestorableBackupModule ¶
type RestorableBackupModule interface { BackupModule Restore(name string) error }
Click to show internal directories.
Click to hide internal directories.