aboutsummaryrefslogtreecommitdiffstats
path: root/library/go/core/metrics/nop/registry.go
blob: 0da02db4480b74aa1c1eed0c5d0ce349985bcdc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package nop

import (
	"context"
	"io"

	"github.com/ydb-platform/ydb/library/go/core/metrics"
)

var _ metrics.Registry = (*Registry)(nil)
var _ metrics.MetricsStreamer = (*Registry)(nil)

type Registry struct{}

func (r Registry) ComposeName(parts ...string) string {
	return ""
}

func (r Registry) WithTags(_ map[string]string) metrics.Registry {
	return Registry{}
}

func (r Registry) WithPrefix(_ string) metrics.Registry {
	return Registry{}
}

func (r Registry) Counter(_ string) metrics.Counter {
	return Counter{}
}

func (r Registry) FuncCounter(_ string, function func() int64) metrics.FuncCounter {
	return FuncCounter{function: function}
}

func (r Registry) Gauge(_ string) metrics.Gauge {
	return Gauge{}
}

func (r Registry) FuncGauge(_ string, function func() float64) metrics.FuncGauge {
	return FuncGauge{function: function}
}

func (r Registry) IntGauge(_ string) metrics.IntGauge {
	return IntGauge{}
}

func (r Registry) FuncIntGauge(_ string, function func() int64) metrics.FuncIntGauge {
	return FuncIntGauge{function: function}
}

func (r Registry) Timer(_ string) metrics.Timer {
	return Timer{}
}

func (r Registry) Histogram(_ string, _ metrics.Buckets) metrics.Histogram {
	return Histogram{}
}

func (r Registry) DurationHistogram(_ string, _ metrics.DurationBuckets) metrics.Timer {
	return Histogram{}
}

func (r Registry) CounterVec(_ string, _ []string) metrics.CounterVec {
	return CounterVec{}
}

func (r Registry) GaugeVec(_ string, _ []string) metrics.GaugeVec {
	return GaugeVec{}
}

func (r Registry) IntGaugeVec(_ string, _ []string) metrics.IntGaugeVec {
	return IntGaugeVec{}
}

func (r Registry) TimerVec(_ string, _ []string) metrics.TimerVec {
	return TimerVec{}
}

func (r Registry) HistogramVec(_ string, _ metrics.Buckets, _ []string) metrics.HistogramVec {
	return HistogramVec{}
}

func (r Registry) DurationHistogramVec(_ string, _ metrics.DurationBuckets, _ []string) metrics.TimerVec {
	return DurationHistogramVec{}
}

func (r Registry) Stream(_ context.Context, _ io.Writer) (int, error) {
	return 0, nil
}