This repository has been archived by the owner on Jul 20, 2022. It is now read-only.
/
instrumenting.go
109 lines (91 loc) · 3.04 KB
/
instrumenting.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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/go-kit/kit/metrics (interfaces: Counter,Histogram)
// Package mock is a generated GoMock package.
package mock
import (
metrics "github.com/go-kit/kit/metrics"
gomock "github.com/golang/mock/gomock"
reflect "reflect"
)
// Counter is a mock of Counter interface
type Counter struct {
ctrl *gomock.Controller
recorder *CounterMockRecorder
}
// CounterMockRecorder is the mock recorder for Counter
type CounterMockRecorder struct {
mock *Counter
}
// NewCounter creates a new mock instance
func NewCounter(ctrl *gomock.Controller) *Counter {
mock := &Counter{ctrl: ctrl}
mock.recorder = &CounterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *Counter) EXPECT() *CounterMockRecorder {
return m.recorder
}
// Add mocks base method
func (m *Counter) Add(arg0 float64) {
m.ctrl.Call(m, "Add", arg0)
}
// Add indicates an expected call of Add
func (mr *CounterMockRecorder) Add(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*Counter)(nil).Add), arg0)
}
// With mocks base method
func (m *Counter) With(arg0 ...string) metrics.Counter {
varargs := []interface{}{}
for _, a := range arg0 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "With", varargs...)
ret0, _ := ret[0].(metrics.Counter)
return ret0
}
// With indicates an expected call of With
func (mr *CounterMockRecorder) With(arg0 ...interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "With", reflect.TypeOf((*Counter)(nil).With), arg0...)
}
// Histogram is a mock of Histogram interface
type Histogram struct {
ctrl *gomock.Controller
recorder *HistogramMockRecorder
}
// HistogramMockRecorder is the mock recorder for Histogram
type HistogramMockRecorder struct {
mock *Histogram
}
// NewHistogram creates a new mock instance
func NewHistogram(ctrl *gomock.Controller) *Histogram {
mock := &Histogram{ctrl: ctrl}
mock.recorder = &HistogramMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *Histogram) EXPECT() *HistogramMockRecorder {
return m.recorder
}
// Observe mocks base method
func (m *Histogram) Observe(arg0 float64) {
m.ctrl.Call(m, "Observe", arg0)
}
// Observe indicates an expected call of Observe
func (mr *HistogramMockRecorder) Observe(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Observe", reflect.TypeOf((*Histogram)(nil).Observe), arg0)
}
// With mocks base method
func (m *Histogram) With(arg0 ...string) metrics.Histogram {
varargs := []interface{}{}
for _, a := range arg0 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "With", varargs...)
ret0, _ := ret[0].(metrics.Histogram)
return ret0
}
// With indicates an expected call of With
func (mr *HistogramMockRecorder) With(arg0 ...interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "With", reflect.TypeOf((*Histogram)(nil).With), arg0...)
}