Documentation
¶
Overview ¶
Package restore provides the restore functionality for CNPGI.
Index ¶
- Constants
- func Start(ctx context.Context) error
- type CNPGI
- type IdentityImplementation
- func (i IdentityImplementation) GetPluginCapabilities(_ context.Context, _ *identity.GetPluginCapabilitiesRequest) (*identity.GetPluginCapabilitiesResponse, error)
- func (i IdentityImplementation) GetPluginMetadata(_ context.Context, _ *identity.GetPluginMetadataRequest) (*identity.GetPluginMetadataResponse, error)
- func (i IdentityImplementation) Probe(_ context.Context, _ *identity.ProbeRequest) (*identity.ProbeResponse, error)
- type JobHookImpl
- type ShortBackupCatalogEntry
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 ¶
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
type IdentityImplementation ¶
type IdentityImplementation struct {
identity.UnimplementedIdentityServer
BarmanObjectKey client.ObjectKey
Client client.Client
}
IdentityImplementation implements IdentityServer
func (IdentityImplementation) GetPluginCapabilities ¶
func (i IdentityImplementation) GetPluginCapabilities( _ context.Context, _ *identity.GetPluginCapabilitiesRequest, ) (*identity.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities implements IdentityServer
func (IdentityImplementation) GetPluginMetadata ¶
func (i IdentityImplementation) GetPluginMetadata( _ context.Context, _ *identity.GetPluginMetadataRequest, ) (*identity.GetPluginMetadataResponse, error)
GetPluginMetadata implements IdentityServer
func (IdentityImplementation) Probe ¶
func (i IdentityImplementation) Probe( _ context.Context, _ *identity.ProbeRequest, ) (*identity.ProbeResponse, error)
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 ¶
func (impl JobHookImpl) GetCapabilities( _ context.Context, _ *restore.RestoreJobHooksCapabilitiesRequest, ) (*restore.RestoreJobHooksCapabilitiesResult, error)
GetCapabilities returns the capabilities of the restore job hooks
func (JobHookImpl) Restore ¶
func (impl JobHookImpl) Restore( ctx context.Context, req *restore.RestoreRequest, ) (*restore.RestoreResponse, error)
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
Click to show internal directories.
Click to hide internal directories.