postgres

package
v4.185.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SGbackupGroupVersionResource = schema.GroupVersionResource{
		Group:    "stackgres.io",
		Version:  "v1",
		Resource: "sgbackups",
	}
	CNPGbackupGroupVersionResource = schema.GroupVersionResource{
		Group:    "postgresql.cnpg.io",
		Version:  "v1",
		Resource: "backups",
	}
)

Functions

func DetermineTargetSchema added in v4.172.0

func DetermineTargetSchema(compositionRefName string) schema.GroupVersionResource

Get schema.GroupVersionResource for either StackGres or CNPG backups according to the compositionReference. Defaults to StackGres.

func GetFromEvent

func GetFromEvent(in watch.Event) *v1.BackupInfo

GetFromEvent resolves watch.Event into v1.BackupInfo

func New

New returns a new storage provider for VSHNPostgresBackup

Types

type KubeBackupProvider added in v4.172.0

type KubeBackupProvider struct {
	DynamicClient client.NamespaceableResourceInterface
}

func (*KubeBackupProvider) GetBackup added in v4.172.0

func (k *KubeBackupProvider) GetBackup(ctx context.Context, name, namespace string, schema schema.GroupVersionResource, scClient *client.DynamicClient) (*v1.BackupInfo, error)

GetBackup fetches a SG/CNPG backup resource into unstructured.Unstructured. Relevant data is saved to v1.BackupInfo

func (*KubeBackupProvider) ListBackup added in v4.172.0

ListBackup fetches SG/CNPG resources into unstructured.UnstructuredList. Relevant data is saved to v1.BackupInfo

func (*KubeBackupProvider) WatchBackup added in v4.172.0

func (k *KubeBackupProvider) WatchBackup(ctx context.Context, namespace string, options *metainternalversion.ListOptions) (watch.Interface, error)

WatchBackup watches SG/CNPG backup resources.

Jump to

Keyboard shortcuts

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