/
vector_util.go
51 lines (38 loc) · 1.02 KB
/
vector_util.go
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
package metrics
//------------------------------------------------------------------------------
type fCounterVec struct {
f func([]string) StatCounter
}
func (f *fCounterVec) With(labels ...string) StatCounter {
return f.f(labels)
}
func fakeCounterVec(f func([]string) StatCounter) StatCounterVec {
return &fCounterVec{
f: f,
}
}
//------------------------------------------------------------------------------
type fTimerVec struct {
f func([]string) StatTimer
}
func (f *fTimerVec) With(labels ...string) StatTimer {
return f.f(labels)
}
func fakeTimerVec(f func([]string) StatTimer) StatTimerVec {
return &fTimerVec{
f: f,
}
}
//------------------------------------------------------------------------------
type fGaugeVec struct {
f func([]string) StatGauge
}
func (f *fGaugeVec) With(labels ...string) StatGauge {
return f.f(labels)
}
func fakeGaugeVec(f func([]string) StatGauge) StatGaugeVec {
return &fGaugeVec{
f: f,
}
}
//------------------------------------------------------------------------------