vitess.io/vitess@v0.16.2/go/vt/vttablet/tabletserver/txthrottler/mock_throttler_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: vitess.io/vitess/go/vt/vttablet/tabletserver/txthrottler (interfaces: ThrottlerInterface) 3 4 // Package txthrottler is a generated GoMock package. 5 package txthrottler 6 7 import ( 8 reflect "reflect" 9 time "time" 10 11 gomock "github.com/golang/mock/gomock" 12 13 discovery "vitess.io/vitess/go/vt/discovery" 14 throttlerdata "vitess.io/vitess/go/vt/proto/throttlerdata" 15 ) 16 17 // MockThrottlerInterface is a mock of ThrottlerInterface interface. 18 type MockThrottlerInterface struct { 19 ctrl *gomock.Controller 20 recorder *MockThrottlerInterfaceMockRecorder 21 } 22 23 // MockThrottlerInterfaceMockRecorder is the mock recorder for MockThrottlerInterface. 24 type MockThrottlerInterfaceMockRecorder struct { 25 mock *MockThrottlerInterface 26 } 27 28 // NewMockThrottlerInterface creates a new mock instance. 29 func NewMockThrottlerInterface(ctrl *gomock.Controller) *MockThrottlerInterface { 30 mock := &MockThrottlerInterface{ctrl: ctrl} 31 mock.recorder = &MockThrottlerInterfaceMockRecorder{mock} 32 return mock 33 } 34 35 // EXPECT returns an object that allows the caller to indicate expected use. 36 func (m *MockThrottlerInterface) EXPECT() *MockThrottlerInterfaceMockRecorder { 37 return m.recorder 38 } 39 40 // Close mocks base method. 41 func (m *MockThrottlerInterface) Close() { 42 m.ctrl.T.Helper() 43 m.ctrl.Call(m, "Close") 44 } 45 46 // Close indicates an expected call of Close. 47 func (mr *MockThrottlerInterfaceMockRecorder) Close() *gomock.Call { 48 mr.mock.ctrl.T.Helper() 49 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockThrottlerInterface)(nil).Close)) 50 } 51 52 // GetConfiguration mocks base method. 53 func (m *MockThrottlerInterface) GetConfiguration() *throttlerdata.Configuration { 54 m.ctrl.T.Helper() 55 ret := m.ctrl.Call(m, "GetConfiguration") 56 ret0, _ := ret[0].(*throttlerdata.Configuration) 57 return ret0 58 } 59 60 // GetConfiguration indicates an expected call of GetConfiguration. 61 func (mr *MockThrottlerInterfaceMockRecorder) GetConfiguration() *gomock.Call { 62 mr.mock.ctrl.T.Helper() 63 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfiguration", reflect.TypeOf((*MockThrottlerInterface)(nil).GetConfiguration)) 64 } 65 66 // MaxRate mocks base method. 67 func (m *MockThrottlerInterface) MaxRate() int64 { 68 m.ctrl.T.Helper() 69 ret := m.ctrl.Call(m, "MaxRate") 70 ret0, _ := ret[0].(int64) 71 return ret0 72 } 73 74 // MaxRate indicates an expected call of MaxRate. 75 func (mr *MockThrottlerInterfaceMockRecorder) MaxRate() *gomock.Call { 76 mr.mock.ctrl.T.Helper() 77 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaxRate", reflect.TypeOf((*MockThrottlerInterface)(nil).MaxRate)) 78 } 79 80 // RecordReplicationLag mocks base method. 81 func (m *MockThrottlerInterface) RecordReplicationLag(arg0 time.Time, arg1 *discovery.TabletHealth) { 82 m.ctrl.T.Helper() 83 m.ctrl.Call(m, "RecordReplicationLag", arg0, arg1) 84 } 85 86 // RecordReplicationLag indicates an expected call of RecordReplicationLag. 87 func (mr *MockThrottlerInterfaceMockRecorder) RecordReplicationLag(arg0, arg1 interface{}) *gomock.Call { 88 mr.mock.ctrl.T.Helper() 89 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordReplicationLag", reflect.TypeOf((*MockThrottlerInterface)(nil).RecordReplicationLag), arg0, arg1) 90 } 91 92 // ResetConfiguration mocks base method. 93 func (m *MockThrottlerInterface) ResetConfiguration() { 94 m.ctrl.T.Helper() 95 m.ctrl.Call(m, "ResetConfiguration") 96 } 97 98 // ResetConfiguration indicates an expected call of ResetConfiguration. 99 func (mr *MockThrottlerInterfaceMockRecorder) ResetConfiguration() *gomock.Call { 100 mr.mock.ctrl.T.Helper() 101 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetConfiguration", reflect.TypeOf((*MockThrottlerInterface)(nil).ResetConfiguration)) 102 } 103 104 // SetMaxRate mocks base method. 105 func (m *MockThrottlerInterface) SetMaxRate(arg0 int64) { 106 m.ctrl.T.Helper() 107 m.ctrl.Call(m, "SetMaxRate", arg0) 108 } 109 110 // SetMaxRate indicates an expected call of SetMaxRate. 111 func (mr *MockThrottlerInterfaceMockRecorder) SetMaxRate(arg0 interface{}) *gomock.Call { 112 mr.mock.ctrl.T.Helper() 113 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMaxRate", reflect.TypeOf((*MockThrottlerInterface)(nil).SetMaxRate), arg0) 114 } 115 116 // ThreadFinished mocks base method. 117 func (m *MockThrottlerInterface) ThreadFinished(arg0 int) { 118 m.ctrl.T.Helper() 119 m.ctrl.Call(m, "ThreadFinished", arg0) 120 } 121 122 // ThreadFinished indicates an expected call of ThreadFinished. 123 func (mr *MockThrottlerInterfaceMockRecorder) ThreadFinished(arg0 interface{}) *gomock.Call { 124 mr.mock.ctrl.T.Helper() 125 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ThreadFinished", reflect.TypeOf((*MockThrottlerInterface)(nil).ThreadFinished), arg0) 126 } 127 128 // Throttle mocks base method. 129 func (m *MockThrottlerInterface) Throttle(arg0 int) time.Duration { 130 m.ctrl.T.Helper() 131 ret := m.ctrl.Call(m, "Throttle", arg0) 132 ret0, _ := ret[0].(time.Duration) 133 return ret0 134 } 135 136 // Throttle indicates an expected call of Throttle. 137 func (mr *MockThrottlerInterfaceMockRecorder) Throttle(arg0 interface{}) *gomock.Call { 138 mr.mock.ctrl.T.Helper() 139 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Throttle", reflect.TypeOf((*MockThrottlerInterface)(nil).Throttle), arg0) 140 } 141 142 // UpdateConfiguration mocks base method. 143 func (m *MockThrottlerInterface) UpdateConfiguration(arg0 *throttlerdata.Configuration, arg1 bool) error { 144 m.ctrl.T.Helper() 145 ret := m.ctrl.Call(m, "UpdateConfiguration", arg0, arg1) 146 ret0, _ := ret[0].(error) 147 return ret0 148 } 149 150 // UpdateConfiguration indicates an expected call of UpdateConfiguration. 151 func (mr *MockThrottlerInterfaceMockRecorder) UpdateConfiguration(arg0, arg1 interface{}) *gomock.Call { 152 mr.mock.ctrl.T.Helper() 153 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateConfiguration", reflect.TypeOf((*MockThrottlerInterface)(nil).UpdateConfiguration), arg0, arg1) 154 }