Skip to content

Commit 30d225b

Browse files
authored
Add comments to GetRuntimeStatus in pkg/ddc/base/runtime.go. (#5760)
Signed-off-by: 罗一逖 <luoyititi@icloud.com>
1 parent 2f8fc96 commit 30d225b

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

pkg/ddc/base/runtime.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,19 @@ func GetRuntimeInfo(reader client.Reader, name, namespace string) (runtimeInfo R
570570
return runtimeInfo, err
571571
}
572572

573+
// GetRuntimeStatus gets the runtime status according to the runtime type, name, and namespace.
574+
// This function is primarily responsible for retrieving the current status of a specific runtime
575+
// based on its type from the Kubernetes cluster.
576+
//
577+
// Parameters:
578+
// - client (client.Client): The Kubernetes client used to interact with the API server.
579+
// - runtimeType (string): The type of the runtime (e.g., AlluxioRuntime, JindoRuntime, GooseFSRuntime).
580+
// - name (string): The name of the runtime.
581+
// - namespace (string): The namespace where the runtime is located.
582+
//
583+
// Returns:
584+
// - status (*datav1alpha1.RuntimeStatus): The status of the requested runtime.
585+
// - err (error): Returns an error if the runtime status cannot be retrieved or the runtime type is unsupported, otherwise returns nil.
573586
func GetRuntimeStatus(client client.Client, runtimeType, name, namespace string) (status *datav1alpha1.RuntimeStatus, err error) {
574587
switch runtimeType {
575588
case common.AlluxioRuntime:

0 commit comments

Comments
 (0)