util

package
v0.29.8 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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, volumeKind, volumeName string, publish bool, rtClient ctrlrtclient.Client) error

func CreateDataExporterIfNeeded

func CreateDataExporterIfNeeded(ctx context.Context, log *slog.Logger, deName, namespace string, publish bool, ttl string, rtClient ctrlrtclient.Client) (string, error)

func DeleteDataExport

func DeleteDataExport(ctx context.Context, deName, namespace string, rtClient ctrlrtclient.Client) error

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

func SetupLogger() *slog.Logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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