backup

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadConnection = errors.New("the connection hasn't reflected the latest user's privileges")

Functions

This section is empty.

Types

type BackupManager

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

func NewBackupManager

func NewBackupManager(cfg *rest.Config, bc bucket.Bucket, dir, ns, name, password string, threads int) (*BackupManager, error)

func (*BackupManager) Backup

func (bm *BackupManager) Backup(ctx context.Context) error

func (*BackupManager) ChoosePod

func (bm *BackupManager) ChoosePod(ctx context.Context, pods []*corev1.Pod) (int, error)

type ByteCountWriter

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

ByteCountWriter counts the written data in bytes

func (*ByteCountWriter) Write

func (w *ByteCountWriter) Write(data []byte) (int, error)

Write implements io.Writer interface.

func (*ByteCountWriter) Written

func (w *ByteCountWriter) Written() int64

Written returns the number of written bytes.

type RestoreManager

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

func NewRestoreManager

func NewRestoreManager(cfg *rest.Config, bc bucket.Bucket, dir, srcNS, srcName, ns, name, password string, threads int, restorePoint time.Time) (*RestoreManager, error)

func (*RestoreManager) FindNearestDump

func (rm *RestoreManager) FindNearestDump(keys []string) (string, string, time.Time)

func (*RestoreManager) Restore

func (rm *RestoreManager) Restore(ctx context.Context) error

Jump to

Keyboard shortcuts

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