restorer

package
v0.31.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorArrayToError added in v0.29.0

func ErrorArrayToError(errs []error) error

ErrorArrayToError takes an array of errors and returns a single concatenated error

Types

type Restorer

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

Restorer is a struct for etcd data directory restorer

func NewRestorer

func NewRestorer(store brtypes.SnapStore, logger *logrus.Entry) (*Restorer, error)

NewRestorer returns the restorer object.

func (*Restorer) HandleAlarm added in v0.29.0

func (r *Restorer) HandleAlarm(stopHandleAlarmCh chan bool, dbSizeAlarmCh <-chan string, dbSizeAlarmDisarmCh chan bool, clientMaintenance client.MaintenanceCloser)

HandleAlarm function handles alarm raised by backup-restore.

func (*Restorer) MakeEtcdLeanAndCheckAlarm added in v0.29.0

func (r *Restorer) MakeEtcdLeanAndCheckAlarm(revision int64, endPoints []string, embeddedEtcdQuotaBytes float64, dbSizeAlarmCh chan string, dbSizeAlarmDisarmCh <-chan bool, clientKV client.KVCloser, clientMaintenance client.MaintenanceCloser) error

MakeEtcdLeanAndCheckAlarm calls etcd compaction on given revision number and raise db size alarm if embedded etcd db size crosses threshold.

func (*Restorer) Restore

func (r *Restorer) Restore(ro brtypes.RestoreOptions, m member.Control) (*embed.Etcd, error)

Restore restores the etcd data directory as per specified restore options but returns the ETCD server that it statrted.

func (*Restorer) RestoreAndStopEtcd added in v0.29.0

func (r *Restorer) RestoreAndStopEtcd(ro brtypes.RestoreOptions, m member.Control) error

RestoreAndStopEtcd restore the etcd data directory as per specified restore options but doesn't return the ETCD server that it statrted.

Jump to

Keyboard shortcuts

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