cockroach

package
v0.0.0-...-395ddcd Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package cockroach contains the implementation of the backupengine for CockroachDB

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine implements backupengine interface

func New

func New() *Engine

New creates a new Engine instance

func (*Engine) CreateBackup

func (e *Engine) CreateBackup(w io.Writer) error

CreateBackup is used to instruct the backup engine to create a backup. The means of doing so depends on the engine itself.

func (*Engine) GetPodSpec

func (e *Engine) GetPodSpec(imagePrefix string) (coreV1.PodSpec, 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 PVC to store the backup is added later and must not be included in this spec

func (*Engine) Init

func (e *Engine) Init(options opts.InitOpts) error

Init is called once per backup engine and allows to execute one-shot initialization tasks like registering new HTTP handlers

func (*Engine) RestoreBackup

func (e *Engine) RestoreBackup(r io.ReaderAt, size int64) error

RestoreBackup receives an io.Reader with the contents of the backup to be restored. 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

func (Engine) Unpack

func (Engine) Unpack(r io.ReaderAt, size int64, destDir string) error

Unpack takes a backup and unpacks the contents into the given directory

Jump to

Keyboard shortcuts

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