1// Code generated by counterfeiter. DO NOT EDIT.
2package collectorpbfakes
3
4import (
5	"sync"
6
7	"github.com/lightstep/lightstep-tracer-common/golang/protobuf/collectorpb"
8	"golang.org/x/net/context"
9	_ "google.golang.org/genproto/googleapis/api/annotations"
10	"google.golang.org/grpc"
11)
12
13type FakeCollectorServiceClient struct {
14	ReportStub        func(ctx context.Context, in *collectorpb.ReportRequest, opts ...grpc.CallOption) (*collectorpb.ReportResponse, error)
15	reportMutex       sync.RWMutex
16	reportArgsForCall []struct {
17		ctx  context.Context
18		in   *collectorpb.ReportRequest
19		opts []grpc.CallOption
20	}
21	reportReturns struct {
22		result1 *collectorpb.ReportResponse
23		result2 error
24	}
25	reportReturnsOnCall map[int]struct {
26		result1 *collectorpb.ReportResponse
27		result2 error
28	}
29	invocations      map[string][][]interface{}
30	invocationsMutex sync.RWMutex
31}
32
33func (fake *FakeCollectorServiceClient) Report(ctx context.Context, in *collectorpb.ReportRequest, opts ...grpc.CallOption) (*collectorpb.ReportResponse, error) {
34	fake.reportMutex.Lock()
35	ret, specificReturn := fake.reportReturnsOnCall[len(fake.reportArgsForCall)]
36	fake.reportArgsForCall = append(fake.reportArgsForCall, struct {
37		ctx  context.Context
38		in   *collectorpb.ReportRequest
39		opts []grpc.CallOption
40	}{ctx, in, opts})
41	fake.recordInvocation("Report", []interface{}{ctx, in, opts})
42	fake.reportMutex.Unlock()
43	if fake.ReportStub != nil {
44		return fake.ReportStub(ctx, in, opts...)
45	}
46	if specificReturn {
47		return ret.result1, ret.result2
48	}
49	return fake.reportReturns.result1, fake.reportReturns.result2
50}
51
52func (fake *FakeCollectorServiceClient) ReportCallCount() int {
53	fake.reportMutex.RLock()
54	defer fake.reportMutex.RUnlock()
55	return len(fake.reportArgsForCall)
56}
57
58func (fake *FakeCollectorServiceClient) ReportArgsForCall(i int) (context.Context, *collectorpb.ReportRequest, []grpc.CallOption) {
59	fake.reportMutex.RLock()
60	defer fake.reportMutex.RUnlock()
61	return fake.reportArgsForCall[i].ctx, fake.reportArgsForCall[i].in, fake.reportArgsForCall[i].opts
62}
63
64func (fake *FakeCollectorServiceClient) ReportReturns(result1 *collectorpb.ReportResponse, result2 error) {
65	fake.ReportStub = nil
66	fake.reportReturns = struct {
67		result1 *collectorpb.ReportResponse
68		result2 error
69	}{result1, result2}
70}
71
72func (fake *FakeCollectorServiceClient) ReportReturnsOnCall(i int, result1 *collectorpb.ReportResponse, result2 error) {
73	fake.ReportStub = nil
74	if fake.reportReturnsOnCall == nil {
75		fake.reportReturnsOnCall = make(map[int]struct {
76			result1 *collectorpb.ReportResponse
77			result2 error
78		})
79	}
80	fake.reportReturnsOnCall[i] = struct {
81		result1 *collectorpb.ReportResponse
82		result2 error
83	}{result1, result2}
84}
85
86func (fake *FakeCollectorServiceClient) Invocations() map[string][][]interface{} {
87	fake.invocationsMutex.RLock()
88	defer fake.invocationsMutex.RUnlock()
89	fake.reportMutex.RLock()
90	defer fake.reportMutex.RUnlock()
91	copiedInvocations := map[string][][]interface{}{}
92	for key, value := range fake.invocations {
93		copiedInvocations[key] = value
94	}
95	return copiedInvocations
96}
97
98func (fake *FakeCollectorServiceClient) recordInvocation(key string, args []interface{}) {
99	fake.invocationsMutex.Lock()
100	defer fake.invocationsMutex.Unlock()
101	if fake.invocations == nil {
102		fake.invocations = map[string][][]interface{}{}
103	}
104	if fake.invocations[key] == nil {
105		fake.invocations[key] = [][]interface{}{}
106	}
107	fake.invocations[key] = append(fake.invocations[key], args)
108}
109
110var _ collectorpb.CollectorServiceClient = new(FakeCollectorServiceClient)
111