-
Notifications
You must be signed in to change notification settings - Fork 5
/
fake_grpc.go
2801 lines (2574 loc) · 82.8 KB
/
fake_grpc.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
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by counterfeiter. DO NOT EDIT.
package grpc_fake
import (
"net"
"sync"
"time"
"code.cloudfoundry.org/goshims/grpcshim"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/naming"
"google.golang.org/grpc/stats"
"google.golang.org/grpc/tap"
)
type FakeGrpc struct {
RoundRobinStub func(r naming.Resolver) grpc.Balancer
roundRobinMutex sync.RWMutex
roundRobinArgsForCall []struct {
r naming.Resolver
}
roundRobinReturns struct {
result1 grpc.Balancer
}
roundRobinReturnsOnCall map[int]struct {
result1 grpc.Balancer
}
InvokeStub func(ctx context.Context, method string, args, reply interface{}, cc *grpc.ClientConn, opts ...grpc.CallOption) error
invokeMutex sync.RWMutex
invokeArgsForCall []struct {
ctx context.Context
method string
args interface{}
reply interface{}
cc *grpc.ClientConn
opts []grpc.CallOption
}
invokeReturns struct {
result1 error
}
invokeReturnsOnCall map[int]struct {
result1 error
}
WithCodecStub func(c grpc.Codec) grpc.DialOption
withCodecMutex sync.RWMutex
withCodecArgsForCall []struct {
c grpc.Codec
}
withCodecReturns struct {
result1 grpc.DialOption
}
withCodecReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithCompressorStub func(cp grpc.Compressor) grpc.DialOption
withCompressorMutex sync.RWMutex
withCompressorArgsForCall []struct {
cp grpc.Compressor
}
withCompressorReturns struct {
result1 grpc.DialOption
}
withCompressorReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithDecompressorStub func(dc grpc.Decompressor) grpc.DialOption
withDecompressorMutex sync.RWMutex
withDecompressorArgsForCall []struct {
dc grpc.Decompressor
}
withDecompressorReturns struct {
result1 grpc.DialOption
}
withDecompressorReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithBalancerStub func(b grpc.Balancer) grpc.DialOption
withBalancerMutex sync.RWMutex
withBalancerArgsForCall []struct {
b grpc.Balancer
}
withBalancerReturns struct {
result1 grpc.DialOption
}
withBalancerReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithServiceConfigStub func(c <-chan grpc.ServiceConfig) grpc.DialOption
withServiceConfigMutex sync.RWMutex
withServiceConfigArgsForCall []struct {
c <-chan grpc.ServiceConfig
}
withServiceConfigReturns struct {
result1 grpc.DialOption
}
withServiceConfigReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithBackoffMaxDelayStub func(md time.Duration) grpc.DialOption
withBackoffMaxDelayMutex sync.RWMutex
withBackoffMaxDelayArgsForCall []struct {
md time.Duration
}
withBackoffMaxDelayReturns struct {
result1 grpc.DialOption
}
withBackoffMaxDelayReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithBackoffConfigStub func(b grpc.BackoffConfig) grpc.DialOption
withBackoffConfigMutex sync.RWMutex
withBackoffConfigArgsForCall []struct {
b grpc.BackoffConfig
}
withBackoffConfigReturns struct {
result1 grpc.DialOption
}
withBackoffConfigReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithBlockStub func() grpc.DialOption
withBlockMutex sync.RWMutex
withBlockArgsForCall []struct{}
withBlockReturns struct {
result1 grpc.DialOption
}
withBlockReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithInsecureStub func() grpc.DialOption
withInsecureMutex sync.RWMutex
withInsecureArgsForCall []struct{}
withInsecureReturns struct {
result1 grpc.DialOption
}
withInsecureReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithTransportCredentialsStub func(creds credentials.TransportCredentials) grpc.DialOption
withTransportCredentialsMutex sync.RWMutex
withTransportCredentialsArgsForCall []struct {
creds credentials.TransportCredentials
}
withTransportCredentialsReturns struct {
result1 grpc.DialOption
}
withTransportCredentialsReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithPerRPCCredentialsStub func(creds credentials.PerRPCCredentials) grpc.DialOption
withPerRPCCredentialsMutex sync.RWMutex
withPerRPCCredentialsArgsForCall []struct {
creds credentials.PerRPCCredentials
}
withPerRPCCredentialsReturns struct {
result1 grpc.DialOption
}
withPerRPCCredentialsReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithTimeoutStub func(d time.Duration) grpc.DialOption
withTimeoutMutex sync.RWMutex
withTimeoutArgsForCall []struct {
d time.Duration
}
withTimeoutReturns struct {
result1 grpc.DialOption
}
withTimeoutReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithDialerStub func(f func(string, time.Duration) (net.Conn, error)) grpc.DialOption
withDialerMutex sync.RWMutex
withDialerArgsForCall []struct {
f func(string, time.Duration) (net.Conn, error)
}
withDialerReturns struct {
result1 grpc.DialOption
}
withDialerReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithStatsHandlerStub func(h stats.Handler) grpc.DialOption
withStatsHandlerMutex sync.RWMutex
withStatsHandlerArgsForCall []struct {
h stats.Handler
}
withStatsHandlerReturns struct {
result1 grpc.DialOption
}
withStatsHandlerReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
FailOnNonTempDialErrorStub func(f bool) grpc.DialOption
failOnNonTempDialErrorMutex sync.RWMutex
failOnNonTempDialErrorArgsForCall []struct {
f bool
}
failOnNonTempDialErrorReturns struct {
result1 grpc.DialOption
}
failOnNonTempDialErrorReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithUserAgentStub func(s string) grpc.DialOption
withUserAgentMutex sync.RWMutex
withUserAgentArgsForCall []struct {
s string
}
withUserAgentReturns struct {
result1 grpc.DialOption
}
withUserAgentReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithUnaryInterceptorStub func(f grpc.UnaryClientInterceptor) grpc.DialOption
withUnaryInterceptorMutex sync.RWMutex
withUnaryInterceptorArgsForCall []struct {
f grpc.UnaryClientInterceptor
}
withUnaryInterceptorReturns struct {
result1 grpc.DialOption
}
withUnaryInterceptorReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
WithStreamInterceptorStub func(f grpc.StreamClientInterceptor) grpc.DialOption
withStreamInterceptorMutex sync.RWMutex
withStreamInterceptorArgsForCall []struct {
f grpc.StreamClientInterceptor
}
withStreamInterceptorReturns struct {
result1 grpc.DialOption
}
withStreamInterceptorReturnsOnCall map[int]struct {
result1 grpc.DialOption
}
DialStub func(target string, opts ...grpc.DialOption) (grpcshim.ClientConn, error)
dialMutex sync.RWMutex
dialArgsForCall []struct {
target string
opts []grpc.DialOption
}
dialReturns struct {
result1 grpcshim.ClientConn
result2 error
}
dialReturnsOnCall map[int]struct {
result1 grpcshim.ClientConn
result2 error
}
DialContextStub func(ctx context.Context, target string, opts ...grpc.DialOption) (conn *grpc.ClientConn, err error)
dialContextMutex sync.RWMutex
dialContextArgsForCall []struct {
ctx context.Context
target string
opts []grpc.DialOption
}
dialContextReturns struct {
result1 *grpc.ClientConn
result2 error
}
dialContextReturnsOnCall map[int]struct {
result1 *grpc.ClientConn
result2 error
}
NewGZIPCompressorStub func() grpc.Compressor
newGZIPCompressorMutex sync.RWMutex
newGZIPCompressorArgsForCall []struct{}
newGZIPCompressorReturns struct {
result1 grpc.Compressor
}
newGZIPCompressorReturnsOnCall map[int]struct {
result1 grpc.Compressor
}
NewGZIPDecompressorStub func() grpc.Decompressor
newGZIPDecompressorMutex sync.RWMutex
newGZIPDecompressorArgsForCall []struct{}
newGZIPDecompressorReturns struct {
result1 grpc.Decompressor
}
newGZIPDecompressorReturnsOnCall map[int]struct {
result1 grpc.Decompressor
}
HeaderStub func(md *metadata.MD) grpc.CallOption
headerMutex sync.RWMutex
headerArgsForCall []struct {
md *metadata.MD
}
headerReturns struct {
result1 grpc.CallOption
}
headerReturnsOnCall map[int]struct {
result1 grpc.CallOption
}
TrailerStub func(md *metadata.MD) grpc.CallOption
trailerMutex sync.RWMutex
trailerArgsForCall []struct {
md *metadata.MD
}
trailerReturns struct {
result1 grpc.CallOption
}
trailerReturnsOnCall map[int]struct {
result1 grpc.CallOption
}
FailFastStub func(failFast bool) grpc.CallOption
failFastMutex sync.RWMutex
failFastArgsForCall []struct {
failFast bool
}
failFastReturns struct {
result1 grpc.CallOption
}
failFastReturnsOnCall map[int]struct {
result1 grpc.CallOption
}
CodeStub func(err error) codes.Code
codeMutex sync.RWMutex
codeArgsForCall []struct {
err error
}
codeReturns struct {
result1 codes.Code
}
codeReturnsOnCall map[int]struct {
result1 codes.Code
}
ErrorDescStub func(err error) string
errorDescMutex sync.RWMutex
errorDescArgsForCall []struct {
err error
}
errorDescReturns struct {
result1 string
}
errorDescReturnsOnCall map[int]struct {
result1 string
}
ErrorfStub func(c codes.Code, format string, a ...interface{}) error
errorfMutex sync.RWMutex
errorfArgsForCall []struct {
c codes.Code
format string
a []interface{}
}
errorfReturns struct {
result1 error
}
errorfReturnsOnCall map[int]struct {
result1 error
}
CustomCodecStub func(codec grpc.Codec) grpc.ServerOption
customCodecMutex sync.RWMutex
customCodecArgsForCall []struct {
codec grpc.Codec
}
customCodecReturns struct {
result1 grpc.ServerOption
}
customCodecReturnsOnCall map[int]struct {
result1 grpc.ServerOption
}
RPCCompressorStub func(cp grpc.Compressor) grpc.ServerOption
rPCCompressorMutex sync.RWMutex
rPCCompressorArgsForCall []struct {
cp grpc.Compressor
}
rPCCompressorReturns struct {
result1 grpc.ServerOption
}
rPCCompressorReturnsOnCall map[int]struct {
result1 grpc.ServerOption
}
RPCDecompressorStub func(dc grpc.Decompressor) grpc.ServerOption
rPCDecompressorMutex sync.RWMutex
rPCDecompressorArgsForCall []struct {
dc grpc.Decompressor
}
rPCDecompressorReturns struct {
result1 grpc.ServerOption
}
rPCDecompressorReturnsOnCall map[int]struct {
result1 grpc.ServerOption
}
MaxMsgSizeStub func(m int) grpc.ServerOption
maxMsgSizeMutex sync.RWMutex
maxMsgSizeArgsForCall []struct {
m int
}
maxMsgSizeReturns struct {
result1 grpc.ServerOption
}
maxMsgSizeReturnsOnCall map[int]struct {
result1 grpc.ServerOption
}
MaxConcurrentStreamsStub func(n uint32) grpc.ServerOption
maxConcurrentStreamsMutex sync.RWMutex
maxConcurrentStreamsArgsForCall []struct {
n uint32
}
maxConcurrentStreamsReturns struct {
result1 grpc.ServerOption
}
maxConcurrentStreamsReturnsOnCall map[int]struct {
result1 grpc.ServerOption
}
CredsStub func(c credentials.TransportCredentials) grpc.ServerOption
credsMutex sync.RWMutex
credsArgsForCall []struct {
c credentials.TransportCredentials
}
credsReturns struct {
result1 grpc.ServerOption
}
credsReturnsOnCall map[int]struct {
result1 grpc.ServerOption
}
UnaryInterceptorStub func(i grpc.UnaryServerInterceptor) grpc.ServerOption
unaryInterceptorMutex sync.RWMutex
unaryInterceptorArgsForCall []struct {
i grpc.UnaryServerInterceptor
}
unaryInterceptorReturns struct {
result1 grpc.ServerOption
}
unaryInterceptorReturnsOnCall map[int]struct {
result1 grpc.ServerOption
}
StreamInterceptorStub func(i grpc.StreamServerInterceptor) grpc.ServerOption
streamInterceptorMutex sync.RWMutex
streamInterceptorArgsForCall []struct {
i grpc.StreamServerInterceptor
}
streamInterceptorReturns struct {
result1 grpc.ServerOption
}
streamInterceptorReturnsOnCall map[int]struct {
result1 grpc.ServerOption
}
InTapHandleStub func(h tap.ServerInHandle) grpc.ServerOption
inTapHandleMutex sync.RWMutex
inTapHandleArgsForCall []struct {
h tap.ServerInHandle
}
inTapHandleReturns struct {
result1 grpc.ServerOption
}
inTapHandleReturnsOnCall map[int]struct {
result1 grpc.ServerOption
}
StatsHandlerStub func(h stats.Handler) grpc.ServerOption
statsHandlerMutex sync.RWMutex
statsHandlerArgsForCall []struct {
h stats.Handler
}
statsHandlerReturns struct {
result1 grpc.ServerOption
}
statsHandlerReturnsOnCall map[int]struct {
result1 grpc.ServerOption
}
NewServerStub func(opt ...grpc.ServerOption) *grpc.Server
newServerMutex sync.RWMutex
newServerArgsForCall []struct {
opt []grpc.ServerOption
}
newServerReturns struct {
result1 *grpc.Server
}
newServerReturnsOnCall map[int]struct {
result1 *grpc.Server
}
SetHeaderStub func(ctx context.Context, md metadata.MD) error
setHeaderMutex sync.RWMutex
setHeaderArgsForCall []struct {
ctx context.Context
md metadata.MD
}
setHeaderReturns struct {
result1 error
}
setHeaderReturnsOnCall map[int]struct {
result1 error
}
SendHeaderStub func(ctx context.Context, md metadata.MD) error
sendHeaderMutex sync.RWMutex
sendHeaderArgsForCall []struct {
ctx context.Context
md metadata.MD
}
sendHeaderReturns struct {
result1 error
}
sendHeaderReturnsOnCall map[int]struct {
result1 error
}
SetTrailerStub func(ctx context.Context, md metadata.MD) error
setTrailerMutex sync.RWMutex
setTrailerArgsForCall []struct {
ctx context.Context
md metadata.MD
}
setTrailerReturns struct {
result1 error
}
setTrailerReturnsOnCall map[int]struct {
result1 error
}
NewClientStreamStub func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, opts ...grpc.CallOption) (_ grpc.ClientStream, err error)
newClientStreamMutex sync.RWMutex
newClientStreamArgsForCall []struct {
ctx context.Context
desc *grpc.StreamDesc
cc *grpc.ClientConn
method string
opts []grpc.CallOption
}
newClientStreamReturns struct {
result1 grpc.ClientStream
result2 error
}
newClientStreamReturnsOnCall map[int]struct {
result1 grpc.ClientStream
result2 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeGrpc) RoundRobin(r naming.Resolver) grpc.Balancer {
fake.roundRobinMutex.Lock()
ret, specificReturn := fake.roundRobinReturnsOnCall[len(fake.roundRobinArgsForCall)]
fake.roundRobinArgsForCall = append(fake.roundRobinArgsForCall, struct {
r naming.Resolver
}{r})
fake.recordInvocation("RoundRobin", []interface{}{r})
fake.roundRobinMutex.Unlock()
if fake.RoundRobinStub != nil {
return fake.RoundRobinStub(r)
}
if specificReturn {
return ret.result1
}
return fake.roundRobinReturns.result1
}
func (fake *FakeGrpc) RoundRobinCallCount() int {
fake.roundRobinMutex.RLock()
defer fake.roundRobinMutex.RUnlock()
return len(fake.roundRobinArgsForCall)
}
func (fake *FakeGrpc) RoundRobinArgsForCall(i int) naming.Resolver {
fake.roundRobinMutex.RLock()
defer fake.roundRobinMutex.RUnlock()
return fake.roundRobinArgsForCall[i].r
}
func (fake *FakeGrpc) RoundRobinReturns(result1 grpc.Balancer) {
fake.RoundRobinStub = nil
fake.roundRobinReturns = struct {
result1 grpc.Balancer
}{result1}
}
func (fake *FakeGrpc) RoundRobinReturnsOnCall(i int, result1 grpc.Balancer) {
fake.RoundRobinStub = nil
if fake.roundRobinReturnsOnCall == nil {
fake.roundRobinReturnsOnCall = make(map[int]struct {
result1 grpc.Balancer
})
}
fake.roundRobinReturnsOnCall[i] = struct {
result1 grpc.Balancer
}{result1}
}
func (fake *FakeGrpc) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, cc *grpc.ClientConn, opts ...grpc.CallOption) error {
fake.invokeMutex.Lock()
ret, specificReturn := fake.invokeReturnsOnCall[len(fake.invokeArgsForCall)]
fake.invokeArgsForCall = append(fake.invokeArgsForCall, struct {
ctx context.Context
method string
args interface{}
reply interface{}
cc *grpc.ClientConn
opts []grpc.CallOption
}{ctx, method, args, reply, cc, opts})
fake.recordInvocation("Invoke", []interface{}{ctx, method, args, reply, cc, opts})
fake.invokeMutex.Unlock()
if fake.InvokeStub != nil {
return fake.InvokeStub(ctx, method, args, reply, cc, opts...)
}
if specificReturn {
return ret.result1
}
return fake.invokeReturns.result1
}
func (fake *FakeGrpc) InvokeCallCount() int {
fake.invokeMutex.RLock()
defer fake.invokeMutex.RUnlock()
return len(fake.invokeArgsForCall)
}
func (fake *FakeGrpc) InvokeArgsForCall(i int) (context.Context, string, interface{}, interface{}, *grpc.ClientConn, []grpc.CallOption) {
fake.invokeMutex.RLock()
defer fake.invokeMutex.RUnlock()
return fake.invokeArgsForCall[i].ctx, fake.invokeArgsForCall[i].method, fake.invokeArgsForCall[i].args, fake.invokeArgsForCall[i].reply, fake.invokeArgsForCall[i].cc, fake.invokeArgsForCall[i].opts
}
func (fake *FakeGrpc) InvokeReturns(result1 error) {
fake.InvokeStub = nil
fake.invokeReturns = struct {
result1 error
}{result1}
}
func (fake *FakeGrpc) InvokeReturnsOnCall(i int, result1 error) {
fake.InvokeStub = nil
if fake.invokeReturnsOnCall == nil {
fake.invokeReturnsOnCall = make(map[int]struct {
result1 error
})
}
fake.invokeReturnsOnCall[i] = struct {
result1 error
}{result1}
}
func (fake *FakeGrpc) WithCodec(c grpc.Codec) grpc.DialOption {
fake.withCodecMutex.Lock()
ret, specificReturn := fake.withCodecReturnsOnCall[len(fake.withCodecArgsForCall)]
fake.withCodecArgsForCall = append(fake.withCodecArgsForCall, struct {
c grpc.Codec
}{c})
fake.recordInvocation("WithCodec", []interface{}{c})
fake.withCodecMutex.Unlock()
if fake.WithCodecStub != nil {
return fake.WithCodecStub(c)
}
if specificReturn {
return ret.result1
}
return fake.withCodecReturns.result1
}
func (fake *FakeGrpc) WithCodecCallCount() int {
fake.withCodecMutex.RLock()
defer fake.withCodecMutex.RUnlock()
return len(fake.withCodecArgsForCall)
}
func (fake *FakeGrpc) WithCodecArgsForCall(i int) grpc.Codec {
fake.withCodecMutex.RLock()
defer fake.withCodecMutex.RUnlock()
return fake.withCodecArgsForCall[i].c
}
func (fake *FakeGrpc) WithCodecReturns(result1 grpc.DialOption) {
fake.WithCodecStub = nil
fake.withCodecReturns = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithCodecReturnsOnCall(i int, result1 grpc.DialOption) {
fake.WithCodecStub = nil
if fake.withCodecReturnsOnCall == nil {
fake.withCodecReturnsOnCall = make(map[int]struct {
result1 grpc.DialOption
})
}
fake.withCodecReturnsOnCall[i] = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithCompressor(cp grpc.Compressor) grpc.DialOption {
fake.withCompressorMutex.Lock()
ret, specificReturn := fake.withCompressorReturnsOnCall[len(fake.withCompressorArgsForCall)]
fake.withCompressorArgsForCall = append(fake.withCompressorArgsForCall, struct {
cp grpc.Compressor
}{cp})
fake.recordInvocation("WithCompressor", []interface{}{cp})
fake.withCompressorMutex.Unlock()
if fake.WithCompressorStub != nil {
return fake.WithCompressorStub(cp)
}
if specificReturn {
return ret.result1
}
return fake.withCompressorReturns.result1
}
func (fake *FakeGrpc) WithCompressorCallCount() int {
fake.withCompressorMutex.RLock()
defer fake.withCompressorMutex.RUnlock()
return len(fake.withCompressorArgsForCall)
}
func (fake *FakeGrpc) WithCompressorArgsForCall(i int) grpc.Compressor {
fake.withCompressorMutex.RLock()
defer fake.withCompressorMutex.RUnlock()
return fake.withCompressorArgsForCall[i].cp
}
func (fake *FakeGrpc) WithCompressorReturns(result1 grpc.DialOption) {
fake.WithCompressorStub = nil
fake.withCompressorReturns = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithCompressorReturnsOnCall(i int, result1 grpc.DialOption) {
fake.WithCompressorStub = nil
if fake.withCompressorReturnsOnCall == nil {
fake.withCompressorReturnsOnCall = make(map[int]struct {
result1 grpc.DialOption
})
}
fake.withCompressorReturnsOnCall[i] = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithDecompressor(dc grpc.Decompressor) grpc.DialOption {
fake.withDecompressorMutex.Lock()
ret, specificReturn := fake.withDecompressorReturnsOnCall[len(fake.withDecompressorArgsForCall)]
fake.withDecompressorArgsForCall = append(fake.withDecompressorArgsForCall, struct {
dc grpc.Decompressor
}{dc})
fake.recordInvocation("WithDecompressor", []interface{}{dc})
fake.withDecompressorMutex.Unlock()
if fake.WithDecompressorStub != nil {
return fake.WithDecompressorStub(dc)
}
if specificReturn {
return ret.result1
}
return fake.withDecompressorReturns.result1
}
func (fake *FakeGrpc) WithDecompressorCallCount() int {
fake.withDecompressorMutex.RLock()
defer fake.withDecompressorMutex.RUnlock()
return len(fake.withDecompressorArgsForCall)
}
func (fake *FakeGrpc) WithDecompressorArgsForCall(i int) grpc.Decompressor {
fake.withDecompressorMutex.RLock()
defer fake.withDecompressorMutex.RUnlock()
return fake.withDecompressorArgsForCall[i].dc
}
func (fake *FakeGrpc) WithDecompressorReturns(result1 grpc.DialOption) {
fake.WithDecompressorStub = nil
fake.withDecompressorReturns = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithDecompressorReturnsOnCall(i int, result1 grpc.DialOption) {
fake.WithDecompressorStub = nil
if fake.withDecompressorReturnsOnCall == nil {
fake.withDecompressorReturnsOnCall = make(map[int]struct {
result1 grpc.DialOption
})
}
fake.withDecompressorReturnsOnCall[i] = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithBalancer(b grpc.Balancer) grpc.DialOption {
fake.withBalancerMutex.Lock()
ret, specificReturn := fake.withBalancerReturnsOnCall[len(fake.withBalancerArgsForCall)]
fake.withBalancerArgsForCall = append(fake.withBalancerArgsForCall, struct {
b grpc.Balancer
}{b})
fake.recordInvocation("WithBalancer", []interface{}{b})
fake.withBalancerMutex.Unlock()
if fake.WithBalancerStub != nil {
return fake.WithBalancerStub(b)
}
if specificReturn {
return ret.result1
}
return fake.withBalancerReturns.result1
}
func (fake *FakeGrpc) WithBalancerCallCount() int {
fake.withBalancerMutex.RLock()
defer fake.withBalancerMutex.RUnlock()
return len(fake.withBalancerArgsForCall)
}
func (fake *FakeGrpc) WithBalancerArgsForCall(i int) grpc.Balancer {
fake.withBalancerMutex.RLock()
defer fake.withBalancerMutex.RUnlock()
return fake.withBalancerArgsForCall[i].b
}
func (fake *FakeGrpc) WithBalancerReturns(result1 grpc.DialOption) {
fake.WithBalancerStub = nil
fake.withBalancerReturns = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithBalancerReturnsOnCall(i int, result1 grpc.DialOption) {
fake.WithBalancerStub = nil
if fake.withBalancerReturnsOnCall == nil {
fake.withBalancerReturnsOnCall = make(map[int]struct {
result1 grpc.DialOption
})
}
fake.withBalancerReturnsOnCall[i] = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithServiceConfig(c <-chan grpc.ServiceConfig) grpc.DialOption {
fake.withServiceConfigMutex.Lock()
ret, specificReturn := fake.withServiceConfigReturnsOnCall[len(fake.withServiceConfigArgsForCall)]
fake.withServiceConfigArgsForCall = append(fake.withServiceConfigArgsForCall, struct {
c <-chan grpc.ServiceConfig
}{c})
fake.recordInvocation("WithServiceConfig", []interface{}{c})
fake.withServiceConfigMutex.Unlock()
if fake.WithServiceConfigStub != nil {
return fake.WithServiceConfigStub(c)
}
if specificReturn {
return ret.result1
}
return fake.withServiceConfigReturns.result1
}
func (fake *FakeGrpc) WithServiceConfigCallCount() int {
fake.withServiceConfigMutex.RLock()
defer fake.withServiceConfigMutex.RUnlock()
return len(fake.withServiceConfigArgsForCall)
}
func (fake *FakeGrpc) WithServiceConfigArgsForCall(i int) <-chan grpc.ServiceConfig {
fake.withServiceConfigMutex.RLock()
defer fake.withServiceConfigMutex.RUnlock()
return fake.withServiceConfigArgsForCall[i].c
}
func (fake *FakeGrpc) WithServiceConfigReturns(result1 grpc.DialOption) {
fake.WithServiceConfigStub = nil
fake.withServiceConfigReturns = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithServiceConfigReturnsOnCall(i int, result1 grpc.DialOption) {
fake.WithServiceConfigStub = nil
if fake.withServiceConfigReturnsOnCall == nil {
fake.withServiceConfigReturnsOnCall = make(map[int]struct {
result1 grpc.DialOption
})
}
fake.withServiceConfigReturnsOnCall[i] = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithBackoffMaxDelay(md time.Duration) grpc.DialOption {
fake.withBackoffMaxDelayMutex.Lock()
ret, specificReturn := fake.withBackoffMaxDelayReturnsOnCall[len(fake.withBackoffMaxDelayArgsForCall)]
fake.withBackoffMaxDelayArgsForCall = append(fake.withBackoffMaxDelayArgsForCall, struct {
md time.Duration
}{md})
fake.recordInvocation("WithBackoffMaxDelay", []interface{}{md})
fake.withBackoffMaxDelayMutex.Unlock()
if fake.WithBackoffMaxDelayStub != nil {
return fake.WithBackoffMaxDelayStub(md)
}
if specificReturn {
return ret.result1
}
return fake.withBackoffMaxDelayReturns.result1
}
func (fake *FakeGrpc) WithBackoffMaxDelayCallCount() int {
fake.withBackoffMaxDelayMutex.RLock()
defer fake.withBackoffMaxDelayMutex.RUnlock()
return len(fake.withBackoffMaxDelayArgsForCall)
}
func (fake *FakeGrpc) WithBackoffMaxDelayArgsForCall(i int) time.Duration {
fake.withBackoffMaxDelayMutex.RLock()
defer fake.withBackoffMaxDelayMutex.RUnlock()
return fake.withBackoffMaxDelayArgsForCall[i].md
}
func (fake *FakeGrpc) WithBackoffMaxDelayReturns(result1 grpc.DialOption) {
fake.WithBackoffMaxDelayStub = nil
fake.withBackoffMaxDelayReturns = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithBackoffMaxDelayReturnsOnCall(i int, result1 grpc.DialOption) {
fake.WithBackoffMaxDelayStub = nil
if fake.withBackoffMaxDelayReturnsOnCall == nil {
fake.withBackoffMaxDelayReturnsOnCall = make(map[int]struct {
result1 grpc.DialOption
})
}
fake.withBackoffMaxDelayReturnsOnCall[i] = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithBackoffConfig(b grpc.BackoffConfig) grpc.DialOption {
fake.withBackoffConfigMutex.Lock()
ret, specificReturn := fake.withBackoffConfigReturnsOnCall[len(fake.withBackoffConfigArgsForCall)]
fake.withBackoffConfigArgsForCall = append(fake.withBackoffConfigArgsForCall, struct {
b grpc.BackoffConfig
}{b})
fake.recordInvocation("WithBackoffConfig", []interface{}{b})
fake.withBackoffConfigMutex.Unlock()
if fake.WithBackoffConfigStub != nil {
return fake.WithBackoffConfigStub(b)
}
if specificReturn {
return ret.result1
}
return fake.withBackoffConfigReturns.result1
}
func (fake *FakeGrpc) WithBackoffConfigCallCount() int {
fake.withBackoffConfigMutex.RLock()
defer fake.withBackoffConfigMutex.RUnlock()
return len(fake.withBackoffConfigArgsForCall)
}
func (fake *FakeGrpc) WithBackoffConfigArgsForCall(i int) grpc.BackoffConfig {
fake.withBackoffConfigMutex.RLock()
defer fake.withBackoffConfigMutex.RUnlock()
return fake.withBackoffConfigArgsForCall[i].b
}
func (fake *FakeGrpc) WithBackoffConfigReturns(result1 grpc.DialOption) {
fake.WithBackoffConfigStub = nil
fake.withBackoffConfigReturns = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithBackoffConfigReturnsOnCall(i int, result1 grpc.DialOption) {
fake.WithBackoffConfigStub = nil
if fake.withBackoffConfigReturnsOnCall == nil {
fake.withBackoffConfigReturnsOnCall = make(map[int]struct {
result1 grpc.DialOption
})
}
fake.withBackoffConfigReturnsOnCall[i] = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithBlock() grpc.DialOption {
fake.withBlockMutex.Lock()
ret, specificReturn := fake.withBlockReturnsOnCall[len(fake.withBlockArgsForCall)]
fake.withBlockArgsForCall = append(fake.withBlockArgsForCall, struct{}{})
fake.recordInvocation("WithBlock", []interface{}{})
fake.withBlockMutex.Unlock()
if fake.WithBlockStub != nil {
return fake.WithBlockStub()
}
if specificReturn {
return ret.result1
}
return fake.withBlockReturns.result1
}
func (fake *FakeGrpc) WithBlockCallCount() int {
fake.withBlockMutex.RLock()
defer fake.withBlockMutex.RUnlock()
return len(fake.withBlockArgsForCall)
}
func (fake *FakeGrpc) WithBlockReturns(result1 grpc.DialOption) {
fake.WithBlockStub = nil
fake.withBlockReturns = struct {
result1 grpc.DialOption
}{result1}
}
func (fake *FakeGrpc) WithBlockReturnsOnCall(i int, result1 grpc.DialOption) {