File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,7 +235,16 @@ func WithAnnotations(annotations map[string]string) RuntimeInfoOption {
235235func (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.
239248func WithClientMetrics (clientMetrics datav1alpha1.ClientMetrics ) RuntimeInfoOption {
240249 return func (info * RuntimeInfo ) error {
241250 if len (clientMetrics .ScrapeTarget ) == 0 {
You can’t perform that action at this time.
0 commit comments