From 8610bf6ebac830c527e9b63196ce1d33c08bb431 Mon Sep 17 00:00:00 2001 From: Hanxian Lao <1687483153@qq.com> Date: Mon, 11 May 2026 12:31:29 +0800 Subject: [PATCH] Add Notation to BuildRuntimeInfo in pkg/ddc/base/runtime.go Signed-off-by: Hanxian Lao <1687483153@qq.com> --- pkg/ddc/base/runtime.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/ddc/base/runtime.go b/pkg/ddc/base/runtime.go index d82af8ffa2d..b5915fc1e5b 100644 --- a/pkg/ddc/base/runtime.go +++ b/pkg/ddc/base/runtime.go @@ -169,6 +169,18 @@ type CachePath struct { Quota *resource.Quantity } +// BuildRuntimeInfo creates and initializes a RuntimeInfoInterface instance with the specified name, namespace, and runtime type. +// It applies any number of optional configuration functions (opts) to customize the runtime information before returning. +// +// Parameters: +// - name (string): The name of the runtime. +// - namespace (string): The namespace of the runtime. +// - runtimeType (string): The type of the runtime (e.g., Alluxio, JuiceFS). +// - opts (...RuntimeInfoOption): Optional configuration functions that modify the RuntimeInfo struct. +// +// Returns: +// - runtime (RuntimeInfoInterface): A fully configured runtime information object. +// - err (error): Returns an error if any of the provided options fails to apply. func BuildRuntimeInfo(name string, namespace string, runtimeType string,