github.com/quic-go/quic-go@v0.44.0/internal/mocks/connection_flow_controller.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/quic-go/quic-go/internal/flowcontrol (interfaces: ConnectionFlowController) 3 // 4 // Generated by this command: 5 // 6 // mockgen -typed -build_flags=-tags=gomock -package mocks -destination connection_flow_controller.go github.com/quic-go/quic-go/internal/flowcontrol ConnectionFlowController 7 // 8 9 // Package mocks is a generated GoMock package. 10 package mocks 11 12 import ( 13 reflect "reflect" 14 15 protocol "github.com/quic-go/quic-go/internal/protocol" 16 gomock "go.uber.org/mock/gomock" 17 ) 18 19 // MockConnectionFlowController is a mock of ConnectionFlowController interface. 20 type MockConnectionFlowController struct { 21 ctrl *gomock.Controller 22 recorder *MockConnectionFlowControllerMockRecorder 23 } 24 25 // MockConnectionFlowControllerMockRecorder is the mock recorder for MockConnectionFlowController. 26 type MockConnectionFlowControllerMockRecorder struct { 27 mock *MockConnectionFlowController 28 } 29 30 // NewMockConnectionFlowController creates a new mock instance. 31 func NewMockConnectionFlowController(ctrl *gomock.Controller) *MockConnectionFlowController { 32 mock := &MockConnectionFlowController{ctrl: ctrl} 33 mock.recorder = &MockConnectionFlowControllerMockRecorder{mock} 34 return mock 35 } 36 37 // EXPECT returns an object that allows the caller to indicate expected use. 38 func (m *MockConnectionFlowController) EXPECT() *MockConnectionFlowControllerMockRecorder { 39 return m.recorder 40 } 41 42 // AddBytesRead mocks base method. 43 func (m *MockConnectionFlowController) AddBytesRead(arg0 protocol.ByteCount) { 44 m.ctrl.T.Helper() 45 m.ctrl.Call(m, "AddBytesRead", arg0) 46 } 47 48 // AddBytesRead indicates an expected call of AddBytesRead. 49 func (mr *MockConnectionFlowControllerMockRecorder) AddBytesRead(arg0 any) *MockConnectionFlowControllerAddBytesReadCall { 50 mr.mock.ctrl.T.Helper() 51 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBytesRead", reflect.TypeOf((*MockConnectionFlowController)(nil).AddBytesRead), arg0) 52 return &MockConnectionFlowControllerAddBytesReadCall{Call: call} 53 } 54 55 // MockConnectionFlowControllerAddBytesReadCall wrap *gomock.Call 56 type MockConnectionFlowControllerAddBytesReadCall struct { 57 *gomock.Call 58 } 59 60 // Return rewrite *gomock.Call.Return 61 func (c *MockConnectionFlowControllerAddBytesReadCall) Return() *MockConnectionFlowControllerAddBytesReadCall { 62 c.Call = c.Call.Return() 63 return c 64 } 65 66 // Do rewrite *gomock.Call.Do 67 func (c *MockConnectionFlowControllerAddBytesReadCall) Do(f func(protocol.ByteCount)) *MockConnectionFlowControllerAddBytesReadCall { 68 c.Call = c.Call.Do(f) 69 return c 70 } 71 72 // DoAndReturn rewrite *gomock.Call.DoAndReturn 73 func (c *MockConnectionFlowControllerAddBytesReadCall) DoAndReturn(f func(protocol.ByteCount)) *MockConnectionFlowControllerAddBytesReadCall { 74 c.Call = c.Call.DoAndReturn(f) 75 return c 76 } 77 78 // AddBytesSent mocks base method. 79 func (m *MockConnectionFlowController) AddBytesSent(arg0 protocol.ByteCount) { 80 m.ctrl.T.Helper() 81 m.ctrl.Call(m, "AddBytesSent", arg0) 82 } 83 84 // AddBytesSent indicates an expected call of AddBytesSent. 85 func (mr *MockConnectionFlowControllerMockRecorder) AddBytesSent(arg0 any) *MockConnectionFlowControllerAddBytesSentCall { 86 mr.mock.ctrl.T.Helper() 87 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBytesSent", reflect.TypeOf((*MockConnectionFlowController)(nil).AddBytesSent), arg0) 88 return &MockConnectionFlowControllerAddBytesSentCall{Call: call} 89 } 90 91 // MockConnectionFlowControllerAddBytesSentCall wrap *gomock.Call 92 type MockConnectionFlowControllerAddBytesSentCall struct { 93 *gomock.Call 94 } 95 96 // Return rewrite *gomock.Call.Return 97 func (c *MockConnectionFlowControllerAddBytesSentCall) Return() *MockConnectionFlowControllerAddBytesSentCall { 98 c.Call = c.Call.Return() 99 return c 100 } 101 102 // Do rewrite *gomock.Call.Do 103 func (c *MockConnectionFlowControllerAddBytesSentCall) Do(f func(protocol.ByteCount)) *MockConnectionFlowControllerAddBytesSentCall { 104 c.Call = c.Call.Do(f) 105 return c 106 } 107 108 // DoAndReturn rewrite *gomock.Call.DoAndReturn 109 func (c *MockConnectionFlowControllerAddBytesSentCall) DoAndReturn(f func(protocol.ByteCount)) *MockConnectionFlowControllerAddBytesSentCall { 110 c.Call = c.Call.DoAndReturn(f) 111 return c 112 } 113 114 // GetWindowUpdate mocks base method. 115 func (m *MockConnectionFlowController) GetWindowUpdate() protocol.ByteCount { 116 m.ctrl.T.Helper() 117 ret := m.ctrl.Call(m, "GetWindowUpdate") 118 ret0, _ := ret[0].(protocol.ByteCount) 119 return ret0 120 } 121 122 // GetWindowUpdate indicates an expected call of GetWindowUpdate. 123 func (mr *MockConnectionFlowControllerMockRecorder) GetWindowUpdate() *MockConnectionFlowControllerGetWindowUpdateCall { 124 mr.mock.ctrl.T.Helper() 125 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWindowUpdate", reflect.TypeOf((*MockConnectionFlowController)(nil).GetWindowUpdate)) 126 return &MockConnectionFlowControllerGetWindowUpdateCall{Call: call} 127 } 128 129 // MockConnectionFlowControllerGetWindowUpdateCall wrap *gomock.Call 130 type MockConnectionFlowControllerGetWindowUpdateCall struct { 131 *gomock.Call 132 } 133 134 // Return rewrite *gomock.Call.Return 135 func (c *MockConnectionFlowControllerGetWindowUpdateCall) Return(arg0 protocol.ByteCount) *MockConnectionFlowControllerGetWindowUpdateCall { 136 c.Call = c.Call.Return(arg0) 137 return c 138 } 139 140 // Do rewrite *gomock.Call.Do 141 func (c *MockConnectionFlowControllerGetWindowUpdateCall) Do(f func() protocol.ByteCount) *MockConnectionFlowControllerGetWindowUpdateCall { 142 c.Call = c.Call.Do(f) 143 return c 144 } 145 146 // DoAndReturn rewrite *gomock.Call.DoAndReturn 147 func (c *MockConnectionFlowControllerGetWindowUpdateCall) DoAndReturn(f func() protocol.ByteCount) *MockConnectionFlowControllerGetWindowUpdateCall { 148 c.Call = c.Call.DoAndReturn(f) 149 return c 150 } 151 152 // IsNewlyBlocked mocks base method. 153 func (m *MockConnectionFlowController) IsNewlyBlocked() (bool, protocol.ByteCount) { 154 m.ctrl.T.Helper() 155 ret := m.ctrl.Call(m, "IsNewlyBlocked") 156 ret0, _ := ret[0].(bool) 157 ret1, _ := ret[1].(protocol.ByteCount) 158 return ret0, ret1 159 } 160 161 // IsNewlyBlocked indicates an expected call of IsNewlyBlocked. 162 func (mr *MockConnectionFlowControllerMockRecorder) IsNewlyBlocked() *MockConnectionFlowControllerIsNewlyBlockedCall { 163 mr.mock.ctrl.T.Helper() 164 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNewlyBlocked", reflect.TypeOf((*MockConnectionFlowController)(nil).IsNewlyBlocked)) 165 return &MockConnectionFlowControllerIsNewlyBlockedCall{Call: call} 166 } 167 168 // MockConnectionFlowControllerIsNewlyBlockedCall wrap *gomock.Call 169 type MockConnectionFlowControllerIsNewlyBlockedCall struct { 170 *gomock.Call 171 } 172 173 // Return rewrite *gomock.Call.Return 174 func (c *MockConnectionFlowControllerIsNewlyBlockedCall) Return(arg0 bool, arg1 protocol.ByteCount) *MockConnectionFlowControllerIsNewlyBlockedCall { 175 c.Call = c.Call.Return(arg0, arg1) 176 return c 177 } 178 179 // Do rewrite *gomock.Call.Do 180 func (c *MockConnectionFlowControllerIsNewlyBlockedCall) Do(f func() (bool, protocol.ByteCount)) *MockConnectionFlowControllerIsNewlyBlockedCall { 181 c.Call = c.Call.Do(f) 182 return c 183 } 184 185 // DoAndReturn rewrite *gomock.Call.DoAndReturn 186 func (c *MockConnectionFlowControllerIsNewlyBlockedCall) DoAndReturn(f func() (bool, protocol.ByteCount)) *MockConnectionFlowControllerIsNewlyBlockedCall { 187 c.Call = c.Call.DoAndReturn(f) 188 return c 189 } 190 191 // Reset mocks base method. 192 func (m *MockConnectionFlowController) Reset() error { 193 m.ctrl.T.Helper() 194 ret := m.ctrl.Call(m, "Reset") 195 ret0, _ := ret[0].(error) 196 return ret0 197 } 198 199 // Reset indicates an expected call of Reset. 200 func (mr *MockConnectionFlowControllerMockRecorder) Reset() *MockConnectionFlowControllerResetCall { 201 mr.mock.ctrl.T.Helper() 202 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockConnectionFlowController)(nil).Reset)) 203 return &MockConnectionFlowControllerResetCall{Call: call} 204 } 205 206 // MockConnectionFlowControllerResetCall wrap *gomock.Call 207 type MockConnectionFlowControllerResetCall struct { 208 *gomock.Call 209 } 210 211 // Return rewrite *gomock.Call.Return 212 func (c *MockConnectionFlowControllerResetCall) Return(arg0 error) *MockConnectionFlowControllerResetCall { 213 c.Call = c.Call.Return(arg0) 214 return c 215 } 216 217 // Do rewrite *gomock.Call.Do 218 func (c *MockConnectionFlowControllerResetCall) Do(f func() error) *MockConnectionFlowControllerResetCall { 219 c.Call = c.Call.Do(f) 220 return c 221 } 222 223 // DoAndReturn rewrite *gomock.Call.DoAndReturn 224 func (c *MockConnectionFlowControllerResetCall) DoAndReturn(f func() error) *MockConnectionFlowControllerResetCall { 225 c.Call = c.Call.DoAndReturn(f) 226 return c 227 } 228 229 // SendWindowSize mocks base method. 230 func (m *MockConnectionFlowController) SendWindowSize() protocol.ByteCount { 231 m.ctrl.T.Helper() 232 ret := m.ctrl.Call(m, "SendWindowSize") 233 ret0, _ := ret[0].(protocol.ByteCount) 234 return ret0 235 } 236 237 // SendWindowSize indicates an expected call of SendWindowSize. 238 func (mr *MockConnectionFlowControllerMockRecorder) SendWindowSize() *MockConnectionFlowControllerSendWindowSizeCall { 239 mr.mock.ctrl.T.Helper() 240 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendWindowSize", reflect.TypeOf((*MockConnectionFlowController)(nil).SendWindowSize)) 241 return &MockConnectionFlowControllerSendWindowSizeCall{Call: call} 242 } 243 244 // MockConnectionFlowControllerSendWindowSizeCall wrap *gomock.Call 245 type MockConnectionFlowControllerSendWindowSizeCall struct { 246 *gomock.Call 247 } 248 249 // Return rewrite *gomock.Call.Return 250 func (c *MockConnectionFlowControllerSendWindowSizeCall) Return(arg0 protocol.ByteCount) *MockConnectionFlowControllerSendWindowSizeCall { 251 c.Call = c.Call.Return(arg0) 252 return c 253 } 254 255 // Do rewrite *gomock.Call.Do 256 func (c *MockConnectionFlowControllerSendWindowSizeCall) Do(f func() protocol.ByteCount) *MockConnectionFlowControllerSendWindowSizeCall { 257 c.Call = c.Call.Do(f) 258 return c 259 } 260 261 // DoAndReturn rewrite *gomock.Call.DoAndReturn 262 func (c *MockConnectionFlowControllerSendWindowSizeCall) DoAndReturn(f func() protocol.ByteCount) *MockConnectionFlowControllerSendWindowSizeCall { 263 c.Call = c.Call.DoAndReturn(f) 264 return c 265 } 266 267 // UpdateSendWindow mocks base method. 268 func (m *MockConnectionFlowController) UpdateSendWindow(arg0 protocol.ByteCount) bool { 269 m.ctrl.T.Helper() 270 ret := m.ctrl.Call(m, "UpdateSendWindow", arg0) 271 ret0, _ := ret[0].(bool) 272 return ret0 273 } 274 275 // UpdateSendWindow indicates an expected call of UpdateSendWindow. 276 func (mr *MockConnectionFlowControllerMockRecorder) UpdateSendWindow(arg0 any) *MockConnectionFlowControllerUpdateSendWindowCall { 277 mr.mock.ctrl.T.Helper() 278 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSendWindow", reflect.TypeOf((*MockConnectionFlowController)(nil).UpdateSendWindow), arg0) 279 return &MockConnectionFlowControllerUpdateSendWindowCall{Call: call} 280 } 281 282 // MockConnectionFlowControllerUpdateSendWindowCall wrap *gomock.Call 283 type MockConnectionFlowControllerUpdateSendWindowCall struct { 284 *gomock.Call 285 } 286 287 // Return rewrite *gomock.Call.Return 288 func (c *MockConnectionFlowControllerUpdateSendWindowCall) Return(arg0 bool) *MockConnectionFlowControllerUpdateSendWindowCall { 289 c.Call = c.Call.Return(arg0) 290 return c 291 } 292 293 // Do rewrite *gomock.Call.Do 294 func (c *MockConnectionFlowControllerUpdateSendWindowCall) Do(f func(protocol.ByteCount) bool) *MockConnectionFlowControllerUpdateSendWindowCall { 295 c.Call = c.Call.Do(f) 296 return c 297 } 298 299 // DoAndReturn rewrite *gomock.Call.DoAndReturn 300 func (c *MockConnectionFlowControllerUpdateSendWindowCall) DoAndReturn(f func(protocol.ByteCount) bool) *MockConnectionFlowControllerUpdateSendWindowCall { 301 c.Call = c.Call.DoAndReturn(f) 302 return c 303 }