OperationInterface the interface of data operation crd
| 30 | |
| 31 | // OperationInterface the interface of data operation crd |
| 32 | type 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 | |
| 78 | type StatusHandler interface { |
| 79 | // GetOperationStatus get operation status according to helm chart status |
no outgoing calls
no test coverage detected