go.temporal.io/server@v1.23.0/common/metrics/metrics_mock.go (about) 1 // The MIT License 2 // 3 // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. 4 // 5 // Copyright (c) 2020 Uber Technologies, Inc. 6 // 7 // Permission is hereby granted, free of charge, to any person obtaining a copy 8 // of this software and associated documentation files (the "Software"), to deal 9 // in the Software without restriction, including without limitation the rights 10 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 // copies of the Software, and to permit persons to whom the Software is 12 // furnished to do so, subject to the following conditions: 13 // 14 // The above copyright notice and this permission notice shall be included in 15 // all copies or substantial portions of the Software. 16 // 17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 // THE SOFTWARE. 24 25 // Code generated by MockGen. DO NOT EDIT. 26 // Source: metrics.go 27 28 // Package metrics is a generated GoMock package. 29 package metrics 30 31 import ( 32 reflect "reflect" 33 time "time" 34 35 gomock "github.com/golang/mock/gomock" 36 log "go.temporal.io/server/common/log" 37 ) 38 39 // MockHandler is a mock of Handler interface. 40 type MockHandler struct { 41 ctrl *gomock.Controller 42 recorder *MockHandlerMockRecorder 43 } 44 45 // MockHandlerMockRecorder is the mock recorder for MockHandler. 46 type MockHandlerMockRecorder struct { 47 mock *MockHandler 48 } 49 50 // NewMockHandler creates a new mock instance. 51 func NewMockHandler(ctrl *gomock.Controller) *MockHandler { 52 mock := &MockHandler{ctrl: ctrl} 53 mock.recorder = &MockHandlerMockRecorder{mock} 54 return mock 55 } 56 57 // EXPECT returns an object that allows the caller to indicate expected use. 58 func (m *MockHandler) EXPECT() *MockHandlerMockRecorder { 59 return m.recorder 60 } 61 62 // Counter mocks base method. 63 func (m *MockHandler) Counter(arg0 string) CounterIface { 64 m.ctrl.T.Helper() 65 ret := m.ctrl.Call(m, "Counter", arg0) 66 ret0, _ := ret[0].(CounterIface) 67 return ret0 68 } 69 70 // Counter indicates an expected call of Counter. 71 func (mr *MockHandlerMockRecorder) Counter(arg0 interface{}) *gomock.Call { 72 mr.mock.ctrl.T.Helper() 73 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Counter", reflect.TypeOf((*MockHandler)(nil).Counter), arg0) 74 } 75 76 // Gauge mocks base method. 77 func (m *MockHandler) Gauge(arg0 string) GaugeIface { 78 m.ctrl.T.Helper() 79 ret := m.ctrl.Call(m, "Gauge", arg0) 80 ret0, _ := ret[0].(GaugeIface) 81 return ret0 82 } 83 84 // Gauge indicates an expected call of Gauge. 85 func (mr *MockHandlerMockRecorder) Gauge(arg0 interface{}) *gomock.Call { 86 mr.mock.ctrl.T.Helper() 87 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Gauge", reflect.TypeOf((*MockHandler)(nil).Gauge), arg0) 88 } 89 90 // Histogram mocks base method. 91 func (m *MockHandler) Histogram(arg0 string, arg1 MetricUnit) HistogramIface { 92 m.ctrl.T.Helper() 93 ret := m.ctrl.Call(m, "Histogram", arg0, arg1) 94 ret0, _ := ret[0].(HistogramIface) 95 return ret0 96 } 97 98 // Histogram indicates an expected call of Histogram. 99 func (mr *MockHandlerMockRecorder) Histogram(arg0, arg1 interface{}) *gomock.Call { 100 mr.mock.ctrl.T.Helper() 101 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Histogram", reflect.TypeOf((*MockHandler)(nil).Histogram), arg0, arg1) 102 } 103 104 // Stop mocks base method. 105 func (m *MockHandler) Stop(arg0 log.Logger) { 106 m.ctrl.T.Helper() 107 m.ctrl.Call(m, "Stop", arg0) 108 } 109 110 // Stop indicates an expected call of Stop. 111 func (mr *MockHandlerMockRecorder) Stop(arg0 interface{}) *gomock.Call { 112 mr.mock.ctrl.T.Helper() 113 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockHandler)(nil).Stop), arg0) 114 } 115 116 // Timer mocks base method. 117 func (m *MockHandler) Timer(arg0 string) TimerIface { 118 m.ctrl.T.Helper() 119 ret := m.ctrl.Call(m, "Timer", arg0) 120 ret0, _ := ret[0].(TimerIface) 121 return ret0 122 } 123 124 // Timer indicates an expected call of Timer. 125 func (mr *MockHandlerMockRecorder) Timer(arg0 interface{}) *gomock.Call { 126 mr.mock.ctrl.T.Helper() 127 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Timer", reflect.TypeOf((*MockHandler)(nil).Timer), arg0) 128 } 129 130 // WithTags mocks base method. 131 func (m *MockHandler) WithTags(arg0 ...Tag) Handler { 132 m.ctrl.T.Helper() 133 varargs := []interface{}{} 134 for _, a := range arg0 { 135 varargs = append(varargs, a) 136 } 137 ret := m.ctrl.Call(m, "WithTags", varargs...) 138 ret0, _ := ret[0].(Handler) 139 return ret0 140 } 141 142 // WithTags indicates an expected call of WithTags. 143 func (mr *MockHandlerMockRecorder) WithTags(arg0 ...interface{}) *gomock.Call { 144 mr.mock.ctrl.T.Helper() 145 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithTags", reflect.TypeOf((*MockHandler)(nil).WithTags), arg0...) 146 } 147 148 // MockCounterIface is a mock of CounterIface interface. 149 type MockCounterIface struct { 150 ctrl *gomock.Controller 151 recorder *MockCounterIfaceMockRecorder 152 } 153 154 // MockCounterIfaceMockRecorder is the mock recorder for MockCounterIface. 155 type MockCounterIfaceMockRecorder struct { 156 mock *MockCounterIface 157 } 158 159 // NewMockCounterIface creates a new mock instance. 160 func NewMockCounterIface(ctrl *gomock.Controller) *MockCounterIface { 161 mock := &MockCounterIface{ctrl: ctrl} 162 mock.recorder = &MockCounterIfaceMockRecorder{mock} 163 return mock 164 } 165 166 // EXPECT returns an object that allows the caller to indicate expected use. 167 func (m *MockCounterIface) EXPECT() *MockCounterIfaceMockRecorder { 168 return m.recorder 169 } 170 171 // Record mocks base method. 172 func (m *MockCounterIface) Record(arg0 int64, arg1 ...Tag) { 173 m.ctrl.T.Helper() 174 varargs := []interface{}{arg0} 175 for _, a := range arg1 { 176 varargs = append(varargs, a) 177 } 178 m.ctrl.Call(m, "Record", varargs...) 179 } 180 181 // Record indicates an expected call of Record. 182 func (mr *MockCounterIfaceMockRecorder) Record(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 183 mr.mock.ctrl.T.Helper() 184 varargs := append([]interface{}{arg0}, arg1...) 185 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Record", reflect.TypeOf((*MockCounterIface)(nil).Record), varargs...) 186 } 187 188 // MockGaugeIface is a mock of GaugeIface interface. 189 type MockGaugeIface struct { 190 ctrl *gomock.Controller 191 recorder *MockGaugeIfaceMockRecorder 192 } 193 194 // MockGaugeIfaceMockRecorder is the mock recorder for MockGaugeIface. 195 type MockGaugeIfaceMockRecorder struct { 196 mock *MockGaugeIface 197 } 198 199 // NewMockGaugeIface creates a new mock instance. 200 func NewMockGaugeIface(ctrl *gomock.Controller) *MockGaugeIface { 201 mock := &MockGaugeIface{ctrl: ctrl} 202 mock.recorder = &MockGaugeIfaceMockRecorder{mock} 203 return mock 204 } 205 206 // EXPECT returns an object that allows the caller to indicate expected use. 207 func (m *MockGaugeIface) EXPECT() *MockGaugeIfaceMockRecorder { 208 return m.recorder 209 } 210 211 // Record mocks base method. 212 func (m *MockGaugeIface) Record(arg0 float64, arg1 ...Tag) { 213 m.ctrl.T.Helper() 214 varargs := []interface{}{arg0} 215 for _, a := range arg1 { 216 varargs = append(varargs, a) 217 } 218 m.ctrl.Call(m, "Record", varargs...) 219 } 220 221 // Record indicates an expected call of Record. 222 func (mr *MockGaugeIfaceMockRecorder) Record(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 223 mr.mock.ctrl.T.Helper() 224 varargs := append([]interface{}{arg0}, arg1...) 225 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Record", reflect.TypeOf((*MockGaugeIface)(nil).Record), varargs...) 226 } 227 228 // MockTimerIface is a mock of TimerIface interface. 229 type MockTimerIface struct { 230 ctrl *gomock.Controller 231 recorder *MockTimerIfaceMockRecorder 232 } 233 234 // MockTimerIfaceMockRecorder is the mock recorder for MockTimerIface. 235 type MockTimerIfaceMockRecorder struct { 236 mock *MockTimerIface 237 } 238 239 // NewMockTimerIface creates a new mock instance. 240 func NewMockTimerIface(ctrl *gomock.Controller) *MockTimerIface { 241 mock := &MockTimerIface{ctrl: ctrl} 242 mock.recorder = &MockTimerIfaceMockRecorder{mock} 243 return mock 244 } 245 246 // EXPECT returns an object that allows the caller to indicate expected use. 247 func (m *MockTimerIface) EXPECT() *MockTimerIfaceMockRecorder { 248 return m.recorder 249 } 250 251 // Record mocks base method. 252 func (m *MockTimerIface) Record(arg0 time.Duration, arg1 ...Tag) { 253 m.ctrl.T.Helper() 254 varargs := []interface{}{arg0} 255 for _, a := range arg1 { 256 varargs = append(varargs, a) 257 } 258 m.ctrl.Call(m, "Record", varargs...) 259 } 260 261 // Record indicates an expected call of Record. 262 func (mr *MockTimerIfaceMockRecorder) Record(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 263 mr.mock.ctrl.T.Helper() 264 varargs := append([]interface{}{arg0}, arg1...) 265 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Record", reflect.TypeOf((*MockTimerIface)(nil).Record), varargs...) 266 } 267 268 // MockHistogramIface is a mock of HistogramIface interface. 269 type MockHistogramIface struct { 270 ctrl *gomock.Controller 271 recorder *MockHistogramIfaceMockRecorder 272 } 273 274 // MockHistogramIfaceMockRecorder is the mock recorder for MockHistogramIface. 275 type MockHistogramIfaceMockRecorder struct { 276 mock *MockHistogramIface 277 } 278 279 // NewMockHistogramIface creates a new mock instance. 280 func NewMockHistogramIface(ctrl *gomock.Controller) *MockHistogramIface { 281 mock := &MockHistogramIface{ctrl: ctrl} 282 mock.recorder = &MockHistogramIfaceMockRecorder{mock} 283 return mock 284 } 285 286 // EXPECT returns an object that allows the caller to indicate expected use. 287 func (m *MockHistogramIface) EXPECT() *MockHistogramIfaceMockRecorder { 288 return m.recorder 289 } 290 291 // Record mocks base method. 292 func (m *MockHistogramIface) Record(arg0 int64, arg1 ...Tag) { 293 m.ctrl.T.Helper() 294 varargs := []interface{}{arg0} 295 for _, a := range arg1 { 296 varargs = append(varargs, a) 297 } 298 m.ctrl.Call(m, "Record", varargs...) 299 } 300 301 // Record indicates an expected call of Record. 302 func (mr *MockHistogramIfaceMockRecorder) Record(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 303 mr.mock.ctrl.T.Helper() 304 varargs := append([]interface{}{arg0}, arg1...) 305 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Record", reflect.TypeOf((*MockHistogramIface)(nil).Record), varargs...) 306 }