redis

package
v0.0.0-...-e89a0ad Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupMeta

func BackupMeta(folder storage.Folder, name string) (archive.Backup, error)

func BackupNamesFromBackupTimes

func BackupNamesFromBackupTimes(backups []internal.BackupTime) []string

BackupNamesFromBackupTimes forms list of backup names from BackupTime

func BackupNamesFromBackups

func BackupNamesFromBackups(backups []archive.Backup) []string

BackupNamesFromBackups forms list of backup names from Backups

func GetBackupDetails

func GetBackupDetails(folder storage.Folder, backupTime internal.BackupTime) (archive.Backup, error)

func GetBackupsDetails

func GetBackupsDetails(folder storage.Folder, backups []internal.BackupTime) ([]archive.Backup, error)

func GetSettingWithLocalDefault

func GetSettingWithLocalDefault(key string, defaultValue string) string

DISCUSS: In some cases, we have default values, but we don't want to store it at global default settings. Naming is far from best, if Go allowed overloads, name GetSettingWithDefault would be more appropriate

func HandleBackupFetch

func HandleBackupFetch(ctx context.Context, folder storage.Folder, backupName string, restoreCmd *exec.Cmd) error

func HandleBackupPush

func HandleBackupPush(uploader internal.Uploader, backupCmd *exec.Cmd, metaConstructor internal.MetaConstructor) error

func HandleBackupsDelete

func HandleBackupsDelete(backupTimes []internal.BackupTime,
	folder storage.Folder,
	opts PurgeSettings) (purge, retain []archive.Backup, err error)

HandleBackupsDelete delete backups according to settings

func HandleDetailedBackupList

func HandleDetailedBackupList(folder storage.Folder, pretty bool, json bool)

TODO : unit tests

func HandlePurge

func HandlePurge(backupsPath string, setters ...PurgeOption) error

HandlePurge delete backups and oplog archives according to settings

func LoadBackups

func LoadBackups(folder storage.Folder, names []string) ([]archive.Backup, error)

LoadBackups downloads backups metadata

Types

type PurgeOption

type PurgeOption func(*PurgeSettings)

func PurgeDryRun

func PurgeDryRun(dryRun bool) PurgeOption

PurgeDryRun ...

func PurgeGarbage

func PurgeGarbage(purgeGarbage bool) PurgeOption

PurgeGarbage ...

func PurgeRetainAfter

func PurgeRetainAfter(retainAfter time.Time) PurgeOption

PurgeRetainAfter ...

func PurgeRetainCount

func PurgeRetainCount(retainCount int) PurgeOption

PurgeRetainCount ...

type PurgeSettings

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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