From c92d7001ed67ebbd87bbb0b9403e85ebee90e057 Mon Sep 17 00:00:00 2001 From: RainbowMango Date: Mon, 23 Sep 2019 20:58:47 +0800 Subject: [PATCH] Wrap promethues.Labels to stability framework. --- .../src/k8s.io/component-base/metrics/BUILD | 1 + .../k8s.io/component-base/metrics/labels.go | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 staging/src/k8s.io/component-base/metrics/labels.go diff --git a/staging/src/k8s.io/component-base/metrics/BUILD b/staging/src/k8s.io/component-base/metrics/BUILD index b1b78e6b3a3..d08d8057946 100644 --- a/staging/src/k8s.io/component-base/metrics/BUILD +++ b/staging/src/k8s.io/component-base/metrics/BUILD @@ -13,6 +13,7 @@ go_library( "counter.go", "gauge.go", "histogram.go", + "labels.go", "metric.go", "opts.go", "processstarttime.go", diff --git a/staging/src/k8s.io/component-base/metrics/labels.go b/staging/src/k8s.io/component-base/metrics/labels.go new file mode 100644 index 00000000000..11af3ae4249 --- /dev/null +++ b/staging/src/k8s.io/component-base/metrics/labels.go @@ -0,0 +1,22 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import "github.com/prometheus/client_golang/prometheus" + +// Labels represents a collection of label name -> value mappings. +type Labels prometheus.Labels