capabilities

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package capabilities contains the code detecting the feature set of the current Barman version

Package capabilities stores the definition of the type for Barman capabilities

Index

Constants

View Source
const (
	// BarmanCloudBackup is the command name for 'barman-cloud-backup'
	BarmanCloudBackup = "barman-cloud-backup"

	// BarmanCloudBackupShow is the command name for 'barman-cloud-backup-show'
	BarmanCloudBackupShow = BarmanCloudBackup + "-show"

	// BarmanCloudRestore is the command name for 'barman-cloud-backup'
	BarmanCloudRestore = "barman-cloud-restore"

	// BarmanCloudBackupDelete is the command name for 'barman-cloud-backup-delete'
	BarmanCloudBackupDelete = BarmanCloudBackup + "-delete"

	// BarmanCloudBackupList is the command name for 'barman-cloud-backup-delete'
	BarmanCloudBackupList = BarmanCloudBackup + "-list"

	// BarmanCloudWalArchive is the command name for 'barman-cloud-wal-archive'
	BarmanCloudWalArchive = "barman-cloud-wal-archive"

	// BarmanCloudWalRestore is the command name for 'barman-cloud-wal-archive'
	BarmanCloudWalRestore = "barman-cloud-wal-restore"

	// BarmanCloudCheckWalArchive is the command name for 'barman-cloud-check-wal-archive'
	BarmanCloudCheckWalArchive = "barman-cloud-check-wal-archive"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Capabilities

type Capabilities struct {
	Version *semver.Version

	HasAzure                   bool
	HasS3                      bool
	HasGoogle                  bool
	HasRetentionPolicy         bool
	HasTags                    bool
	HasCheckWalArchive         bool
	HasSnappy                  bool
	HasErrorCodesForWALRestore bool
	HasErrorCodesForRestore    bool
	HasAzureManagedIdentity    bool
	// contains filtered or unexported fields
}

Capabilities collects a set of boolean values that shows the possible capabilities of Barman and the version

func CurrentCapabilities

func CurrentCapabilities() (*Capabilities, error)

CurrentCapabilities retrieves the capabilities of local barman installation, retrieving it from the cache if available.

func (*Capabilities) ShouldExecuteBackupWithName

func (c *Capabilities) ShouldExecuteBackupWithName(exec LegacyExecutor) bool

ShouldExecuteBackupWithName returns true if the new backup logic should be executed

type LegacyExecutor

type LegacyExecutor interface {
	ShouldForceLegacyBackup() bool
}

LegacyExecutor allows this code to know if a legacy backup should be forced or not

Jump to

Keyboard shortcuts

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