Documentation
¶
Index ¶
- Variables
- func DetermineTargetSchema(compositionRefName string) schema.GroupVersionResource
- func GetFromEvent(in watch.Event) *v1.BackupInfo
- func New() restbuilder.ResourceHandlerProvider
- type KubeBackupProvider
- func (k *KubeBackupProvider) GetBackup(ctx context.Context, name, namespace string, ...) (*v1.BackupInfo, error)
- func (k *KubeBackupProvider) ListBackup(ctx context.Context, namespace string, schema schema.GroupVersionResource, ...) (*[]v1.BackupInfo, error)
- func (k *KubeBackupProvider) WatchBackup(ctx context.Context, namespace string, ...) (watch.Interface, error)
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 ¶
func New() restbuilder.ResourceHandlerProvider
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
func (k *KubeBackupProvider) ListBackup(ctx context.Context, namespace string, schema schema.GroupVersionResource, scClient *client.DynamicClient, options *metainternalversion.ListOptions) (*[]v1.BackupInfo, error)
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.
Click to show internal directories.
Click to hide internal directories.