dataoperation

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// OperationLabel is used for pod anti affinity.
	OperationLabel = "fluid.io/operation"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OperationInterface

type OperationInterface interface {
	// HasPrecedingOperation check if current data operation depends on another data operation
	HasPrecedingOperation() bool

	// GetOperationObject get the data operation object
	GetOperationObject() client.Object

	// GetPossibleTargetDatasetNamespacedNames returns all possible target dataset's namespace and name, this should only be used for cleaning up data operations.
	GetPossibleTargetDatasetNamespacedNames() []types.NamespacedName

	// GetTargetDataset get the target dataset of the data operation, implementor should return the newest target dataset.
	GetTargetDataset() (*datav1alpha1.Dataset, error)

	// GetReleaseNameSpacedName get the installed helm chart name
	GetReleaseNameSpacedName() types.NamespacedName

	// GetChartsDirectory get the helm charts directory of data operation
	GetChartsDirectory() string

	// GetOperationType get the data operation type
	GetOperationType() OperationType

	// UpdateOperationApiStatus update the data operation status, object is the data operation crd instance.
	UpdateOperationApiStatus(opStatus *datav1alpha1.OperationStatus) error

	// Validate check the data operation spec is valid or not, if not valid return error with conditions
	Validate(ctx runtime.ReconcileRequestContext) ([]datav1alpha1.Condition, error)

	// UpdateStatusInfoForCompleted update the status infos field for phase completed, the parameter infos is not nil
	UpdateStatusInfoForCompleted(infos map[string]string) error

	// SetTargetDatasetStatusInProgress set the dataset status for certain field when data operation executing.
	SetTargetDatasetStatusInProgress(dataset *datav1alpha1.Dataset)

	// RemoveTargetDatasetStatusInProgress remove the dataset status for certain field when data operation finished.
	RemoveTargetDatasetStatusInProgress(dataset *datav1alpha1.Dataset)

	GetStatusHandler() StatusHandler

	// GetTTL gets timeToLive
	GetTTL() (ttl *int32, err error)

	// GetParallelTaskNumber get the parallel tasks for data operations.
	GetParallelTaskNumber() int32
}

OperationInterface the interface of data operation crd

func BuildMockDataloadOperationReconcilerInterface added in v1.0.0

func BuildMockDataloadOperationReconcilerInterface(expectType OperationType, ttlSecondsAfterFinished *int32) (operation OperationInterface)

type OperationInterfaceBuilder added in v1.0.0

type OperationInterfaceBuilder interface {
	Build(object client.Object) (OperationInterface, error)
}

type OperationType

type OperationType string
const (
	DataLoadType    OperationType = "DataLoad"
	DataBackupType  OperationType = "DataBackup"
	DataMigrateType OperationType = "DataMigrate"
	DataProcessType OperationType = "DataProcess"
)

type ReconcileRequestContext

type ReconcileRequestContext struct {
	// used for create engine
	cruntime.ReconcileRequestContext

	// object for dataset operation
	DataObject          client.Object
	OpStatus            *v1alpha1.OperationStatus
	DataOpFinalizerName string
}

ReconcileRequestContext loads or applys the configuration state of a service.

type StatusHandler added in v1.0.0

type StatusHandler interface {
	// GetOperationStatus get operation status according to helm chart status
	GetOperationStatus(ctx runtime.ReconcileRequestContext, opStatus *datav1alpha1.OperationStatus) (result *datav1alpha1.OperationStatus, err error)
}

Jump to

Keyboard shortcuts

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