restore

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 34 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package restore provides the restore functionality for CNPGI.

Index

Constants

View Source
const (
	// ScratchDataDirectory is the directory to be used for scratch data
	ScratchDataDirectory = "/controller"

	// RecoveryTemporaryDirectory provides a path to store temporary files
	// needed in the recovery process
	RecoveryTemporaryDirectory = ScratchDataDirectory + "/recovery"
)

Variables

This section is empty.

Functions

func Start

func Start(ctx context.Context) error

Start starts the sidecar informers and CNPG-i server

Types

type CNPGI

type CNPGI struct {
	PluginPath     string
	SpoolDirectory string

	Client       client.Client
	PGDataPath   string
	InstanceName string
}

CNPGI is the implementation of the PostgreSQL sidecar

func (*CNPGI) Start

func (c *CNPGI) Start(ctx context.Context) error

Start starts the GRPC service

type IdentityImplementation

type IdentityImplementation struct {
	identity.UnimplementedIdentityServer
	BarmanObjectKey client.ObjectKey
	Client          client.Client
}

IdentityImplementation implements IdentityServer

func (IdentityImplementation) GetPluginCapabilities

GetPluginCapabilities implements IdentityServer

func (IdentityImplementation) GetPluginMetadata

GetPluginMetadata implements IdentityServer

func (IdentityImplementation) Probe

Probe implements IdentityServer

type JobHookImpl

type JobHookImpl struct {
	restore.UnimplementedRestoreJobHooksServer

	Client client.Client

	SpoolDirectory       string
	PgDataPath           string
	PgWalFolderToSymlink string
}

JobHookImpl is the implementation of the restore job hooks

func (JobHookImpl) GetCapabilities

GetCapabilities returns the capabilities of the restore job hooks

func (JobHookImpl) Restore

Restore restores the cluster from a backup

type ShortBackupCatalogEntry added in v0.4.0

type ShortBackupCatalogEntry struct {
	// BackupID is the backup ID
	BackupID string `json:"backupID"`

	// StartTime is the backup time
	StartTime time.Time `json:"startTime"`

	// EndTime is the end time
	EndTime time.Time `json:"endTime"`
}

ShortBackupCatalogEntry is used when logging the downloaded backup catalog and contains only the fields used for debugging

Jump to

Keyboard shortcuts

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