Help us shape the future of Go! Take the 2026 Go Developer Survey

util

package
v0.30.22 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUploadProgress

func CheckUploadProgress(ctx context.Context, httpClient *safeClient.SafeClient, targetURL string) (int64, error)

func CreateDataImport

func CreateDataImport(
	ctx context.Context,
	name, namespace, ttl string,
	publish, waitForFirstConsumer bool,
	pvcTpl *v1alpha1.PersistentVolumeClaimTemplateSpec,
	rtClient ctrlrtclient.Client,
) error

func DeleteDataImport

func DeleteDataImport(ctx context.Context, diName, namespace string, rtClient ctrlrtclient.Client) error

func EnsureDataImportPublish added in v0.29.8

func EnsureDataImportPublish(
	ctx context.Context,
	diObj *v1alpha1.DataImport,
	publish bool,
	rtClient ctrlrtclient.Client,
) error

EnsureDataImportPublish patches DataImport.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 GetDataImport

func GetDataImport(ctx context.Context, diName, namespace string, rtClient ctrlrtclient.Client) (*v1alpha1.DataImport, error)

func GetDataImportWithRestart

func GetDataImportWithRestart(
	ctx context.Context,
	diName, namespace string,
	rtClient ctrlrtclient.Client,
	log *slog.Logger,
) (*v1alpha1.DataImport, error)

func PrepareUpload

func PrepareUpload(
	ctx context.Context,
	diName, namespace string,
	publish bool,
	sClient *safeClient.SafeClient,
	log *slog.Logger,
) (string, string, *safeClient.SafeClient, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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