MCPcopy
hub / github.com/fluid-cloudnative/fluid / OperationInterface

Interface OperationInterface

pkg/dataoperation/interface.go:32–76  ·  view source on GitHub ↗

OperationInterface the interface of data operation crd

Source from the content-addressed store, hash-verified

30
31// OperationInterface the interface of data operation crd
32type OperationInterface interface {
33 // HasPrecedingOperation check if current data operation depends on another data operation
34 HasPrecedingOperation() bool
35
36 // GetOperationObject get the data operation object
37 GetOperationObject() client.Object
38
39 // GetPossibleTargetDatasetNamespacedNames returns all possible target dataset's namespace and name, this should only be used for cleaning up data operations.
40 GetPossibleTargetDatasetNamespacedNames() []types.NamespacedName
41
42 // GetTargetDataset get the target dataset of the data operation, implementor should return the newest target dataset.
43 GetTargetDataset() (*datav1alpha1.Dataset, error)
44
45 // GetReleaseNameSpacedName get the installed helm chart name
46 GetReleaseNameSpacedName() types.NamespacedName
47
48 // GetChartsDirectory get the helm charts directory of data operation
49 GetChartsDirectory() string
50
51 // GetOperationType get the data operation type
52 GetOperationType() OperationType
53
54 // UpdateOperationApiStatus update the data operation status, object is the data operation crd instance.
55 UpdateOperationApiStatus(opStatus *datav1alpha1.OperationStatus) error
56
57 // Validate check the data operation spec is valid or not, if not valid return error with conditions
58 Validate(ctx runtime.ReconcileRequestContext) ([]datav1alpha1.Condition, error)
59
60 // UpdateStatusInfoForCompleted update the status infos field for phase completed, the parameter infos is not nil
61 UpdateStatusInfoForCompleted(infos map[string]string) error
62
63 // SetTargetDatasetStatusInProgress set the dataset status for certain field when data operation executing.
64 SetTargetDatasetStatusInProgress(dataset *datav1alpha1.Dataset)
65
66 // RemoveTargetDatasetStatusInProgress remove the dataset status for certain field when data operation finished.
67 RemoveTargetDatasetStatusInProgress(dataset *datav1alpha1.Dataset)
68
69 GetStatusHandler() StatusHandler
70
71 // GetTTL gets timeToLive
72 GetTTL() (ttl *int32, err error)
73
74 // GetParallelTaskNumber get the parallel tasks for data operations.
75 GetParallelTaskNumber() int32
76}
77
78type StatusHandler interface {
79 // GetOperationStatus get operation status according to helm chart status

Callers 41

reconcileNoneMethod · 0.65
ReconcileDeletionMethod · 0.65
ReleaseTargetDatasetFunction · 0.65
reconcileNoneMethod · 0.65
ReconcileDeletionMethod · 0.65
ReconcileInternalMethod · 0.65
ReleaseTargetDatasetFunction · 0.65

Implementers 5

dataMigrateOperationpkg/controllers/v1alpha1/datamigrate/i
dataProcessOperationpkg/controllers/v1alpha1/dataprocess/i
dataBackupOperationpkg/controllers/v1alpha1/databackup/im
dataLoadOperationpkg/controllers/v1alpha1/dataload/impl
mockDataloadOperationReconcilerpkg/dataoperation/mock.go

Calls

no outgoing calls

Tested by

no test coverage detected