Skip to content

Commit 1f40c04

Browse files
authored
Add Notation to WithClientMetrics in pkg/ddc/base/runtime.go. (#5788)
Signed-off-by: lzy117 <3305856829@qq.com>
1 parent 61b67ae commit 1f40c04

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

pkg/ddc/base/runtime.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,16 @@ func WithAnnotations(annotations map[string]string) RuntimeInfoOption {
235235
func (info *RuntimeInfo) GetAnnotations() map[string]string {
236236
return info.annotations
237237
}
238-
238+
// WithClientMetrics sets the client metrics for the RuntimeInfo.
239+
// This function returns a RuntimeInfoOption that configures how client metrics
240+
// are collected, including setting a default scrape target if none is provided
241+
// and parsing the scrape target string into a valid selector.
242+
//
243+
// Parameters:
244+
// - clientMetrics (datav1alpha1.ClientMetrics): The client metrics configuration to be applied.
245+
//
246+
// Returns:
247+
// - (RuntimeInfoOption): A function that updates the RuntimeInfo with the specified metrics configuration.
239248
func WithClientMetrics(clientMetrics datav1alpha1.ClientMetrics) RuntimeInfoOption {
240249
return func(info *RuntimeInfo) error {
241250
if len(clientMetrics.ScrapeTarget) == 0 {

0 commit comments

Comments
 (0)