Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 886 for labelValue (0.51 sec)

  1. pkg/util/labels/labels_test.go

    		"foo2": "bar2",
    		"foo3": "bar3",
    	}
    
    	cases := []struct {
    		labels     map[string]string
    		labelKey   string
    		labelValue string
    		want       map[string]string
    	}{
    		{
    			labels: labels,
    			want:   labels,
    		},
    		{
    			labels:     labels,
    			labelKey:   "foo4",
    			labelValue: "42",
    			want: map[string]string{
    				"foo1": "bar1",
    				"foo2": "bar2",
    				"foo3": "bar3",
    				"foo4": "42",
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 11 17:34:12 UTC 2017
    - 4.1K bytes
    - Viewed (0)
  2. pkg/monitoring/base.go

    		lv := slices.Map(f.attrs, func(e attribute.KeyValue) LabelValue {
    			return LabelValue{e}
    		})
    		rh.OnRecord(f.name, lv, value)
    	}
    	recordHookMutex.RUnlock()
    }
    
    func (f baseMetric) Register() error {
    	return nil
    }
    
    func (f baseMetric) RecordInt(value int64) {
    	f.rest.Record(float64(value))
    }
    
    func rebuildAttributes(bm baseMetric, labelValues []LabelValue) ([]attribute.KeyValue, attribute.Set) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go

    	}
    
    	cases := []struct {
    		labels     map[string]string
    		labelKey   string
    		labelValue string
    		want       map[string]string
    	}{
    		{
    			labels: labels,
    			want:   labels,
    		},
    		{
    			labels:     labels,
    			labelKey:   "foo4",
    			labelValue: "89",
    			want: map[string]string{
    				"foo1": "bar1",
    				"foo2": "bar2",
    				"foo3": "bar3",
    				"foo4": "89",
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 07 11:09:05 UTC 2018
    - 2.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go

    func CloneSelectorAndAddLabel(selector *LabelSelector, labelKey, labelValue string) *LabelSelector {
    	if labelKey == "" {
    		// Don't need to add a label.
    		return selector
    	}
    
    	// Clone.
    	newSelector := selector.DeepCopy()
    
    	if newSelector.MatchLabels == nil {
    		newSelector.MatchLabels = make(map[string]string)
    	}
    
    	newSelector.MatchLabels[labelKey] = labelValue
    
    	return newSelector
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 07 11:09:05 UTC 2018
    - 1.7K bytes
    - Viewed (0)
  5. pkg/util/labels/labels.go

    func CloneAndAddLabel(labels map[string]string, labelKey, labelValue string) map[string]string {
    	if labelKey == "" {
    		// Don't need to add a label.
    		return labels
    	}
    	// Clone.
    	newLabels := map[string]string{}
    	for key, value := range labels {
    		newLabels[key] = value
    	}
    	newLabels[labelKey] = labelValue
    	return newLabels
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 11 17:34:12 UTC 2017
    - 3.7K bytes
    - Viewed (0)
  6. pkg/monitoring/monitoring.go

    	key attribute.Key
    }
    
    // Value creates a new LabelValue for the Label.
    func (l Label) Value(value string) LabelValue {
    	return LabelValue{l.key.String(value)}
    }
    
    // A LabelValue represents a Label with a specific value. It is used to record
    // values for a Metric.
    type LabelValue struct {
    	keyValue attribute.KeyValue
    }
    
    func (l LabelValue) Key() Label {
    	return Label{l.keyValue.Key}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 24 03:31:28 UTC 2023
    - 9.5K bytes
    - Viewed (0)
  7. src/runtime/pprof/label.go

    func Label(ctx context.Context, key string) (string, bool) {
    	ctxLabels := labelValue(ctx)
    	v, ok := ctxLabels[key]
    	return v, ok
    }
    
    // ForLabels invokes f with each label set on the context.
    // The function f should return true to continue iteration or false to stop iteration early.
    func ForLabels(ctx context.Context, f func(key, value string) bool) {
    	ctxLabels := labelValue(ctx)
    	for k, v := range ctxLabels {
    		if !f(k, v) {
    			break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3K bytes
    - Viewed (0)
  8. pkg/monitoring/disabled.go

    func (dm *disabledMetric) RecordInt(value int64) {}
    
    // Register implements Metric
    func (dm *disabledMetric) Register() error {
    	return nil
    }
    
    // With implements Metric
    func (dm *disabledMetric) With(labelValues ...LabelValue) Metric {
    	return dm
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  9. pilot/pkg/serviceregistry/kube/controller/ambient/waypoints.go

    		// ~ is used in other portions of the API, reserve it with special meaning although it's unlikely to be documented
    		if labelValue == "none" || labelValue == "~" || strings.HasSuffix(labelValue, "/none") {
    			return nil, true
    		}
    		namespacedName := strings.Split(labelValue, "/")
    		switch len(namespacedName) {
    		case 1:
    			return &krt.Named{
    				Name:      namespacedName[0],
    				Namespace: defaultNamespace,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 18:02:28 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  10. pkg/monitoring/derived_gauge.go

    	return d.name
    }
    
    func (d *derivedGauge) Register() error {
    	return nil
    }
    
    func (d *derivedGauge) ValueFrom(valueFn func() float64, labelValues ...LabelValue) DerivedMetric {
    	d.mu.Lock()
    	defer d.mu.Unlock()
    	lv := slices.Map(labelValues, func(e LabelValue) attribute.KeyValue {
    		return e.keyValue
    	})
    	as := attribute.NewSet(lv...)
    	d.attrs[as] = valueFn
    	return d
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1.9K bytes
    - Viewed (0)
Back to top