-
Notifications
You must be signed in to change notification settings - Fork 2
/
PulsarApi.pb.go
2207 lines (1955 loc) · 86.8 KB
/
PulsarApi.pb.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 protoc-gen-go. DO NOT EDIT.
// source: PulsarApi.proto
/*
Package pulsar_proto is a generated protocol buffer package.
It is generated from these files:
PulsarApi.proto
It has these top-level messages:
MessageIdData
KeyValue
MessageMetadata
SingleMessageMetadata
CommandConnect
CommandConnected
CommandSubscribe
CommandPartitionedTopicMetadata
CommandPartitionedTopicMetadataResponse
CommandLookupTopic
CommandLookupTopicResponse
CommandProducer
CommandSend
CommandSendReceipt
CommandSendError
CommandMessage
CommandAck
CommandFlow
CommandUnsubscribe
CommandReachedEndOfTopic
CommandCloseProducer
CommandCloseConsumer
CommandRedeliverUnacknowledgedMessages
CommandSuccess
CommandProducerSuccess
CommandError
CommandPing
CommandPong
CommandConsumerStats
CommandConsumerStatsResponse
BaseCommand
*/
package pulsar_proto
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type CompressionType int32
const (
CompressionType_NONE CompressionType = 0
CompressionType_LZ4 CompressionType = 1
CompressionType_ZLIB CompressionType = 2
)
var CompressionType_name = map[int32]string{
0: "NONE",
1: "LZ4",
2: "ZLIB",
}
var CompressionType_value = map[string]int32{
"NONE": 0,
"LZ4": 1,
"ZLIB": 2,
}
func (x CompressionType) Enum() *CompressionType {
p := new(CompressionType)
*p = x
return p
}
func (x CompressionType) String() string {
return proto.EnumName(CompressionType_name, int32(x))
}
func (x *CompressionType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(CompressionType_value, data, "CompressionType")
if err != nil {
return err
}
*x = CompressionType(value)
return nil
}
func (CompressionType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type ServerError int32
const (
ServerError_UnknownError ServerError = 0
ServerError_MetadataError ServerError = 1
ServerError_PersistenceError ServerError = 2
ServerError_AuthenticationError ServerError = 3
ServerError_AuthorizationError ServerError = 4
ServerError_ConsumerBusy ServerError = 5
// other consumers are connected
ServerError_ServiceNotReady ServerError = 6
ServerError_ProducerBlockedQuotaExceededError ServerError = 7
ServerError_ProducerBlockedQuotaExceededException ServerError = 8
ServerError_ChecksumError ServerError = 9
ServerError_UnsupportedVersionError ServerError = 10
ServerError_TopicNotFound ServerError = 11
ServerError_SubscriptionNotFound ServerError = 12
ServerError_ConsumerNotFound ServerError = 13
ServerError_TooManyRequests ServerError = 14
ServerError_TopicTerminatedError ServerError = 15
)
var ServerError_name = map[int32]string{
0: "UnknownError",
1: "MetadataError",
2: "PersistenceError",
3: "AuthenticationError",
4: "AuthorizationError",
5: "ConsumerBusy",
6: "ServiceNotReady",
7: "ProducerBlockedQuotaExceededError",
8: "ProducerBlockedQuotaExceededException",
9: "ChecksumError",
10: "UnsupportedVersionError",
11: "TopicNotFound",
12: "SubscriptionNotFound",
13: "ConsumerNotFound",
14: "TooManyRequests",
15: "TopicTerminatedError",
}
var ServerError_value = map[string]int32{
"UnknownError": 0,
"MetadataError": 1,
"PersistenceError": 2,
"AuthenticationError": 3,
"AuthorizationError": 4,
"ConsumerBusy": 5,
"ServiceNotReady": 6,
"ProducerBlockedQuotaExceededError": 7,
"ProducerBlockedQuotaExceededException": 8,
"ChecksumError": 9,
"UnsupportedVersionError": 10,
"TopicNotFound": 11,
"SubscriptionNotFound": 12,
"ConsumerNotFound": 13,
"TooManyRequests": 14,
"TopicTerminatedError": 15,
}
func (x ServerError) Enum() *ServerError {
p := new(ServerError)
*p = x
return p
}
func (x ServerError) String() string {
return proto.EnumName(ServerError_name, int32(x))
}
func (x *ServerError) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ServerError_value, data, "ServerError")
if err != nil {
return err
}
*x = ServerError(value)
return nil
}
func (ServerError) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
type AuthMethod int32
const (
AuthMethod_AuthMethodNone AuthMethod = 0
AuthMethod_AuthMethodYcaV1 AuthMethod = 1
AuthMethod_AuthMethodAthens AuthMethod = 2
)
var AuthMethod_name = map[int32]string{
0: "AuthMethodNone",
1: "AuthMethodYcaV1",
2: "AuthMethodAthens",
}
var AuthMethod_value = map[string]int32{
"AuthMethodNone": 0,
"AuthMethodYcaV1": 1,
"AuthMethodAthens": 2,
}
func (x AuthMethod) Enum() *AuthMethod {
p := new(AuthMethod)
*p = x
return p
}
func (x AuthMethod) String() string {
return proto.EnumName(AuthMethod_name, int32(x))
}
func (x *AuthMethod) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(AuthMethod_value, data, "AuthMethod")
if err != nil {
return err
}
*x = AuthMethod(value)
return nil
}
func (AuthMethod) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
// Each protocol version identify new features that are
// incrementally added to the protocol
type ProtocolVersion int32
const (
ProtocolVersion_v0 ProtocolVersion = 0
ProtocolVersion_v1 ProtocolVersion = 1
ProtocolVersion_v2 ProtocolVersion = 2
ProtocolVersion_v3 ProtocolVersion = 3
ProtocolVersion_v4 ProtocolVersion = 4
ProtocolVersion_v5 ProtocolVersion = 5
ProtocolVersion_v6 ProtocolVersion = 6
ProtocolVersion_v7 ProtocolVersion = 7
ProtocolVersion_v8 ProtocolVersion = 8
ProtocolVersion_v9 ProtocolVersion = 9
)
var ProtocolVersion_name = map[int32]string{
0: "v0",
1: "v1",
2: "v2",
3: "v3",
4: "v4",
5: "v5",
6: "v6",
7: "v7",
8: "v8",
9: "v9",
}
var ProtocolVersion_value = map[string]int32{
"v0": 0,
"v1": 1,
"v2": 2,
"v3": 3,
"v4": 4,
"v5": 5,
"v6": 6,
"v7": 7,
"v8": 8,
"v9": 9,
}
func (x ProtocolVersion) Enum() *ProtocolVersion {
p := new(ProtocolVersion)
*p = x
return p
}
func (x ProtocolVersion) String() string {
return proto.EnumName(ProtocolVersion_name, int32(x))
}
func (x *ProtocolVersion) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ProtocolVersion_value, data, "ProtocolVersion")
if err != nil {
return err
}
*x = ProtocolVersion(value)
return nil
}
func (ProtocolVersion) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
type CommandSubscribe_SubType int32
const (
CommandSubscribe_Exclusive CommandSubscribe_SubType = 0
CommandSubscribe_Shared CommandSubscribe_SubType = 1
CommandSubscribe_Failover CommandSubscribe_SubType = 2
)
var CommandSubscribe_SubType_name = map[int32]string{
0: "Exclusive",
1: "Shared",
2: "Failover",
}
var CommandSubscribe_SubType_value = map[string]int32{
"Exclusive": 0,
"Shared": 1,
"Failover": 2,
}
func (x CommandSubscribe_SubType) Enum() *CommandSubscribe_SubType {
p := new(CommandSubscribe_SubType)
*p = x
return p
}
func (x CommandSubscribe_SubType) String() string {
return proto.EnumName(CommandSubscribe_SubType_name, int32(x))
}
func (x *CommandSubscribe_SubType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(CommandSubscribe_SubType_value, data, "CommandSubscribe_SubType")
if err != nil {
return err
}
*x = CommandSubscribe_SubType(value)
return nil
}
func (CommandSubscribe_SubType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{6, 0} }
type CommandPartitionedTopicMetadataResponse_LookupType int32
const (
CommandPartitionedTopicMetadataResponse_Success CommandPartitionedTopicMetadataResponse_LookupType = 0
CommandPartitionedTopicMetadataResponse_Failed CommandPartitionedTopicMetadataResponse_LookupType = 1
)
var CommandPartitionedTopicMetadataResponse_LookupType_name = map[int32]string{
0: "Success",
1: "Failed",
}
var CommandPartitionedTopicMetadataResponse_LookupType_value = map[string]int32{
"Success": 0,
"Failed": 1,
}
func (x CommandPartitionedTopicMetadataResponse_LookupType) Enum() *CommandPartitionedTopicMetadataResponse_LookupType {
p := new(CommandPartitionedTopicMetadataResponse_LookupType)
*p = x
return p
}
func (x CommandPartitionedTopicMetadataResponse_LookupType) String() string {
return proto.EnumName(CommandPartitionedTopicMetadataResponse_LookupType_name, int32(x))
}
func (x *CommandPartitionedTopicMetadataResponse_LookupType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(CommandPartitionedTopicMetadataResponse_LookupType_value, data, "CommandPartitionedTopicMetadataResponse_LookupType")
if err != nil {
return err
}
*x = CommandPartitionedTopicMetadataResponse_LookupType(value)
return nil
}
func (CommandPartitionedTopicMetadataResponse_LookupType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{8, 0}
}
type CommandLookupTopicResponse_LookupType int32
const (
CommandLookupTopicResponse_Redirect CommandLookupTopicResponse_LookupType = 0
CommandLookupTopicResponse_Connect CommandLookupTopicResponse_LookupType = 1
CommandLookupTopicResponse_Failed CommandLookupTopicResponse_LookupType = 2
)
var CommandLookupTopicResponse_LookupType_name = map[int32]string{
0: "Redirect",
1: "Connect",
2: "Failed",
}
var CommandLookupTopicResponse_LookupType_value = map[string]int32{
"Redirect": 0,
"Connect": 1,
"Failed": 2,
}
func (x CommandLookupTopicResponse_LookupType) Enum() *CommandLookupTopicResponse_LookupType {
p := new(CommandLookupTopicResponse_LookupType)
*p = x
return p
}
func (x CommandLookupTopicResponse_LookupType) String() string {
return proto.EnumName(CommandLookupTopicResponse_LookupType_name, int32(x))
}
func (x *CommandLookupTopicResponse_LookupType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(CommandLookupTopicResponse_LookupType_value, data, "CommandLookupTopicResponse_LookupType")
if err != nil {
return err
}
*x = CommandLookupTopicResponse_LookupType(value)
return nil
}
func (CommandLookupTopicResponse_LookupType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{10, 0}
}
type CommandAck_AckType int32
const (
CommandAck_Individual CommandAck_AckType = 0
CommandAck_Cumulative CommandAck_AckType = 1
)
var CommandAck_AckType_name = map[int32]string{
0: "Individual",
1: "Cumulative",
}
var CommandAck_AckType_value = map[string]int32{
"Individual": 0,
"Cumulative": 1,
}
func (x CommandAck_AckType) Enum() *CommandAck_AckType {
p := new(CommandAck_AckType)
*p = x
return p
}
func (x CommandAck_AckType) String() string {
return proto.EnumName(CommandAck_AckType_name, int32(x))
}
func (x *CommandAck_AckType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(CommandAck_AckType_value, data, "CommandAck_AckType")
if err != nil {
return err
}
*x = CommandAck_AckType(value)
return nil
}
func (CommandAck_AckType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{16, 0} }
// Acks can contain a flag to indicate the consumer
// received an invalid message that got discarded
// before being passed on to the application.
type CommandAck_ValidationError int32
const (
CommandAck_UncompressedSizeCorruption CommandAck_ValidationError = 0
CommandAck_DecompressionError CommandAck_ValidationError = 1
CommandAck_ChecksumMismatch CommandAck_ValidationError = 2
CommandAck_BatchDeSerializeError CommandAck_ValidationError = 3
)
var CommandAck_ValidationError_name = map[int32]string{
0: "UncompressedSizeCorruption",
1: "DecompressionError",
2: "ChecksumMismatch",
3: "BatchDeSerializeError",
}
var CommandAck_ValidationError_value = map[string]int32{
"UncompressedSizeCorruption": 0,
"DecompressionError": 1,
"ChecksumMismatch": 2,
"BatchDeSerializeError": 3,
}
func (x CommandAck_ValidationError) Enum() *CommandAck_ValidationError {
p := new(CommandAck_ValidationError)
*p = x
return p
}
func (x CommandAck_ValidationError) String() string {
return proto.EnumName(CommandAck_ValidationError_name, int32(x))
}
func (x *CommandAck_ValidationError) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(CommandAck_ValidationError_value, data, "CommandAck_ValidationError")
if err != nil {
return err
}
*x = CommandAck_ValidationError(value)
return nil
}
func (CommandAck_ValidationError) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{16, 1}
}
type BaseCommand_Type int32
const (
BaseCommand_CONNECT BaseCommand_Type = 2
BaseCommand_CONNECTED BaseCommand_Type = 3
BaseCommand_SUBSCRIBE BaseCommand_Type = 4
BaseCommand_PRODUCER BaseCommand_Type = 5
BaseCommand_SEND BaseCommand_Type = 6
BaseCommand_SEND_RECEIPT BaseCommand_Type = 7
BaseCommand_SEND_ERROR BaseCommand_Type = 8
BaseCommand_MESSAGE BaseCommand_Type = 9
BaseCommand_ACK BaseCommand_Type = 10
BaseCommand_FLOW BaseCommand_Type = 11
BaseCommand_UNSUBSCRIBE BaseCommand_Type = 12
BaseCommand_SUCCESS BaseCommand_Type = 13
BaseCommand_ERROR BaseCommand_Type = 14
BaseCommand_CLOSE_PRODUCER BaseCommand_Type = 15
BaseCommand_CLOSE_CONSUMER BaseCommand_Type = 16
BaseCommand_PRODUCER_SUCCESS BaseCommand_Type = 17
BaseCommand_PING BaseCommand_Type = 18
BaseCommand_PONG BaseCommand_Type = 19
BaseCommand_REDELIVER_UNACKNOWLEDGED_MESSAGES BaseCommand_Type = 20
BaseCommand_PARTITIONED_METADATA BaseCommand_Type = 21
BaseCommand_PARTITIONED_METADATA_RESPONSE BaseCommand_Type = 22
BaseCommand_LOOKUP BaseCommand_Type = 23
BaseCommand_LOOKUP_RESPONSE BaseCommand_Type = 24
BaseCommand_CONSUMER_STATS BaseCommand_Type = 25
BaseCommand_CONSUMER_STATS_RESPONSE BaseCommand_Type = 26
BaseCommand_REACHED_END_OF_TOPIC BaseCommand_Type = 27
)
var BaseCommand_Type_name = map[int32]string{
2: "CONNECT",
3: "CONNECTED",
4: "SUBSCRIBE",
5: "PRODUCER",
6: "SEND",
7: "SEND_RECEIPT",
8: "SEND_ERROR",
9: "MESSAGE",
10: "ACK",
11: "FLOW",
12: "UNSUBSCRIBE",
13: "SUCCESS",
14: "ERROR",
15: "CLOSE_PRODUCER",
16: "CLOSE_CONSUMER",
17: "PRODUCER_SUCCESS",
18: "PING",
19: "PONG",
20: "REDELIVER_UNACKNOWLEDGED_MESSAGES",
21: "PARTITIONED_METADATA",
22: "PARTITIONED_METADATA_RESPONSE",
23: "LOOKUP",
24: "LOOKUP_RESPONSE",
25: "CONSUMER_STATS",
26: "CONSUMER_STATS_RESPONSE",
27: "REACHED_END_OF_TOPIC",
}
var BaseCommand_Type_value = map[string]int32{
"CONNECT": 2,
"CONNECTED": 3,
"SUBSCRIBE": 4,
"PRODUCER": 5,
"SEND": 6,
"SEND_RECEIPT": 7,
"SEND_ERROR": 8,
"MESSAGE": 9,
"ACK": 10,
"FLOW": 11,
"UNSUBSCRIBE": 12,
"SUCCESS": 13,
"ERROR": 14,
"CLOSE_PRODUCER": 15,
"CLOSE_CONSUMER": 16,
"PRODUCER_SUCCESS": 17,
"PING": 18,
"PONG": 19,
"REDELIVER_UNACKNOWLEDGED_MESSAGES": 20,
"PARTITIONED_METADATA": 21,
"PARTITIONED_METADATA_RESPONSE": 22,
"LOOKUP": 23,
"LOOKUP_RESPONSE": 24,
"CONSUMER_STATS": 25,
"CONSUMER_STATS_RESPONSE": 26,
"REACHED_END_OF_TOPIC": 27,
}
func (x BaseCommand_Type) Enum() *BaseCommand_Type {
p := new(BaseCommand_Type)
*p = x
return p
}
func (x BaseCommand_Type) String() string {
return proto.EnumName(BaseCommand_Type_name, int32(x))
}
func (x *BaseCommand_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(BaseCommand_Type_value, data, "BaseCommand_Type")
if err != nil {
return err
}
*x = BaseCommand_Type(value)
return nil
}
func (BaseCommand_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{30, 0} }
type MessageIdData struct {
LedgerId *uint64 `protobuf:"varint,1,req,name=ledgerId" json:"ledgerId,omitempty"`
EntryId *uint64 `protobuf:"varint,2,req,name=entryId" json:"entryId,omitempty"`
Partition *int32 `protobuf:"varint,3,opt,name=partition,def=-1" json:"partition,omitempty"`
BatchIndex *int32 `protobuf:"varint,4,opt,name=batch_index,json=batchIndex,def=-1" json:"batch_index,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MessageIdData) Reset() { *m = MessageIdData{} }
func (m *MessageIdData) String() string { return proto.CompactTextString(m) }
func (*MessageIdData) ProtoMessage() {}
func (*MessageIdData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
const Default_MessageIdData_Partition int32 = -1
const Default_MessageIdData_BatchIndex int32 = -1
func (m *MessageIdData) GetLedgerId() uint64 {
if m != nil && m.LedgerId != nil {
return *m.LedgerId
}
return 0
}
func (m *MessageIdData) GetEntryId() uint64 {
if m != nil && m.EntryId != nil {
return *m.EntryId
}
return 0
}
func (m *MessageIdData) GetPartition() int32 {
if m != nil && m.Partition != nil {
return *m.Partition
}
return Default_MessageIdData_Partition
}
func (m *MessageIdData) GetBatchIndex() int32 {
if m != nil && m.BatchIndex != nil {
return *m.BatchIndex
}
return Default_MessageIdData_BatchIndex
}
type KeyValue struct {
Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *KeyValue) Reset() { *m = KeyValue{} }
func (m *KeyValue) String() string { return proto.CompactTextString(m) }
func (*KeyValue) ProtoMessage() {}
func (*KeyValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *KeyValue) GetKey() string {
if m != nil && m.Key != nil {
return *m.Key
}
return ""
}
func (m *KeyValue) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
type MessageMetadata struct {
ProducerName *string `protobuf:"bytes,1,req,name=producer_name,json=producerName" json:"producer_name,omitempty"`
SequenceId *uint64 `protobuf:"varint,2,req,name=sequence_id,json=sequenceId" json:"sequence_id,omitempty"`
PublishTime *uint64 `protobuf:"varint,3,req,name=publish_time,json=publishTime" json:"publish_time,omitempty"`
Properties []*KeyValue `protobuf:"bytes,4,rep,name=properties" json:"properties,omitempty"`
// Property set on replicated message,
// includes the source cluster name
ReplicatedFrom *string `protobuf:"bytes,5,opt,name=replicated_from,json=replicatedFrom" json:"replicated_from,omitempty"`
// key to decide partition for the msg
PartitionKey *string `protobuf:"bytes,6,opt,name=partition_key,json=partitionKey" json:"partition_key,omitempty"`
// Override namespace's replication
ReplicateTo []string `protobuf:"bytes,7,rep,name=replicate_to,json=replicateTo" json:"replicate_to,omitempty"`
Compression *CompressionType `protobuf:"varint,8,opt,name=compression,enum=pulsar.proto.CompressionType,def=0" json:"compression,omitempty"`
UncompressedSize *uint32 `protobuf:"varint,9,opt,name=uncompressed_size,json=uncompressedSize,def=0" json:"uncompressed_size,omitempty"`
// Removed below checksum field from Metadata as
// it should be part of send-command which keeps checksum of header + payload
// optional sfixed64 checksum = 10;
// differentiate single and batch message metadata
NumMessagesInBatch *int32 `protobuf:"varint,11,opt,name=num_messages_in_batch,json=numMessagesInBatch,def=1" json:"num_messages_in_batch,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MessageMetadata) Reset() { *m = MessageMetadata{} }
func (m *MessageMetadata) String() string { return proto.CompactTextString(m) }
func (*MessageMetadata) ProtoMessage() {}
func (*MessageMetadata) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
const Default_MessageMetadata_Compression CompressionType = CompressionType_NONE
const Default_MessageMetadata_UncompressedSize uint32 = 0
const Default_MessageMetadata_NumMessagesInBatch int32 = 1
func (m *MessageMetadata) GetProducerName() string {
if m != nil && m.ProducerName != nil {
return *m.ProducerName
}
return ""
}
func (m *MessageMetadata) GetSequenceId() uint64 {
if m != nil && m.SequenceId != nil {
return *m.SequenceId
}
return 0
}
func (m *MessageMetadata) GetPublishTime() uint64 {
if m != nil && m.PublishTime != nil {
return *m.PublishTime
}
return 0
}
func (m *MessageMetadata) GetProperties() []*KeyValue {
if m != nil {
return m.Properties
}
return nil
}
func (m *MessageMetadata) GetReplicatedFrom() string {
if m != nil && m.ReplicatedFrom != nil {
return *m.ReplicatedFrom
}
return ""
}
func (m *MessageMetadata) GetPartitionKey() string {
if m != nil && m.PartitionKey != nil {
return *m.PartitionKey
}
return ""
}
func (m *MessageMetadata) GetReplicateTo() []string {
if m != nil {
return m.ReplicateTo
}
return nil
}
func (m *MessageMetadata) GetCompression() CompressionType {
if m != nil && m.Compression != nil {
return *m.Compression
}
return Default_MessageMetadata_Compression
}
func (m *MessageMetadata) GetUncompressedSize() uint32 {
if m != nil && m.UncompressedSize != nil {
return *m.UncompressedSize
}
return Default_MessageMetadata_UncompressedSize
}
func (m *MessageMetadata) GetNumMessagesInBatch() int32 {
if m != nil && m.NumMessagesInBatch != nil {
return *m.NumMessagesInBatch
}
return Default_MessageMetadata_NumMessagesInBatch
}
type SingleMessageMetadata struct {
Properties []*KeyValue `protobuf:"bytes,1,rep,name=properties" json:"properties,omitempty"`
PartitionKey *string `protobuf:"bytes,2,opt,name=partition_key,json=partitionKey" json:"partition_key,omitempty"`
PayloadSize *int32 `protobuf:"varint,3,req,name=payload_size,json=payloadSize" json:"payload_size,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *SingleMessageMetadata) Reset() { *m = SingleMessageMetadata{} }
func (m *SingleMessageMetadata) String() string { return proto.CompactTextString(m) }
func (*SingleMessageMetadata) ProtoMessage() {}
func (*SingleMessageMetadata) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *SingleMessageMetadata) GetProperties() []*KeyValue {
if m != nil {
return m.Properties
}
return nil
}
func (m *SingleMessageMetadata) GetPartitionKey() string {
if m != nil && m.PartitionKey != nil {
return *m.PartitionKey
}
return ""
}
func (m *SingleMessageMetadata) GetPayloadSize() int32 {
if m != nil && m.PayloadSize != nil {
return *m.PayloadSize
}
return 0
}
type CommandConnect struct {
ClientVersion *string `protobuf:"bytes,1,req,name=client_version,json=clientVersion" json:"client_version,omitempty"`
AuthMethod *AuthMethod `protobuf:"varint,2,opt,name=auth_method,json=authMethod,enum=pulsar.proto.AuthMethod" json:"auth_method,omitempty"`
AuthMethodName *string `protobuf:"bytes,5,opt,name=auth_method_name,json=authMethodName" json:"auth_method_name,omitempty"`
AuthData []byte `protobuf:"bytes,3,opt,name=auth_data,json=authData" json:"auth_data,omitempty"`
ProtocolVersion *int32 `protobuf:"varint,4,opt,name=protocol_version,json=protocolVersion,def=0" json:"protocol_version,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CommandConnect) Reset() { *m = CommandConnect{} }
func (m *CommandConnect) String() string { return proto.CompactTextString(m) }
func (*CommandConnect) ProtoMessage() {}
func (*CommandConnect) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
const Default_CommandConnect_ProtocolVersion int32 = 0
func (m *CommandConnect) GetClientVersion() string {
if m != nil && m.ClientVersion != nil {
return *m.ClientVersion
}
return ""
}
func (m *CommandConnect) GetAuthMethod() AuthMethod {
if m != nil && m.AuthMethod != nil {
return *m.AuthMethod
}
return AuthMethod_AuthMethodNone
}
func (m *CommandConnect) GetAuthMethodName() string {
if m != nil && m.AuthMethodName != nil {
return *m.AuthMethodName
}
return ""
}
func (m *CommandConnect) GetAuthData() []byte {
if m != nil {
return m.AuthData
}
return nil
}
func (m *CommandConnect) GetProtocolVersion() int32 {
if m != nil && m.ProtocolVersion != nil {
return *m.ProtocolVersion
}
return Default_CommandConnect_ProtocolVersion
}
type CommandConnected struct {
ServerVersion *string `protobuf:"bytes,1,req,name=server_version,json=serverVersion" json:"server_version,omitempty"`
ProtocolVersion *int32 `protobuf:"varint,2,opt,name=protocol_version,json=protocolVersion,def=0" json:"protocol_version,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CommandConnected) Reset() { *m = CommandConnected{} }
func (m *CommandConnected) String() string { return proto.CompactTextString(m) }
func (*CommandConnected) ProtoMessage() {}
func (*CommandConnected) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
const Default_CommandConnected_ProtocolVersion int32 = 0
func (m *CommandConnected) GetServerVersion() string {
if m != nil && m.ServerVersion != nil {
return *m.ServerVersion
}
return ""
}
func (m *CommandConnected) GetProtocolVersion() int32 {
if m != nil && m.ProtocolVersion != nil {
return *m.ProtocolVersion
}
return Default_CommandConnected_ProtocolVersion
}
type CommandSubscribe struct {
Topic *string `protobuf:"bytes,1,req,name=topic" json:"topic,omitempty"`
Subscription *string `protobuf:"bytes,2,req,name=subscription" json:"subscription,omitempty"`
SubType *CommandSubscribe_SubType `protobuf:"varint,3,req,name=subType,enum=pulsar.proto.CommandSubscribe_SubType" json:"subType,omitempty"`
ConsumerId *uint64 `protobuf:"varint,4,req,name=consumer_id,json=consumerId" json:"consumer_id,omitempty"`
RequestId *uint64 `protobuf:"varint,5,req,name=request_id,json=requestId" json:"request_id,omitempty"`
ConsumerName *string `protobuf:"bytes,6,opt,name=consumer_name,json=consumerName" json:"consumer_name,omitempty"`
PriorityLevel *int32 `protobuf:"varint,7,opt,name=priority_level,json=priorityLevel" json:"priority_level,omitempty"`
// Signal wether the subscription should be backed by a
// durable cursor or not
Durable *bool `protobuf:"varint,8,opt,name=durable,def=1" json:"durable,omitempty"`
// If specified, the subscription will position the cursor
// markd-delete position on the particular message id and
// will send messages from that point
StartMessageId *MessageIdData `protobuf:"bytes,9,opt,name=start_message_id,json=startMessageId" json:"start_message_id,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CommandSubscribe) Reset() { *m = CommandSubscribe{} }
func (m *CommandSubscribe) String() string { return proto.CompactTextString(m) }
func (*CommandSubscribe) ProtoMessage() {}
func (*CommandSubscribe) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
const Default_CommandSubscribe_Durable bool = true
func (m *CommandSubscribe) GetTopic() string {
if m != nil && m.Topic != nil {
return *m.Topic
}
return ""
}
func (m *CommandSubscribe) GetSubscription() string {
if m != nil && m.Subscription != nil {
return *m.Subscription
}
return ""
}
func (m *CommandSubscribe) GetSubType() CommandSubscribe_SubType {
if m != nil && m.SubType != nil {
return *m.SubType
}
return CommandSubscribe_Exclusive
}
func (m *CommandSubscribe) GetConsumerId() uint64 {
if m != nil && m.ConsumerId != nil {
return *m.ConsumerId
}
return 0
}
func (m *CommandSubscribe) GetRequestId() uint64 {
if m != nil && m.RequestId != nil {
return *m.RequestId
}
return 0
}
func (m *CommandSubscribe) GetConsumerName() string {
if m != nil && m.ConsumerName != nil {
return *m.ConsumerName
}
return ""
}
func (m *CommandSubscribe) GetPriorityLevel() int32 {
if m != nil && m.PriorityLevel != nil {
return *m.PriorityLevel
}
return 0
}
func (m *CommandSubscribe) GetDurable() bool {
if m != nil && m.Durable != nil {
return *m.Durable
}
return Default_CommandSubscribe_Durable
}
func (m *CommandSubscribe) GetStartMessageId() *MessageIdData {
if m != nil {
return m.StartMessageId
}
return nil
}
type CommandPartitionedTopicMetadata struct {
Topic *string `protobuf:"bytes,1,req,name=topic" json:"topic,omitempty"`
RequestId *uint64 `protobuf:"varint,2,req,name=request_id,json=requestId" json:"request_id,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CommandPartitionedTopicMetadata) Reset() { *m = CommandPartitionedTopicMetadata{} }
func (m *CommandPartitionedTopicMetadata) String() string { return proto.CompactTextString(m) }
func (*CommandPartitionedTopicMetadata) ProtoMessage() {}
func (*CommandPartitionedTopicMetadata) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *CommandPartitionedTopicMetadata) GetTopic() string {
if m != nil && m.Topic != nil {
return *m.Topic
}
return ""
}
func (m *CommandPartitionedTopicMetadata) GetRequestId() uint64 {
if m != nil && m.RequestId != nil {
return *m.RequestId
}
return 0
}
type CommandPartitionedTopicMetadataResponse struct {
Partitions *uint32 `protobuf:"varint,1,opt,name=partitions" json:"partitions,omitempty"`
RequestId *uint64 `protobuf:"varint,2,req,name=request_id,json=requestId" json:"request_id,omitempty"`
Response *CommandPartitionedTopicMetadataResponse_LookupType `protobuf:"varint,3,opt,name=response,enum=pulsar.proto.CommandPartitionedTopicMetadataResponse_LookupType" json:"response,omitempty"`
Error *ServerError `protobuf:"varint,4,opt,name=error,enum=pulsar.proto.ServerError" json:"error,omitempty"`
Message *string `protobuf:"bytes,5,opt,name=message" json:"message,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CommandPartitionedTopicMetadataResponse) Reset() {
*m = CommandPartitionedTopicMetadataResponse{}
}
func (m *CommandPartitionedTopicMetadataResponse) String() string { return proto.CompactTextString(m) }
func (*CommandPartitionedTopicMetadataResponse) ProtoMessage() {}
func (*CommandPartitionedTopicMetadataResponse) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{8}
}
func (m *CommandPartitionedTopicMetadataResponse) GetPartitions() uint32 {
if m != nil && m.Partitions != nil {
return *m.Partitions
}
return 0
}
func (m *CommandPartitionedTopicMetadataResponse) GetRequestId() uint64 {
if m != nil && m.RequestId != nil {
return *m.RequestId
}
return 0
}
func (m *CommandPartitionedTopicMetadataResponse) GetResponse() CommandPartitionedTopicMetadataResponse_LookupType {
if m != nil && m.Response != nil {
return *m.Response
}
return CommandPartitionedTopicMetadataResponse_Success
}