forked from apernet/quic-go
-
Notifications
You must be signed in to change notification settings - Fork 9
/
mock_quic_conn_test.go
855 lines (720 loc) · 27.1 KB
/
mock_quic_conn_test.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/metacubex/quic-go (interfaces: QUICConn)
//
// Generated by this command:
//
// mockgen -typed -build_flags=-tags=gomock -package quic -self_package github.com/metacubex/quic-go -destination mock_quic_conn_test.go github.com/metacubex/quic-go QUICConn
//
// Package quic is a generated GoMock package.
package quic
import (
context "context"
net "net"
reflect "reflect"
congestion "github.com/metacubex/quic-go/congestion"
qerr "github.com/metacubex/quic-go/internal/qerr"
gomock "go.uber.org/mock/gomock"
)
// MockQUICConn is a mock of QUICConn interface.
type MockQUICConn struct {
ctrl *gomock.Controller
recorder *MockQUICConnMockRecorder
}
// MockQUICConnMockRecorder is the mock recorder for MockQUICConn.
type MockQUICConnMockRecorder struct {
mock *MockQUICConn
}
// NewMockQUICConn creates a new mock instance.
func NewMockQUICConn(ctrl *gomock.Controller) *MockQUICConn {
mock := &MockQUICConn{ctrl: ctrl}
mock.recorder = &MockQUICConnMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockQUICConn) EXPECT() *MockQUICConnMockRecorder {
return m.recorder
}
// AcceptStream mocks base method.
func (m *MockQUICConn) AcceptStream(arg0 context.Context) (Stream, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AcceptStream", arg0)
ret0, _ := ret[0].(Stream)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AcceptStream indicates an expected call of AcceptStream.
func (mr *MockQUICConnMockRecorder) AcceptStream(arg0 any) *MockQUICConnAcceptStreamCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptStream", reflect.TypeOf((*MockQUICConn)(nil).AcceptStream), arg0)
return &MockQUICConnAcceptStreamCall{Call: call}
}
// MockQUICConnAcceptStreamCall wrap *gomock.Call
type MockQUICConnAcceptStreamCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnAcceptStreamCall) Return(arg0 Stream, arg1 error) *MockQUICConnAcceptStreamCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnAcceptStreamCall) Do(f func(context.Context) (Stream, error)) *MockQUICConnAcceptStreamCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnAcceptStreamCall) DoAndReturn(f func(context.Context) (Stream, error)) *MockQUICConnAcceptStreamCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// AcceptUniStream mocks base method.
func (m *MockQUICConn) AcceptUniStream(arg0 context.Context) (ReceiveStream, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AcceptUniStream", arg0)
ret0, _ := ret[0].(ReceiveStream)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AcceptUniStream indicates an expected call of AcceptUniStream.
func (mr *MockQUICConnMockRecorder) AcceptUniStream(arg0 any) *MockQUICConnAcceptUniStreamCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptUniStream", reflect.TypeOf((*MockQUICConn)(nil).AcceptUniStream), arg0)
return &MockQUICConnAcceptUniStreamCall{Call: call}
}
// MockQUICConnAcceptUniStreamCall wrap *gomock.Call
type MockQUICConnAcceptUniStreamCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnAcceptUniStreamCall) Return(arg0 ReceiveStream, arg1 error) *MockQUICConnAcceptUniStreamCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnAcceptUniStreamCall) Do(f func(context.Context) (ReceiveStream, error)) *MockQUICConnAcceptUniStreamCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnAcceptUniStreamCall) DoAndReturn(f func(context.Context) (ReceiveStream, error)) *MockQUICConnAcceptUniStreamCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// CloseWithError mocks base method.
func (m *MockQUICConn) CloseWithError(arg0 qerr.ApplicationErrorCode, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CloseWithError", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// CloseWithError indicates an expected call of CloseWithError.
func (mr *MockQUICConnMockRecorder) CloseWithError(arg0, arg1 any) *MockQUICConnCloseWithErrorCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseWithError", reflect.TypeOf((*MockQUICConn)(nil).CloseWithError), arg0, arg1)
return &MockQUICConnCloseWithErrorCall{Call: call}
}
// MockQUICConnCloseWithErrorCall wrap *gomock.Call
type MockQUICConnCloseWithErrorCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnCloseWithErrorCall) Return(arg0 error) *MockQUICConnCloseWithErrorCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnCloseWithErrorCall) Do(f func(qerr.ApplicationErrorCode, string) error) *MockQUICConnCloseWithErrorCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnCloseWithErrorCall) DoAndReturn(f func(qerr.ApplicationErrorCode, string) error) *MockQUICConnCloseWithErrorCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// ConnectionState mocks base method.
func (m *MockQUICConn) ConnectionState() ConnectionState {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ConnectionState")
ret0, _ := ret[0].(ConnectionState)
return ret0
}
// ConnectionState indicates an expected call of ConnectionState.
func (mr *MockQUICConnMockRecorder) ConnectionState() *MockQUICConnConnectionStateCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectionState", reflect.TypeOf((*MockQUICConn)(nil).ConnectionState))
return &MockQUICConnConnectionStateCall{Call: call}
}
// MockQUICConnConnectionStateCall wrap *gomock.Call
type MockQUICConnConnectionStateCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnConnectionStateCall) Return(arg0 ConnectionState) *MockQUICConnConnectionStateCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnConnectionStateCall) Do(f func() ConnectionState) *MockQUICConnConnectionStateCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnConnectionStateCall) DoAndReturn(f func() ConnectionState) *MockQUICConnConnectionStateCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Context mocks base method.
func (m *MockQUICConn) Context() context.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Context")
ret0, _ := ret[0].(context.Context)
return ret0
}
// Context indicates an expected call of Context.
func (mr *MockQUICConnMockRecorder) Context() *MockQUICConnContextCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockQUICConn)(nil).Context))
return &MockQUICConnContextCall{Call: call}
}
// MockQUICConnContextCall wrap *gomock.Call
type MockQUICConnContextCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnContextCall) Return(arg0 context.Context) *MockQUICConnContextCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnContextCall) Do(f func() context.Context) *MockQUICConnContextCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnContextCall) DoAndReturn(f func() context.Context) *MockQUICConnContextCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// HandshakeComplete mocks base method.
func (m *MockQUICConn) HandshakeComplete() <-chan struct{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HandshakeComplete")
ret0, _ := ret[0].(<-chan struct{})
return ret0
}
// HandshakeComplete indicates an expected call of HandshakeComplete.
func (mr *MockQUICConnMockRecorder) HandshakeComplete() *MockQUICConnHandshakeCompleteCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandshakeComplete", reflect.TypeOf((*MockQUICConn)(nil).HandshakeComplete))
return &MockQUICConnHandshakeCompleteCall{Call: call}
}
// MockQUICConnHandshakeCompleteCall wrap *gomock.Call
type MockQUICConnHandshakeCompleteCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnHandshakeCompleteCall) Return(arg0 <-chan struct{}) *MockQUICConnHandshakeCompleteCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnHandshakeCompleteCall) Do(f func() <-chan struct{}) *MockQUICConnHandshakeCompleteCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnHandshakeCompleteCall) DoAndReturn(f func() <-chan struct{}) *MockQUICConnHandshakeCompleteCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// LocalAddr mocks base method.
func (m *MockQUICConn) LocalAddr() net.Addr {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LocalAddr")
ret0, _ := ret[0].(net.Addr)
return ret0
}
// LocalAddr indicates an expected call of LocalAddr.
func (mr *MockQUICConnMockRecorder) LocalAddr() *MockQUICConnLocalAddrCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockQUICConn)(nil).LocalAddr))
return &MockQUICConnLocalAddrCall{Call: call}
}
// MockQUICConnLocalAddrCall wrap *gomock.Call
type MockQUICConnLocalAddrCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnLocalAddrCall) Return(arg0 net.Addr) *MockQUICConnLocalAddrCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnLocalAddrCall) Do(f func() net.Addr) *MockQUICConnLocalAddrCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnLocalAddrCall) DoAndReturn(f func() net.Addr) *MockQUICConnLocalAddrCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// NextConnection mocks base method.
func (m *MockQUICConn) NextConnection(arg0 context.Context) (Connection, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NextConnection", arg0)
ret0, _ := ret[0].(Connection)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NextConnection indicates an expected call of NextConnection.
func (mr *MockQUICConnMockRecorder) NextConnection(arg0 any) *MockQUICConnNextConnectionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextConnection", reflect.TypeOf((*MockQUICConn)(nil).NextConnection), arg0)
return &MockQUICConnNextConnectionCall{Call: call}
}
// MockQUICConnNextConnectionCall wrap *gomock.Call
type MockQUICConnNextConnectionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnNextConnectionCall) Return(arg0 Connection, arg1 error) *MockQUICConnNextConnectionCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnNextConnectionCall) Do(f func(context.Context) (Connection, error)) *MockQUICConnNextConnectionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnNextConnectionCall) DoAndReturn(f func(context.Context) (Connection, error)) *MockQUICConnNextConnectionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// OpenStream mocks base method.
func (m *MockQUICConn) OpenStream() (Stream, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "OpenStream")
ret0, _ := ret[0].(Stream)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// OpenStream indicates an expected call of OpenStream.
func (mr *MockQUICConnMockRecorder) OpenStream() *MockQUICConnOpenStreamCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockQUICConn)(nil).OpenStream))
return &MockQUICConnOpenStreamCall{Call: call}
}
// MockQUICConnOpenStreamCall wrap *gomock.Call
type MockQUICConnOpenStreamCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnOpenStreamCall) Return(arg0 Stream, arg1 error) *MockQUICConnOpenStreamCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnOpenStreamCall) Do(f func() (Stream, error)) *MockQUICConnOpenStreamCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnOpenStreamCall) DoAndReturn(f func() (Stream, error)) *MockQUICConnOpenStreamCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// OpenStreamSync mocks base method.
func (m *MockQUICConn) OpenStreamSync(arg0 context.Context) (Stream, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "OpenStreamSync", arg0)
ret0, _ := ret[0].(Stream)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// OpenStreamSync indicates an expected call of OpenStreamSync.
func (mr *MockQUICConnMockRecorder) OpenStreamSync(arg0 any) *MockQUICConnOpenStreamSyncCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStreamSync", reflect.TypeOf((*MockQUICConn)(nil).OpenStreamSync), arg0)
return &MockQUICConnOpenStreamSyncCall{Call: call}
}
// MockQUICConnOpenStreamSyncCall wrap *gomock.Call
type MockQUICConnOpenStreamSyncCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnOpenStreamSyncCall) Return(arg0 Stream, arg1 error) *MockQUICConnOpenStreamSyncCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnOpenStreamSyncCall) Do(f func(context.Context) (Stream, error)) *MockQUICConnOpenStreamSyncCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnOpenStreamSyncCall) DoAndReturn(f func(context.Context) (Stream, error)) *MockQUICConnOpenStreamSyncCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// OpenUniStream mocks base method.
func (m *MockQUICConn) OpenUniStream() (SendStream, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "OpenUniStream")
ret0, _ := ret[0].(SendStream)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// OpenUniStream indicates an expected call of OpenUniStream.
func (mr *MockQUICConnMockRecorder) OpenUniStream() *MockQUICConnOpenUniStreamCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStream", reflect.TypeOf((*MockQUICConn)(nil).OpenUniStream))
return &MockQUICConnOpenUniStreamCall{Call: call}
}
// MockQUICConnOpenUniStreamCall wrap *gomock.Call
type MockQUICConnOpenUniStreamCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnOpenUniStreamCall) Return(arg0 SendStream, arg1 error) *MockQUICConnOpenUniStreamCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnOpenUniStreamCall) Do(f func() (SendStream, error)) *MockQUICConnOpenUniStreamCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnOpenUniStreamCall) DoAndReturn(f func() (SendStream, error)) *MockQUICConnOpenUniStreamCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// OpenUniStreamSync mocks base method.
func (m *MockQUICConn) OpenUniStreamSync(arg0 context.Context) (SendStream, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "OpenUniStreamSync", arg0)
ret0, _ := ret[0].(SendStream)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// OpenUniStreamSync indicates an expected call of OpenUniStreamSync.
func (mr *MockQUICConnMockRecorder) OpenUniStreamSync(arg0 any) *MockQUICConnOpenUniStreamSyncCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStreamSync", reflect.TypeOf((*MockQUICConn)(nil).OpenUniStreamSync), arg0)
return &MockQUICConnOpenUniStreamSyncCall{Call: call}
}
// MockQUICConnOpenUniStreamSyncCall wrap *gomock.Call
type MockQUICConnOpenUniStreamSyncCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnOpenUniStreamSyncCall) Return(arg0 SendStream, arg1 error) *MockQUICConnOpenUniStreamSyncCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnOpenUniStreamSyncCall) Do(f func(context.Context) (SendStream, error)) *MockQUICConnOpenUniStreamSyncCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnOpenUniStreamSyncCall) DoAndReturn(f func(context.Context) (SendStream, error)) *MockQUICConnOpenUniStreamSyncCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// ReceiveDatagram mocks base method.
func (m *MockQUICConn) ReceiveDatagram(arg0 context.Context) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReceiveDatagram", arg0)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ReceiveDatagram indicates an expected call of ReceiveDatagram.
func (mr *MockQUICConnMockRecorder) ReceiveDatagram(arg0 any) *MockQUICConnReceiveDatagramCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceiveDatagram", reflect.TypeOf((*MockQUICConn)(nil).ReceiveDatagram), arg0)
return &MockQUICConnReceiveDatagramCall{Call: call}
}
// MockQUICConnReceiveDatagramCall wrap *gomock.Call
type MockQUICConnReceiveDatagramCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnReceiveDatagramCall) Return(arg0 []byte, arg1 error) *MockQUICConnReceiveDatagramCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnReceiveDatagramCall) Do(f func(context.Context) ([]byte, error)) *MockQUICConnReceiveDatagramCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnReceiveDatagramCall) DoAndReturn(f func(context.Context) ([]byte, error)) *MockQUICConnReceiveDatagramCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// RemoteAddr mocks base method.
func (m *MockQUICConn) RemoteAddr() net.Addr {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RemoteAddr")
ret0, _ := ret[0].(net.Addr)
return ret0
}
// RemoteAddr indicates an expected call of RemoteAddr.
func (mr *MockQUICConnMockRecorder) RemoteAddr() *MockQUICConnRemoteAddrCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockQUICConn)(nil).RemoteAddr))
return &MockQUICConnRemoteAddrCall{Call: call}
}
// MockQUICConnRemoteAddrCall wrap *gomock.Call
type MockQUICConnRemoteAddrCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnRemoteAddrCall) Return(arg0 net.Addr) *MockQUICConnRemoteAddrCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnRemoteAddrCall) Do(f func() net.Addr) *MockQUICConnRemoteAddrCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnRemoteAddrCall) DoAndReturn(f func() net.Addr) *MockQUICConnRemoteAddrCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// SendDatagram mocks base method.
func (m *MockQUICConn) SendDatagram(arg0 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendDatagram", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SendDatagram indicates an expected call of SendDatagram.
func (mr *MockQUICConnMockRecorder) SendDatagram(arg0 any) *MockQUICConnSendDatagramCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendDatagram", reflect.TypeOf((*MockQUICConn)(nil).SendDatagram), arg0)
return &MockQUICConnSendDatagramCall{Call: call}
}
// MockQUICConnSendDatagramCall wrap *gomock.Call
type MockQUICConnSendDatagramCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnSendDatagramCall) Return(arg0 error) *MockQUICConnSendDatagramCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnSendDatagramCall) Do(f func([]byte) error) *MockQUICConnSendDatagramCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnSendDatagramCall) DoAndReturn(f func([]byte) error) *MockQUICConnSendDatagramCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// SetCongestionControl mocks base method.
func (m *MockQUICConn) SetCongestionControl(arg0 congestion.CongestionControl) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetCongestionControl", arg0)
}
// SetCongestionControl indicates an expected call of SetCongestionControl.
func (mr *MockQUICConnMockRecorder) SetCongestionControl(arg0 any) *MockQUICConnSetCongestionControlCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCongestionControl", reflect.TypeOf((*MockQUICConn)(nil).SetCongestionControl), arg0)
return &MockQUICConnSetCongestionControlCall{Call: call}
}
// SetRemoteAddr mocks base method.
func (m *MockQUICConn) SetRemoteAddr(arg0 net.Addr) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetRemoteAddr", arg0)
}
// Config mocks base method.
func (m *MockQUICConn) Config() *Config {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Config")
ret0, _ := ret[0].(*Config)
return ret0
}
// MockQUICConnSetCongestionControlCall wrap *gomock.Call
type MockQUICConnSetCongestionControlCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnSetCongestionControlCall) Return() *MockQUICConnSetCongestionControlCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnSetCongestionControlCall) Do(f func(congestion.CongestionControl)) *MockQUICConnSetCongestionControlCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnSetCongestionControlCall) DoAndReturn(f func(congestion.CongestionControl)) *MockQUICConnSetCongestionControlCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// closeWithTransportError mocks base method.
func (m *MockQUICConn) closeWithTransportError(arg0 qerr.TransportErrorCode) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "closeWithTransportError", arg0)
}
// closeWithTransportError indicates an expected call of closeWithTransportError.
func (mr *MockQUICConnMockRecorder) closeWithTransportError(arg0 any) *MockQUICConncloseWithTransportErrorCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeWithTransportError", reflect.TypeOf((*MockQUICConn)(nil).closeWithTransportError), arg0)
return &MockQUICConncloseWithTransportErrorCall{Call: call}
}
// MockQUICConncloseWithTransportErrorCall wrap *gomock.Call
type MockQUICConncloseWithTransportErrorCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConncloseWithTransportErrorCall) Return() *MockQUICConncloseWithTransportErrorCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConncloseWithTransportErrorCall) Do(f func(qerr.TransportErrorCode)) *MockQUICConncloseWithTransportErrorCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConncloseWithTransportErrorCall) DoAndReturn(f func(qerr.TransportErrorCode)) *MockQUICConncloseWithTransportErrorCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// destroy mocks base method.
func (m *MockQUICConn) destroy(arg0 error) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "destroy", arg0)
}
// destroy indicates an expected call of destroy.
func (mr *MockQUICConnMockRecorder) destroy(arg0 any) *MockQUICConndestroyCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "destroy", reflect.TypeOf((*MockQUICConn)(nil).destroy), arg0)
return &MockQUICConndestroyCall{Call: call}
}
// MockQUICConndestroyCall wrap *gomock.Call
type MockQUICConndestroyCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConndestroyCall) Return() *MockQUICConndestroyCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConndestroyCall) Do(f func(error)) *MockQUICConndestroyCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConndestroyCall) DoAndReturn(f func(error)) *MockQUICConndestroyCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// earlyConnReady mocks base method.
func (m *MockQUICConn) earlyConnReady() <-chan struct{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "earlyConnReady")
ret0, _ := ret[0].(<-chan struct{})
return ret0
}
// earlyConnReady indicates an expected call of earlyConnReady.
func (mr *MockQUICConnMockRecorder) earlyConnReady() *MockQUICConnearlyConnReadyCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "earlyConnReady", reflect.TypeOf((*MockQUICConn)(nil).earlyConnReady))
return &MockQUICConnearlyConnReadyCall{Call: call}
}
// MockQUICConnearlyConnReadyCall wrap *gomock.Call
type MockQUICConnearlyConnReadyCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnearlyConnReadyCall) Return(arg0 <-chan struct{}) *MockQUICConnearlyConnReadyCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnearlyConnReadyCall) Do(f func() <-chan struct{}) *MockQUICConnearlyConnReadyCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnearlyConnReadyCall) DoAndReturn(f func() <-chan struct{}) *MockQUICConnearlyConnReadyCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// handlePacket mocks base method.
func (m *MockQUICConn) handlePacket(arg0 receivedPacket) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "handlePacket", arg0)
}
// handlePacket indicates an expected call of handlePacket.
func (mr *MockQUICConnMockRecorder) handlePacket(arg0 any) *MockQUICConnhandlePacketCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockQUICConn)(nil).handlePacket), arg0)
return &MockQUICConnhandlePacketCall{Call: call}
}
// MockQUICConnhandlePacketCall wrap *gomock.Call
type MockQUICConnhandlePacketCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnhandlePacketCall) Return() *MockQUICConnhandlePacketCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnhandlePacketCall) Do(f func(receivedPacket)) *MockQUICConnhandlePacketCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnhandlePacketCall) DoAndReturn(f func(receivedPacket)) *MockQUICConnhandlePacketCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// run mocks base method.
func (m *MockQUICConn) run() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "run")
ret0, _ := ret[0].(error)
return ret0
}
// run indicates an expected call of run.
func (mr *MockQUICConnMockRecorder) run() *MockQUICConnrunCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "run", reflect.TypeOf((*MockQUICConn)(nil).run))
return &MockQUICConnrunCall{Call: call}
}
// MockQUICConnrunCall wrap *gomock.Call
type MockQUICConnrunCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICConnrunCall) Return(arg0 error) *MockQUICConnrunCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICConnrunCall) Do(f func() error) *MockQUICConnrunCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICConnrunCall) DoAndReturn(f func() error) *MockQUICConnrunCall {
c.Call = c.Call.DoAndReturn(f)
return c
}