1// Code generated by protoc-gen-go.
2// source: loadtest.proto
3// DO NOT EDIT!
4
5/*
6Package google_pubsub_loadtest is a generated protocol buffer package.
7
8It is generated from these files:
9	loadtest.proto
10
11It has these top-level messages:
12	StartRequest
13	StartResponse
14	PubsubOptions
15	KafkaOptions
16	MessageIdentifier
17	CheckRequest
18	CheckResponse
19	ExecuteRequest
20	ExecuteResponse
21*/
22package google_pubsub_loadtest
23
24import (
25	fmt "fmt"
26
27	proto "github.com/golang/protobuf/proto"
28
29	math "math"
30
31	google_protobuf "github.com/golang/protobuf/ptypes/duration"
32
33	"context"
34
35	google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp"
36
37	grpc "google.golang.org/grpc"
38)
39
40// Reference imports to suppress errors if they are not otherwise used.
41var _ = proto.Marshal
42var _ = fmt.Errorf
43var _ = math.Inf
44
45// This is a compile-time assertion to ensure that this generated file
46// is compatible with the proto package it is being compiled against.
47// A compilation error at this line likely means your copy of the
48// proto package needs to be updated.
49const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
50
51type StartRequest struct {
52	// The GCP project. This must be set even for Kafka, as we use it to export metrics.
53	Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
54	// The Pub/Sub or Kafka topic name.
55	Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
56	// The number of requests that can be made, each second, per client.
57	RequestRate int32 `protobuf:"varint,3,opt,name=request_rate,json=requestRate" json:"request_rate,omitempty"`
58	// The size of each user message to publish
59	MessageSize int32 `protobuf:"varint,4,opt,name=message_size,json=messageSize" json:"message_size,omitempty"`
60	// The maximum outstanding requests, per client.
61	MaxOutstandingRequests int32 `protobuf:"varint,5,opt,name=max_outstanding_requests,json=maxOutstandingRequests" json:"max_outstanding_requests,omitempty"`
62	// The time at which the load test should start. If this is less than the current time, we start immediately.
63	StartTime *google_protobuf1.Timestamp `protobuf:"bytes,6,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
64	// The burn-in duration, before which results should not be reported.
65	BurnInDuration *google_protobuf.Duration `protobuf:"bytes,12,opt,name=burn_in_duration,json=burnInDuration" json:"burn_in_duration,omitempty"`
66	// The number of user messages of size message_size to publish together.
67	PublishBatchSize int32 `protobuf:"varint,11,opt,name=publish_batch_size,json=publishBatchSize" json:"publish_batch_size,omitempty"`
68	// The max duration for coalescing a batch of published messages.
69	PublishBatchDuration *google_protobuf.Duration `protobuf:"bytes,13,opt,name=publish_batch_duration,json=publishBatchDuration" json:"publish_batch_duration,omitempty"`
70	// Types that are valid to be assigned to StopConditions:
71	//	*StartRequest_TestDuration
72	//	*StartRequest_NumberOfMessages
73	StopConditions isStartRequest_StopConditions `protobuf_oneof:"stop_conditions"`
74	// Types that are valid to be assigned to Options:
75	//	*StartRequest_PubsubOptions
76	//	*StartRequest_KafkaOptions
77	Options isStartRequest_Options `protobuf_oneof:"options"`
78}
79
80func (m *StartRequest) Reset()                    { *m = StartRequest{} }
81func (m *StartRequest) String() string            { return proto.CompactTextString(m) }
82func (*StartRequest) ProtoMessage()               {}
83func (*StartRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
84
85type isStartRequest_StopConditions interface {
86	isStartRequest_StopConditions()
87}
88type isStartRequest_Options interface {
89	isStartRequest_Options()
90}
91
92type StartRequest_TestDuration struct {
93	TestDuration *google_protobuf.Duration `protobuf:"bytes,7,opt,name=test_duration,json=testDuration,oneof"`
94}
95type StartRequest_NumberOfMessages struct {
96	NumberOfMessages int32 `protobuf:"varint,8,opt,name=number_of_messages,json=numberOfMessages,oneof"`
97}
98type StartRequest_PubsubOptions struct {
99	PubsubOptions *PubsubOptions `protobuf:"bytes,9,opt,name=pubsub_options,json=pubsubOptions,oneof"`
100}
101type StartRequest_KafkaOptions struct {
102	KafkaOptions *KafkaOptions `protobuf:"bytes,10,opt,name=kafka_options,json=kafkaOptions,oneof"`
103}
104
105func (*StartRequest_TestDuration) isStartRequest_StopConditions()     {}
106func (*StartRequest_NumberOfMessages) isStartRequest_StopConditions() {}
107func (*StartRequest_PubsubOptions) isStartRequest_Options()           {}
108func (*StartRequest_KafkaOptions) isStartRequest_Options()            {}
109
110func (m *StartRequest) GetStopConditions() isStartRequest_StopConditions {
111	if m != nil {
112		return m.StopConditions
113	}
114	return nil
115}
116func (m *StartRequest) GetOptions() isStartRequest_Options {
117	if m != nil {
118		return m.Options
119	}
120	return nil
121}
122
123func (m *StartRequest) GetProject() string {
124	if m != nil {
125		return m.Project
126	}
127	return ""
128}
129
130func (m *StartRequest) GetTopic() string {
131	if m != nil {
132		return m.Topic
133	}
134	return ""
135}
136
137func (m *StartRequest) GetRequestRate() int32 {
138	if m != nil {
139		return m.RequestRate
140	}
141	return 0
142}
143
144func (m *StartRequest) GetMessageSize() int32 {
145	if m != nil {
146		return m.MessageSize
147	}
148	return 0
149}
150
151func (m *StartRequest) GetMaxOutstandingRequests() int32 {
152	if m != nil {
153		return m.MaxOutstandingRequests
154	}
155	return 0
156}
157
158func (m *StartRequest) GetStartTime() *google_protobuf1.Timestamp {
159	if m != nil {
160		return m.StartTime
161	}
162	return nil
163}
164
165func (m *StartRequest) GetBurnInDuration() *google_protobuf.Duration {
166	if m != nil {
167		return m.BurnInDuration
168	}
169	return nil
170}
171
172func (m *StartRequest) GetPublishBatchSize() int32 {
173	if m != nil {
174		return m.PublishBatchSize
175	}
176	return 0
177}
178
179func (m *StartRequest) GetPublishBatchDuration() *google_protobuf.Duration {
180	if m != nil {
181		return m.PublishBatchDuration
182	}
183	return nil
184}
185
186func (m *StartRequest) GetTestDuration() *google_protobuf.Duration {
187	if x, ok := m.GetStopConditions().(*StartRequest_TestDuration); ok {
188		return x.TestDuration
189	}
190	return nil
191}
192
193func (m *StartRequest) GetNumberOfMessages() int32 {
194	if x, ok := m.GetStopConditions().(*StartRequest_NumberOfMessages); ok {
195		return x.NumberOfMessages
196	}
197	return 0
198}
199
200func (m *StartRequest) GetPubsubOptions() *PubsubOptions {
201	if x, ok := m.GetOptions().(*StartRequest_PubsubOptions); ok {
202		return x.PubsubOptions
203	}
204	return nil
205}
206
207func (m *StartRequest) GetKafkaOptions() *KafkaOptions {
208	if x, ok := m.GetOptions().(*StartRequest_KafkaOptions); ok {
209		return x.KafkaOptions
210	}
211	return nil
212}
213
214// XXX_OneofFuncs is for the internal use of the proto package.
215func (*StartRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
216	return _StartRequest_OneofMarshaler, _StartRequest_OneofUnmarshaler, _StartRequest_OneofSizer, []interface{}{
217		(*StartRequest_TestDuration)(nil),
218		(*StartRequest_NumberOfMessages)(nil),
219		(*StartRequest_PubsubOptions)(nil),
220		(*StartRequest_KafkaOptions)(nil),
221	}
222}
223
224func _StartRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
225	m := msg.(*StartRequest)
226	// stop_conditions
227	switch x := m.StopConditions.(type) {
228	case *StartRequest_TestDuration:
229		b.EncodeVarint(7<<3 | proto.WireBytes)
230		if err := b.EncodeMessage(x.TestDuration); err != nil {
231			return err
232		}
233	case *StartRequest_NumberOfMessages:
234		b.EncodeVarint(8<<3 | proto.WireVarint)
235		b.EncodeVarint(uint64(x.NumberOfMessages))
236	case nil:
237	default:
238		return fmt.Errorf("StartRequest.StopConditions has unexpected type %T", x)
239	}
240	// options
241	switch x := m.Options.(type) {
242	case *StartRequest_PubsubOptions:
243		b.EncodeVarint(9<<3 | proto.WireBytes)
244		if err := b.EncodeMessage(x.PubsubOptions); err != nil {
245			return err
246		}
247	case *StartRequest_KafkaOptions:
248		b.EncodeVarint(10<<3 | proto.WireBytes)
249		if err := b.EncodeMessage(x.KafkaOptions); err != nil {
250			return err
251		}
252	case nil:
253	default:
254		return fmt.Errorf("StartRequest.Options has unexpected type %T", x)
255	}
256	return nil
257}
258
259func _StartRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
260	m := msg.(*StartRequest)
261	switch tag {
262	case 7: // stop_conditions.test_duration
263		if wire != proto.WireBytes {
264			return true, proto.ErrInternalBadWireType
265		}
266		msg := new(google_protobuf.Duration)
267		err := b.DecodeMessage(msg)
268		m.StopConditions = &StartRequest_TestDuration{msg}
269		return true, err
270	case 8: // stop_conditions.number_of_messages
271		if wire != proto.WireVarint {
272			return true, proto.ErrInternalBadWireType
273		}
274		x, err := b.DecodeVarint()
275		m.StopConditions = &StartRequest_NumberOfMessages{int32(x)}
276		return true, err
277	case 9: // options.pubsub_options
278		if wire != proto.WireBytes {
279			return true, proto.ErrInternalBadWireType
280		}
281		msg := new(PubsubOptions)
282		err := b.DecodeMessage(msg)
283		m.Options = &StartRequest_PubsubOptions{msg}
284		return true, err
285	case 10: // options.kafka_options
286		if wire != proto.WireBytes {
287			return true, proto.ErrInternalBadWireType
288		}
289		msg := new(KafkaOptions)
290		err := b.DecodeMessage(msg)
291		m.Options = &StartRequest_KafkaOptions{msg}
292		return true, err
293	default:
294		return false, nil
295	}
296}
297
298func _StartRequest_OneofSizer(msg proto.Message) (n int) {
299	m := msg.(*StartRequest)
300	// stop_conditions
301	switch x := m.StopConditions.(type) {
302	case *StartRequest_TestDuration:
303		s := proto.Size(x.TestDuration)
304		n += proto.SizeVarint(7<<3 | proto.WireBytes)
305		n += proto.SizeVarint(uint64(s))
306		n += s
307	case *StartRequest_NumberOfMessages:
308		n += proto.SizeVarint(8<<3 | proto.WireVarint)
309		n += proto.SizeVarint(uint64(x.NumberOfMessages))
310	case nil:
311	default:
312		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
313	}
314	// options
315	switch x := m.Options.(type) {
316	case *StartRequest_PubsubOptions:
317		s := proto.Size(x.PubsubOptions)
318		n += proto.SizeVarint(9<<3 | proto.WireBytes)
319		n += proto.SizeVarint(uint64(s))
320		n += s
321	case *StartRequest_KafkaOptions:
322		s := proto.Size(x.KafkaOptions)
323		n += proto.SizeVarint(10<<3 | proto.WireBytes)
324		n += proto.SizeVarint(uint64(s))
325		n += s
326	case nil:
327	default:
328		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
329	}
330	return n
331}
332
333type StartResponse struct {
334}
335
336func (m *StartResponse) Reset()                    { *m = StartResponse{} }
337func (m *StartResponse) String() string            { return proto.CompactTextString(m) }
338func (*StartResponse) ProtoMessage()               {}
339func (*StartResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
340
341type PubsubOptions struct {
342	// The Cloud Pub/Sub subscription name
343	Subscription string `protobuf:"bytes,1,opt,name=subscription" json:"subscription,omitempty"`
344	// The maximum number of messages to pull which each request.
345	MaxMessagesPerPull int32 `protobuf:"varint,2,opt,name=max_messages_per_pull,json=maxMessagesPerPull" json:"max_messages_per_pull,omitempty"`
346}
347
348func (m *PubsubOptions) Reset()                    { *m = PubsubOptions{} }
349func (m *PubsubOptions) String() string            { return proto.CompactTextString(m) }
350func (*PubsubOptions) ProtoMessage()               {}
351func (*PubsubOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
352
353func (m *PubsubOptions) GetSubscription() string {
354	if m != nil {
355		return m.Subscription
356	}
357	return ""
358}
359
360func (m *PubsubOptions) GetMaxMessagesPerPull() int32 {
361	if m != nil {
362		return m.MaxMessagesPerPull
363	}
364	return 0
365}
366
367type KafkaOptions struct {
368	// The network address of the Kafka broker.
369	Broker string `protobuf:"bytes,1,opt,name=broker" json:"broker,omitempty"`
370	// The length of time to poll for.
371	PollDuration *google_protobuf.Duration `protobuf:"bytes,2,opt,name=poll_duration,json=pollDuration" json:"poll_duration,omitempty"`
372}
373
374func (m *KafkaOptions) Reset()                    { *m = KafkaOptions{} }
375func (m *KafkaOptions) String() string            { return proto.CompactTextString(m) }
376func (*KafkaOptions) ProtoMessage()               {}
377func (*KafkaOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
378
379func (m *KafkaOptions) GetBroker() string {
380	if m != nil {
381		return m.Broker
382	}
383	return ""
384}
385
386func (m *KafkaOptions) GetPollDuration() *google_protobuf.Duration {
387	if m != nil {
388		return m.PollDuration
389	}
390	return nil
391}
392
393type MessageIdentifier struct {
394	// The unique id of the client that published the message.
395	PublisherClientId int64 `protobuf:"varint,1,opt,name=publisher_client_id,json=publisherClientId" json:"publisher_client_id,omitempty"`
396	// Sequence number of the published message with the given publish_client_id.
397	SequenceNumber int32 `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber" json:"sequence_number,omitempty"`
398}
399
400func (m *MessageIdentifier) Reset()                    { *m = MessageIdentifier{} }
401func (m *MessageIdentifier) String() string            { return proto.CompactTextString(m) }
402func (*MessageIdentifier) ProtoMessage()               {}
403func (*MessageIdentifier) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
404
405func (m *MessageIdentifier) GetPublisherClientId() int64 {
406	if m != nil {
407		return m.PublisherClientId
408	}
409	return 0
410}
411
412func (m *MessageIdentifier) GetSequenceNumber() int32 {
413	if m != nil {
414		return m.SequenceNumber
415	}
416	return 0
417}
418
419type CheckRequest struct {
420	// Duplicate messages that should not be reported for throughput and latency.
421	Duplicates []*MessageIdentifier `protobuf:"bytes,1,rep,name=duplicates" json:"duplicates,omitempty"`
422}
423
424func (m *CheckRequest) Reset()                    { *m = CheckRequest{} }
425func (m *CheckRequest) String() string            { return proto.CompactTextString(m) }
426func (*CheckRequest) ProtoMessage()               {}
427func (*CheckRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
428
429func (m *CheckRequest) GetDuplicates() []*MessageIdentifier {
430	if m != nil {
431		return m.Duplicates
432	}
433	return nil
434}
435
436type CheckResponse struct {
437	// Histogram of latencies, each one a delta from the previous CheckResponse sent.
438	BucketValues []int64 `protobuf:"varint,1,rep,packed,name=bucket_values,json=bucketValues" json:"bucket_values,omitempty"`
439	// The duration from the start of the loadtest to its completion or now if is_finished is false.
440	RunningDuration *google_protobuf.Duration `protobuf:"bytes,2,opt,name=running_duration,json=runningDuration" json:"running_duration,omitempty"`
441	// True if the load test has finished running.
442	IsFinished bool `protobuf:"varint,3,opt,name=is_finished,json=isFinished" json:"is_finished,omitempty"`
443	// MessageIdentifiers of all received messages since the last Check
444	ReceivedMessages []*MessageIdentifier `protobuf:"bytes,4,rep,name=received_messages,json=receivedMessages" json:"received_messages,omitempty"`
445}
446
447func (m *CheckResponse) Reset()                    { *m = CheckResponse{} }
448func (m *CheckResponse) String() string            { return proto.CompactTextString(m) }
449func (*CheckResponse) ProtoMessage()               {}
450func (*CheckResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
451
452func (m *CheckResponse) GetBucketValues() []int64 {
453	if m != nil {
454		return m.BucketValues
455	}
456	return nil
457}
458
459func (m *CheckResponse) GetRunningDuration() *google_protobuf.Duration {
460	if m != nil {
461		return m.RunningDuration
462	}
463	return nil
464}
465
466func (m *CheckResponse) GetIsFinished() bool {
467	if m != nil {
468		return m.IsFinished
469	}
470	return false
471}
472
473func (m *CheckResponse) GetReceivedMessages() []*MessageIdentifier {
474	if m != nil {
475		return m.ReceivedMessages
476	}
477	return nil
478}
479
480type ExecuteRequest struct {
481}
482
483func (m *ExecuteRequest) Reset()                    { *m = ExecuteRequest{} }
484func (m *ExecuteRequest) String() string            { return proto.CompactTextString(m) }
485func (*ExecuteRequest) ProtoMessage()               {}
486func (*ExecuteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
487
488type ExecuteResponse struct {
489	// Latencies of the completed operations
490	Latencies []int64 `protobuf:"varint,1,rep,packed,name=latencies" json:"latencies,omitempty"`
491	// MessageIdentifiers of all received messages since the last Execute
492	ReceivedMessages []*MessageIdentifier `protobuf:"bytes,2,rep,name=received_messages,json=receivedMessages" json:"received_messages,omitempty"`
493}
494
495func (m *ExecuteResponse) Reset()                    { *m = ExecuteResponse{} }
496func (m *ExecuteResponse) String() string            { return proto.CompactTextString(m) }
497func (*ExecuteResponse) ProtoMessage()               {}
498func (*ExecuteResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
499
500func (m *ExecuteResponse) GetLatencies() []int64 {
501	if m != nil {
502		return m.Latencies
503	}
504	return nil
505}
506
507func (m *ExecuteResponse) GetReceivedMessages() []*MessageIdentifier {
508	if m != nil {
509		return m.ReceivedMessages
510	}
511	return nil
512}
513
514func init() {
515	proto.RegisterType((*StartRequest)(nil), "google.pubsub.loadtest.StartRequest")
516	proto.RegisterType((*StartResponse)(nil), "google.pubsub.loadtest.StartResponse")
517	proto.RegisterType((*PubsubOptions)(nil), "google.pubsub.loadtest.PubsubOptions")
518	proto.RegisterType((*KafkaOptions)(nil), "google.pubsub.loadtest.KafkaOptions")
519	proto.RegisterType((*MessageIdentifier)(nil), "google.pubsub.loadtest.MessageIdentifier")
520	proto.RegisterType((*CheckRequest)(nil), "google.pubsub.loadtest.CheckRequest")
521	proto.RegisterType((*CheckResponse)(nil), "google.pubsub.loadtest.CheckResponse")
522	proto.RegisterType((*ExecuteRequest)(nil), "google.pubsub.loadtest.ExecuteRequest")
523	proto.RegisterType((*ExecuteResponse)(nil), "google.pubsub.loadtest.ExecuteResponse")
524}
525
526// Reference imports to suppress errors if they are not otherwise used.
527var _ context.Context
528var _ grpc.ClientConn
529
530// This is a compile-time assertion to ensure that this generated file
531// is compatible with the grpc package it is being compiled against.
532const _ = grpc.SupportPackageIsVersion4
533
534// Client API for Loadtest service
535
536type LoadtestClient interface {
537	// Starts a load test
538	Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error)
539	// Checks the status of a load test
540	Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
541}
542
543type loadtestClient struct {
544	cc *grpc.ClientConn
545}
546
547func NewLoadtestClient(cc *grpc.ClientConn) LoadtestClient {
548	return &loadtestClient{cc}
549}
550
551func (c *loadtestClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error) {
552	out := new(StartResponse)
553	err := grpc.Invoke(ctx, "/google.pubsub.loadtest.Loadtest/Start", in, out, c.cc, opts...)
554	if err != nil {
555		return nil, err
556	}
557	return out, nil
558}
559
560func (c *loadtestClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) {
561	out := new(CheckResponse)
562	err := grpc.Invoke(ctx, "/google.pubsub.loadtest.Loadtest/Check", in, out, c.cc, opts...)
563	if err != nil {
564		return nil, err
565	}
566	return out, nil
567}
568
569// Server API for Loadtest service
570
571type LoadtestServer interface {
572	// Starts a load test
573	Start(context.Context, *StartRequest) (*StartResponse, error)
574	// Checks the status of a load test
575	Check(context.Context, *CheckRequest) (*CheckResponse, error)
576}
577
578func RegisterLoadtestServer(s *grpc.Server, srv LoadtestServer) {
579	s.RegisterService(&_Loadtest_serviceDesc, srv)
580}
581
582func _Loadtest_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
583	in := new(StartRequest)
584	if err := dec(in); err != nil {
585		return nil, err
586	}
587	if interceptor == nil {
588		return srv.(LoadtestServer).Start(ctx, in)
589	}
590	info := &grpc.UnaryServerInfo{
591		Server:     srv,
592		FullMethod: "/google.pubsub.loadtest.Loadtest/Start",
593	}
594	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
595		return srv.(LoadtestServer).Start(ctx, req.(*StartRequest))
596	}
597	return interceptor(ctx, in, info, handler)
598}
599
600func _Loadtest_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
601	in := new(CheckRequest)
602	if err := dec(in); err != nil {
603		return nil, err
604	}
605	if interceptor == nil {
606		return srv.(LoadtestServer).Check(ctx, in)
607	}
608	info := &grpc.UnaryServerInfo{
609		Server:     srv,
610		FullMethod: "/google.pubsub.loadtest.Loadtest/Check",
611	}
612	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
613		return srv.(LoadtestServer).Check(ctx, req.(*CheckRequest))
614	}
615	return interceptor(ctx, in, info, handler)
616}
617
618var _Loadtest_serviceDesc = grpc.ServiceDesc{
619	ServiceName: "google.pubsub.loadtest.Loadtest",
620	HandlerType: (*LoadtestServer)(nil),
621	Methods: []grpc.MethodDesc{
622		{
623			MethodName: "Start",
624			Handler:    _Loadtest_Start_Handler,
625		},
626		{
627			MethodName: "Check",
628			Handler:    _Loadtest_Check_Handler,
629		},
630	},
631	Streams:  []grpc.StreamDesc{},
632	Metadata: "loadtest.proto",
633}
634
635// Client API for LoadtestWorker service
636
637type LoadtestWorkerClient interface {
638	// Starts a worker
639	Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error)
640	// Executes a command on the worker, returning the latencies of the operations. Since some
641	// commands consist of multiple operations (i.e. pulls contain many received messages with
642	// different end to end latencies) a single command can have multiple latencies returned.
643	Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
644}
645
646type loadtestWorkerClient struct {
647	cc *grpc.ClientConn
648}
649
650func NewLoadtestWorkerClient(cc *grpc.ClientConn) LoadtestWorkerClient {
651	return &loadtestWorkerClient{cc}
652}
653
654func (c *loadtestWorkerClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error) {
655	out := new(StartResponse)
656	err := grpc.Invoke(ctx, "/google.pubsub.loadtest.LoadtestWorker/Start", in, out, c.cc, opts...)
657	if err != nil {
658		return nil, err
659	}
660	return out, nil
661}
662
663func (c *loadtestWorkerClient) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) {
664	out := new(ExecuteResponse)
665	err := grpc.Invoke(ctx, "/google.pubsub.loadtest.LoadtestWorker/Execute", in, out, c.cc, opts...)
666	if err != nil {
667		return nil, err
668	}
669	return out, nil
670}
671
672// Server API for LoadtestWorker service
673
674type LoadtestWorkerServer interface {
675	// Starts a worker
676	Start(context.Context, *StartRequest) (*StartResponse, error)
677	// Executes a command on the worker, returning the latencies of the operations. Since some
678	// commands consist of multiple operations (i.e. pulls contain many received messages with
679	// different end to end latencies) a single command can have multiple latencies returned.
680	Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
681}
682
683func RegisterLoadtestWorkerServer(s *grpc.Server, srv LoadtestWorkerServer) {
684	s.RegisterService(&_LoadtestWorker_serviceDesc, srv)
685}
686
687func _LoadtestWorker_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
688	in := new(StartRequest)
689	if err := dec(in); err != nil {
690		return nil, err
691	}
692	if interceptor == nil {
693		return srv.(LoadtestWorkerServer).Start(ctx, in)
694	}
695	info := &grpc.UnaryServerInfo{
696		Server:     srv,
697		FullMethod: "/google.pubsub.loadtest.LoadtestWorker/Start",
698	}
699	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
700		return srv.(LoadtestWorkerServer).Start(ctx, req.(*StartRequest))
701	}
702	return interceptor(ctx, in, info, handler)
703}
704
705func _LoadtestWorker_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
706	in := new(ExecuteRequest)
707	if err := dec(in); err != nil {
708		return nil, err
709	}
710	if interceptor == nil {
711		return srv.(LoadtestWorkerServer).Execute(ctx, in)
712	}
713	info := &grpc.UnaryServerInfo{
714		Server:     srv,
715		FullMethod: "/google.pubsub.loadtest.LoadtestWorker/Execute",
716	}
717	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
718		return srv.(LoadtestWorkerServer).Execute(ctx, req.(*ExecuteRequest))
719	}
720	return interceptor(ctx, in, info, handler)
721}
722
723var _LoadtestWorker_serviceDesc = grpc.ServiceDesc{
724	ServiceName: "google.pubsub.loadtest.LoadtestWorker",
725	HandlerType: (*LoadtestWorkerServer)(nil),
726	Methods: []grpc.MethodDesc{
727		{
728			MethodName: "Start",
729			Handler:    _LoadtestWorker_Start_Handler,
730		},
731		{
732			MethodName: "Execute",
733			Handler:    _LoadtestWorker_Execute_Handler,
734		},
735	},
736	Streams:  []grpc.StreamDesc{},
737	Metadata: "loadtest.proto",
738}
739
740func init() { proto.RegisterFile("loadtest.proto", fileDescriptor0) }
741
742var fileDescriptor0 = []byte{
743	// 847 bytes of a gzipped FileDescriptorProto
744	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xdd, 0x6e, 0xdc, 0x44,
745	0x14, 0xae, 0x93, 0x6e, 0x92, 0x3d, 0x6b, 0xef, 0x6e, 0x86, 0x12, 0x99, 0x15, 0xd0, 0x60, 0x28,
746	0x0d, 0x12, 0x72, 0x45, 0xb8, 0x81, 0x1b, 0x84, 0x92, 0x82, 0x12, 0x15, 0x9a, 0xc8, 0x8d, 0x8a,
747	0xe0, 0x66, 0x34, 0xb6, 0x67, 0x93, 0x61, 0xed, 0x19, 0x33, 0x3f, 0x55, 0xd4, 0x17, 0xe0, 0x8d,
748	0x78, 0x00, 0x1e, 0x87, 0x5b, 0x5e, 0x00, 0xcd, 0x78, 0xbc, 0x3f, 0x6d, 0x57, 0x0b, 0x42, 0xbd,
749	0x3c, 0xdf, 0xf9, 0xce, 0x37, 0xe7, 0xd7, 0x86, 0x61, 0x25, 0x48, 0xa9, 0xa9, 0xd2, 0x69, 0x23,
750	0x85, 0x16, 0xe8, 0xe0, 0x5a, 0x88, 0xeb, 0x8a, 0xa6, 0x8d, 0xc9, 0x95, 0xc9, 0xd3, 0xce, 0x3b,
751	0xf9, 0xb0, 0xc5, 0x1f, 0x39, 0x56, 0x6e, 0xa6, 0x8f, 0x4a, 0x23, 0x89, 0x66, 0x82, 0xb7, 0x71,
752	0x93, 0xfb, 0xaf, 0xfa, 0x35, 0xab, 0xa9, 0xd2, 0xa4, 0x6e, 0x5a, 0x42, 0xf2, 0x57, 0x0f, 0xc2,
753	0x67, 0x9a, 0x48, 0x9d, 0xd1, 0xdf, 0x0c, 0x55, 0x1a, 0xc5, 0xb0, 0xdb, 0x48, 0xf1, 0x2b, 0x2d,
754	0x74, 0x1c, 0x1c, 0x06, 0x47, 0xfd,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