github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/cmd/services/m3coordinator/downsample/downsample_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/m3db/m3/src/cmd/services/m3coordinator/downsample (interfaces: Downsampler,MetricsAppender,SamplesAppender) 3 4 // Copyright (c) 2021 Uber Technologies, Inc. 5 // 6 // Permission is hereby granted, free of charge, to any person obtaining a copy 7 // of this software and associated documentation files (the "Software"), to deal 8 // in the Software without restriction, including without limitation the rights 9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 // copies of the Software, and to permit persons to whom the Software is 11 // furnished to do so, subject to the following conditions: 12 // 13 // The above copyright notice and this permission notice shall be included in 14 // all copies or substantial portions of the Software. 15 // 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 // THE SOFTWARE. 23 24 // Package downsample is a generated GoMock package. 25 package downsample 26 27 import ( 28 "reflect" 29 30 "github.com/m3db/m3/src/metrics/rules/view" 31 "github.com/m3db/m3/src/x/time" 32 33 "github.com/golang/mock/gomock" 34 ) 35 36 // MockDownsampler is a mock of Downsampler interface. 37 type MockDownsampler struct { 38 ctrl *gomock.Controller 39 recorder *MockDownsamplerMockRecorder 40 } 41 42 // MockDownsamplerMockRecorder is the mock recorder for MockDownsampler. 43 type MockDownsamplerMockRecorder struct { 44 mock *MockDownsampler 45 } 46 47 // NewMockDownsampler creates a new mock instance. 48 func NewMockDownsampler(ctrl *gomock.Controller) *MockDownsampler { 49 mock := &MockDownsampler{ctrl: ctrl} 50 mock.recorder = &MockDownsamplerMockRecorder{mock} 51 return mock 52 } 53 54 // EXPECT returns an object that allows the caller to indicate expected use. 55 func (m *MockDownsampler) EXPECT() *MockDownsamplerMockRecorder { 56 return m.recorder 57 } 58 59 // Enabled mocks base method. 60 func (m *MockDownsampler) Enabled() bool { 61 m.ctrl.T.Helper() 62 ret := m.ctrl.Call(m, "Enabled") 63 ret0, _ := ret[0].(bool) 64 return ret0 65 } 66 67 // Enabled indicates an expected call of Enabled. 68 func (mr *MockDownsamplerMockRecorder) Enabled() *gomock.Call { 69 mr.mock.ctrl.T.Helper() 70 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Enabled", reflect.TypeOf((*MockDownsampler)(nil).Enabled)) 71 } 72 73 // LatestRollupRules mocks base method. 74 func (m *MockDownsampler) LatestRollupRules(arg0 []byte, arg1 int64) ([]view.RollupRule, error) { 75 m.ctrl.T.Helper() 76 ret := m.ctrl.Call(m, "LatestRollupRules", arg0, arg1) 77 ret0, _ := ret[0].([]view.RollupRule) 78 ret1, _ := ret[1].(error) 79 return ret0, ret1 80 } 81 82 // LatestRollupRules indicates an expected call of LatestRollupRules. 83 func (mr *MockDownsamplerMockRecorder) LatestRollupRules(arg0, arg1 interface{}) *gomock.Call { 84 mr.mock.ctrl.T.Helper() 85 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestRollupRules", reflect.TypeOf((*MockDownsampler)(nil).LatestRollupRules), arg0, arg1) 86 } 87 88 // NewMetricsAppender mocks base method. 89 func (m *MockDownsampler) NewMetricsAppender() (MetricsAppender, error) { 90 m.ctrl.T.Helper() 91 ret := m.ctrl.Call(m, "NewMetricsAppender") 92 ret0, _ := ret[0].(MetricsAppender) 93 ret1, _ := ret[1].(error) 94 return ret0, ret1 95 } 96 97 // NewMetricsAppender indicates an expected call of NewMetricsAppender. 98 func (mr *MockDownsamplerMockRecorder) NewMetricsAppender() *gomock.Call { 99 mr.mock.ctrl.T.Helper() 100 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewMetricsAppender", reflect.TypeOf((*MockDownsampler)(nil).NewMetricsAppender)) 101 } 102 103 // MockMetricsAppender is a mock of MetricsAppender interface. 104 type MockMetricsAppender struct { 105 ctrl *gomock.Controller 106 recorder *MockMetricsAppenderMockRecorder 107 } 108 109 // MockMetricsAppenderMockRecorder is the mock recorder for MockMetricsAppender. 110 type MockMetricsAppenderMockRecorder struct { 111 mock *MockMetricsAppender 112 } 113 114 // NewMockMetricsAppender creates a new mock instance. 115 func NewMockMetricsAppender(ctrl *gomock.Controller) *MockMetricsAppender { 116 mock := &MockMetricsAppender{ctrl: ctrl} 117 mock.recorder = &MockMetricsAppenderMockRecorder{mock} 118 return mock 119 } 120 121 // EXPECT returns an object that allows the caller to indicate expected use. 122 func (m *MockMetricsAppender) EXPECT() *MockMetricsAppenderMockRecorder { 123 return m.recorder 124 } 125 126 // AddTag mocks base method. 127 func (m *MockMetricsAppender) AddTag(arg0, arg1 []byte) { 128 m.ctrl.T.Helper() 129 m.ctrl.Call(m, "AddTag", arg0, arg1) 130 } 131 132 // AddTag indicates an expected call of AddTag. 133 func (mr *MockMetricsAppenderMockRecorder) AddTag(arg0, arg1 interface{}) *gomock.Call { 134 mr.mock.ctrl.T.Helper() 135 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTag", reflect.TypeOf((*MockMetricsAppender)(nil).AddTag), arg0, arg1) 136 } 137 138 // Finalize mocks base method. 139 func (m *MockMetricsAppender) Finalize() { 140 m.ctrl.T.Helper() 141 m.ctrl.Call(m, "Finalize") 142 } 143 144 // Finalize indicates an expected call of Finalize. 145 func (mr *MockMetricsAppenderMockRecorder) Finalize() *gomock.Call { 146 mr.mock.ctrl.T.Helper() 147 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finalize", reflect.TypeOf((*MockMetricsAppender)(nil).Finalize)) 148 } 149 150 // NextMetric mocks base method. 151 func (m *MockMetricsAppender) NextMetric() { 152 m.ctrl.T.Helper() 153 m.ctrl.Call(m, "NextMetric") 154 } 155 156 // NextMetric indicates an expected call of NextMetric. 157 func (mr *MockMetricsAppenderMockRecorder) NextMetric() *gomock.Call { 158 mr.mock.ctrl.T.Helper() 159 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextMetric", reflect.TypeOf((*MockMetricsAppender)(nil).NextMetric)) 160 } 161 162 // SamplesAppender mocks base method. 163 func (m *MockMetricsAppender) SamplesAppender(arg0 SampleAppenderOptions) (SamplesAppenderResult, error) { 164 m.ctrl.T.Helper() 165 ret := m.ctrl.Call(m, "SamplesAppender", arg0) 166 ret0, _ := ret[0].(SamplesAppenderResult) 167 ret1, _ := ret[1].(error) 168 return ret0, ret1 169 } 170 171 // SamplesAppender indicates an expected call of SamplesAppender. 172 func (mr *MockMetricsAppenderMockRecorder) SamplesAppender(arg0 interface{}) *gomock.Call { 173 mr.mock.ctrl.T.Helper() 174 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SamplesAppender", reflect.TypeOf((*MockMetricsAppender)(nil).SamplesAppender), arg0) 175 } 176 177 // MockSamplesAppender is a mock of SamplesAppender interface. 178 type MockSamplesAppender struct { 179 ctrl *gomock.Controller 180 recorder *MockSamplesAppenderMockRecorder 181 } 182 183 // MockSamplesAppenderMockRecorder is the mock recorder for MockSamplesAppender. 184 type MockSamplesAppenderMockRecorder struct { 185 mock *MockSamplesAppender 186 } 187 188 // NewMockSamplesAppender creates a new mock instance. 189 func NewMockSamplesAppender(ctrl *gomock.Controller) *MockSamplesAppender { 190 mock := &MockSamplesAppender{ctrl: ctrl} 191 mock.recorder = &MockSamplesAppenderMockRecorder{mock} 192 return mock 193 } 194 195 // EXPECT returns an object that allows the caller to indicate expected use. 196 func (m *MockSamplesAppender) EXPECT() *MockSamplesAppenderMockRecorder { 197 return m.recorder 198 } 199 200 // AppendCounterSample mocks base method. 201 func (m *MockSamplesAppender) AppendCounterSample(arg0 time.UnixNano, arg1 int64, arg2 []byte) error { 202 m.ctrl.T.Helper() 203 ret := m.ctrl.Call(m, "AppendCounterSample", arg0, arg1, arg2) 204 ret0, _ := ret[0].(error) 205 return ret0 206 } 207 208 // AppendCounterSample indicates an expected call of AppendCounterSample. 209 func (mr *MockSamplesAppenderMockRecorder) AppendCounterSample(arg0, arg1, arg2 interface{}) *gomock.Call { 210 mr.mock.ctrl.T.Helper() 211 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendCounterSample", reflect.TypeOf((*MockSamplesAppender)(nil).AppendCounterSample), arg0, arg1, arg2) 212 } 213 214 // AppendGaugeSample mocks base method. 215 func (m *MockSamplesAppender) AppendGaugeSample(arg0 time.UnixNano, arg1 float64, arg2 []byte) error { 216 m.ctrl.T.Helper() 217 ret := m.ctrl.Call(m, "AppendGaugeSample", arg0, arg1, arg2) 218 ret0, _ := ret[0].(error) 219 return ret0 220 } 221 222 // AppendGaugeSample indicates an expected call of AppendGaugeSample. 223 func (mr *MockSamplesAppenderMockRecorder) AppendGaugeSample(arg0, arg1, arg2 interface{}) *gomock.Call { 224 mr.mock.ctrl.T.Helper() 225 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendGaugeSample", reflect.TypeOf((*MockSamplesAppender)(nil).AppendGaugeSample), arg0, arg1, arg2) 226 } 227 228 // AppendTimerSample mocks base method. 229 func (m *MockSamplesAppender) AppendTimerSample(arg0 time.UnixNano, arg1 float64, arg2 []byte) error { 230 m.ctrl.T.Helper() 231 ret := m.ctrl.Call(m, "AppendTimerSample", arg0, arg1, arg2) 232 ret0, _ := ret[0].(error) 233 return ret0 234 } 235 236 // AppendTimerSample indicates an expected call of AppendTimerSample. 237 func (mr *MockSamplesAppenderMockRecorder) AppendTimerSample(arg0, arg1, arg2 interface{}) *gomock.Call { 238 mr.mock.ctrl.T.Helper() 239 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendTimerSample", reflect.TypeOf((*MockSamplesAppender)(nil).AppendTimerSample), arg0, arg1, arg2) 240 } 241 242 // AppendUntimedCounterSample mocks base method. 243 func (m *MockSamplesAppender) AppendUntimedCounterSample(arg0 time.UnixNano, arg1 int64, arg2 []byte) error { 244 m.ctrl.T.Helper() 245 ret := m.ctrl.Call(m, "AppendUntimedCounterSample", arg0, arg1, arg2) 246 ret0, _ := ret[0].(error) 247 return ret0 248 } 249 250 // AppendUntimedCounterSample indicates an expected call of AppendUntimedCounterSample. 251 func (mr *MockSamplesAppenderMockRecorder) AppendUntimedCounterSample(arg0, arg1, arg2 interface{}) *gomock.Call { 252 mr.mock.ctrl.T.Helper() 253 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendUntimedCounterSample", reflect.TypeOf((*MockSamplesAppender)(nil).AppendUntimedCounterSample), arg0, arg1, arg2) 254 } 255 256 // AppendUntimedGaugeSample mocks base method. 257 func (m *MockSamplesAppender) AppendUntimedGaugeSample(arg0 time.UnixNano, arg1 float64, arg2 []byte) error { 258 m.ctrl.T.Helper() 259 ret := m.ctrl.Call(m, "AppendUntimedGaugeSample", arg0, arg1, arg2) 260 ret0, _ := ret[0].(error) 261 return ret0 262 } 263 264 // AppendUntimedGaugeSample indicates an expected call of AppendUntimedGaugeSample. 265 func (mr *MockSamplesAppenderMockRecorder) AppendUntimedGaugeSample(arg0, arg1, arg2 interface{}) *gomock.Call { 266 mr.mock.ctrl.T.Helper() 267 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendUntimedGaugeSample", reflect.TypeOf((*MockSamplesAppender)(nil).AppendUntimedGaugeSample), arg0, arg1, arg2) 268 } 269 270 // AppendUntimedTimerSample mocks base method. 271 func (m *MockSamplesAppender) AppendUntimedTimerSample(arg0 time.UnixNano, arg1 float64, arg2 []byte) error { 272 m.ctrl.T.Helper() 273 ret := m.ctrl.Call(m, "AppendUntimedTimerSample", arg0, arg1, arg2) 274 ret0, _ := ret[0].(error) 275 return ret0 276 } 277 278 // AppendUntimedTimerSample indicates an expected call of AppendUntimedTimerSample. 279 func (mr *MockSamplesAppenderMockRecorder) AppendUntimedTimerSample(arg0, arg1, arg2 interface{}) *gomock.Call { 280 mr.mock.ctrl.T.Helper() 281 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendUntimedTimerSample", reflect.TypeOf((*MockSamplesAppender)(nil).AppendUntimedTimerSample), arg0, arg1, arg2) 282 }