Documentation
¶
Index ¶
- Variables
- func CreateDataExport(ctx context.Context, deName, namespace, ttl, group, kind, volumeName string, ...) error
- func CreateDataExporterIfNeeded(ctx context.Context, log *slog.Logger, deName, namespace string, publish bool, ...) (string, error)
- func DeleteDataExport(ctx context.Context, deName, namespace string, rtClient ctrlrtclient.Client) error
- func EnsureDataExportPublish(ctx context.Context, deObj *v1alpha1.DataExport, publish bool, ...) error
- func GetDataExport(ctx context.Context, deName, namespace string, rtClient ctrlrtclient.Client) (*v1alpha1.DataExport, error)
- func GetDataExportWithRestart(ctx context.Context, deName, namespace string, rtClient ctrlrtclient.Client, ...) (*v1alpha1.DataExport, error)
- func PrepareDownload(ctx context.Context, log *slog.Logger, deName, namespace string, publish bool, ...) (string, string, *safeClient.SafeClient, error)
- func SetupLogger() *slog.Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PrepareDownloadFunc = PrepareDownload CreateDataExporterIfNeededFunc = CreateDataExporterIfNeeded )
Function pointers for test stubbing
Functions ¶
func CreateDataExport ¶
func CreateDataExport(ctx context.Context, deName, namespace, ttl, group, kind, volumeName string, publish bool, rtClient ctrlrtclient.Client) error
CreateDataExport creates a DataExport CR targeting the object identified by group, kind, and volumeName. group is the API group ("" for core, e.g. "snapshot.storage.k8s.io" for VolumeSnapshot). kind is the target object kind (e.g. "VolumeSnapshot", "PersistentVolumeClaim").
func DeleteDataExport ¶
func EnsureDataExportPublish ¶ added in v0.29.8
func EnsureDataExportPublish( ctx context.Context, deObj *v1alpha1.DataExport, publish bool, rtClient ctrlrtclient.Client, ) error
EnsureDataExportPublish patches DataExport.Spec.Publish to match the resolved value. Only upgrades publish: false -> true is patched, true -> false is intentionally skipped to avoid downgrading already-published resources.
func GetDataExport ¶
func GetDataExport(ctx context.Context, deName, namespace string, rtClient ctrlrtclient.Client) (*v1alpha1.DataExport, error)
func GetDataExportWithRestart ¶
func GetDataExportWithRestart(ctx context.Context, deName, namespace string, rtClient ctrlrtclient.Client, log *slog.Logger) (*v1alpha1.DataExport, error)
func PrepareDownload ¶
func PrepareDownload(ctx context.Context, log *slog.Logger, deName, namespace string, publish bool, sClient *safeClient.SafeClient) (string, string, *safeClient.SafeClient, error)
func SetupLogger ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.