|
1 | 1 | package metric |
2 | 2 |
|
3 | 3 | import ( |
| 4 | + "net/http" |
| 5 | + |
4 | 6 | "github.com/prometheus/client_golang/prometheus" |
5 | 7 |
|
6 | 8 | "github.com/flant/shell-operator/pkg/metric_storage/operation" |
7 | 9 | ) |
8 | 10 |
|
9 | 11 | type Storage interface { |
10 | | - GaugeSet(metric string, value float64, labels map[string]string) |
11 | | - GaugeAdd(metric string, value float64, labels map[string]string) |
12 | | - Gauge(metric string, labels map[string]string) *prometheus.GaugeVec |
13 | | - RegisterGauge(metric string, labels map[string]string) *prometheus.GaugeVec |
| 12 | + ApplyOperation(op operation.MetricOperation, commonLabels map[string]string) |
14 | 13 |
|
15 | | - CounterAdd(metric string, value float64, labels map[string]string) |
16 | 14 | Counter(metric string, labels map[string]string) *prometheus.CounterVec |
17 | | - RegisterCounter(metric string, labels map[string]string) *prometheus.CounterVec |
| 15 | + CounterAdd(metric string, value float64, labels map[string]string) |
| 16 | + |
| 17 | + Gauge(metric string, labels map[string]string) *prometheus.GaugeVec |
| 18 | + GaugeAdd(metric string, value float64, labels map[string]string) |
| 19 | + GaugeSet(metric string, value float64, labels map[string]string) |
| 20 | + |
| 21 | + Grouped() GroupedStorage |
| 22 | + |
| 23 | + Handler() http.Handler |
18 | 24 |
|
19 | | - HistogramObserve(metric string, value float64, labels map[string]string, buckets []float64) |
20 | 25 | Histogram(metric string, labels map[string]string, buckets []float64) *prometheus.HistogramVec |
| 26 | + HistogramObserve(metric string, value float64, labels map[string]string, buckets []float64) |
| 27 | + |
| 28 | + RegisterCounter(metric string, labels map[string]string) *prometheus.CounterVec |
| 29 | + RegisterGauge(metric string, labels map[string]string) *prometheus.GaugeVec |
21 | 30 | RegisterHistogram(metric string, labels map[string]string, buckets []float64) *prometheus.HistogramVec |
22 | 31 |
|
23 | 32 | SendBatch(ops []operation.MetricOperation, labels map[string]string) error |
24 | | - ApplyOperation(op operation.MetricOperation, commonLabels map[string]string) |
25 | | - |
26 | | - Grouped() GroupedStorage |
27 | 33 | } |
28 | 34 |
|
29 | 35 | type GroupedStorage interface { |
|
0 commit comments