Documentation
¶
Overview ¶
Package backupengine contains a definition how to implement a backup engine
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Implementation ¶
type Implementation interface {
// CreateBackup is used to instruct the backup engine to create
// a backup. The means of doing so depends on the engine itself.
CreateBackup(io.Writer) error
// GetPodSpec generates a pod-spec from the given backup
// specificiation containing required volume mounts from secrets
// or envFrom definitions (and possible other special cases).
// The mounted secret will be added by the controller.
GetPodSpec(imagePrefix string) (coreV1.PodSpec, error)
// Init is called once per backup engine and allows to execute
// one-shot initialization tasks like registering new HTTP
// handlers
Init(opts.InitOpts) error
// RestoreBackup receives an io.ReaderAt with the contents of
// the backup to be restored and the size of the backup. The
// means of doing so depends on the engine itself. The contents
// of the reader will be the same the engine provided during
// the CreateBackup result
RestoreBackup(r io.ReaderAt, size int64) error
// RestoreBackup receives an io.ReaderAt with the contents of
// the backup to be restored, the size of the backup and a
// destination folder (already exists) to unpack the backup
// into: how to do that is up to the engine. The contents of
// the reader SHOULD match the contents CreateBackup wrote
// but as it is supposed to be used manually it COULD have the
// wrong format
Unpack(r io.ReaderAt, size int64, destDir string) error
}
Implementation defines how a backupengine implementation should look
func GetByName ¶
func GetByName(name string) Implementation
GetByName contains a mapping of names to be specified in the backup spec to their Implementation
Directories
¶
| Path | Synopsis |
|---|---|
|
Package base contains a simple engine to return a predefined (YAML) pod-spec in order not to invent the wheel over and over again
|
Package base contains a simple engine to return a predefined (YAML) pod-spec in order not to invent the wheel over and over again |
|
Package cockroach contains the implementation of the backupengine for CockroachDB
|
Package cockroach contains the implementation of the backupengine for CockroachDB |
|
Package opts contains helpers for the backup-engines to prevent import-cycles when importing engines into a registry
|
Package opts contains helpers for the backup-engines to prevent import-cycles when importing engines into a registry |
|
Package postgres contains the implementation of the backupengine for PostgreSQL
|
Package postgres contains the implementation of the backupengine for PostgreSQL |
Click to show internal directories.
Click to hide internal directories.