-
Notifications
You must be signed in to change notification settings - Fork 1
/
deckard_service.pb.go
2151 lines (1927 loc) · 80.1 KB
/
deckard_service.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.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.12.4
// source: deckard_service.proto
package deckard
import (
any1 "github.com/golang/protobuf/ptypes/any"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetByIdRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of the queue to get a message
Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"`
// The message id
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetByIdRequest) Reset() {
*x = GetByIdRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetByIdRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetByIdRequest) ProtoMessage() {}
func (x *GetByIdRequest) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetByIdRequest.ProtoReflect.Descriptor instead.
func (*GetByIdRequest) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{0}
}
func (x *GetByIdRequest) GetQueue() string {
if x != nil {
return x.Queue
}
return ""
}
func (x *GetByIdRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type GetByIdResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// A human readable string data map of the message's payload.
//
// This represents the payload map as a JSON string representation, useful for debugging and diagnostics
HumanReadablePayload map[string]string `protobuf:"bytes,3,rep,name=human_readable_payload,json=humanReadablePayload,proto3" json:"human_readable_payload,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"`
}
func (x *GetByIdResponse) Reset() {
*x = GetByIdResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetByIdResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetByIdResponse) ProtoMessage() {}
func (x *GetByIdResponse) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetByIdResponse.ProtoReflect.Descriptor instead.
func (*GetByIdResponse) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{1}
}
func (x *GetByIdResponse) GetMessage() *Message {
if x != nil {
return x.Message
}
return nil
}
func (x *GetByIdResponse) GetHumanReadablePayload() map[string]string {
if x != nil {
return x.HumanReadablePayload
}
return nil
}
func (x *GetByIdResponse) GetFound() bool {
if x != nil {
return x.Found
}
return false
}
type RemoveRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
// Name of the queue to remove message
// Provide the name of the application as a prefix using colon as the separator. Example: <application_name>:<queue_name>
Queue string `protobuf:"bytes,2,opt,name=queue,proto3" json:"queue,omitempty"`
}
func (x *RemoveRequest) Reset() {
*x = RemoveRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RemoveRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RemoveRequest) ProtoMessage() {}
func (x *RemoveRequest) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RemoveRequest.ProtoReflect.Descriptor instead.
func (*RemoveRequest) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{2}
}
func (x *RemoveRequest) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
func (x *RemoveRequest) GetQueue() string {
if x != nil {
return x.Queue
}
return ""
}
type RemoveResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CacheRemoved int64 `protobuf:"varint,1,opt,name=cacheRemoved,proto3" json:"cacheRemoved,omitempty"`
StorageRemoved int64 `protobuf:"varint,2,opt,name=storageRemoved,proto3" json:"storageRemoved,omitempty"`
}
func (x *RemoveResponse) Reset() {
*x = RemoveResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RemoveResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RemoveResponse) ProtoMessage() {}
func (x *RemoveResponse) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RemoveResponse.ProtoReflect.Descriptor instead.
func (*RemoveResponse) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{3}
}
func (x *RemoveResponse) GetCacheRemoved() int64 {
if x != nil {
return x.CacheRemoved
}
return 0
}
func (x *RemoveResponse) GetStorageRemoved() int64 {
if x != nil {
return x.StorageRemoved
}
return 0
}
type PullRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Full name of the queue to pull messages (including any prefixes)
Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"`
// Number of messages to fetch.
// Caution: as greater the amount, as more time it will take to process the request.
// Max value is 1000 and the default value is 1
Amount int32 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
// Prefer using the max_score field instead of this one.
// This field is deprecated and will be removed in the future.
//
// The `score_filter` behaves differently than `max_score` field.
// The `max_score` field is the upper threshold itself, but the `score_filter` will result in an upper score threshold of the current timestamp minus the score_filter value.
//
// Useful only when your queue's score is only based on the current timestamp to not return a message just moments after it was last used.
// It will only return messages with score lower than the current timestamp minus the score_filter value.
//
// For example if your queue's score is only based on the current timestamp, this parameter will be the number of milliseconds a message must be in the queue before being returned.
//
// Deprecated: Marked as deprecated in deckard_service.proto.
ScoreFilter int64 `protobuf:"varint,3,opt,name=score_filter,json=scoreFilter,proto3" json:"score_filter,omitempty"`
// Sets the upper threshold for the priority score of a message to be returned in the pull request.
//
// Only messages with a priority score equal to or lower than the max_score value will be returned.
//
// The maximum score accepted by Deckard is 9007199254740992, any value higher than this will be capped to the maximum score.
// To set this value to the minimum score accepted by Deckard, use any negative number.
// This parameter will be ignored if set to 0 (default value).
MaxScore float64 `protobuf:"fixed64,4,opt,name=max_score,json=maxScore,proto3" json:"max_score,omitempty"`
// Sets the lower threshold for the priority score required for a message to be returned.
// Only messages with a priority score equal to or higher than the min_score value will be returned.
// The minimum score accepted by Deckard is 0 which is also the default value
MinScore float64 `protobuf:"fixed64,5,opt,name=min_score,json=minScore,proto3" json:"min_score,omitempty"`
// Sets the amount of time in milliseconds a message will wait be available for processing before being returned to the queue if not ACKed.
// The default value is 300000 (5 minutes).
AckDeadlineMs int64 `protobuf:"varint,6,opt,name=ack_deadline_ms,json=ackDeadlineMs,proto3" json:"ack_deadline_ms,omitempty"`
}
func (x *PullRequest) Reset() {
*x = PullRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PullRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PullRequest) ProtoMessage() {}
func (x *PullRequest) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PullRequest.ProtoReflect.Descriptor instead.
func (*PullRequest) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{4}
}
func (x *PullRequest) GetQueue() string {
if x != nil {
return x.Queue
}
return ""
}
func (x *PullRequest) GetAmount() int32 {
if x != nil {
return x.Amount
}
return 0
}
// Deprecated: Marked as deprecated in deckard_service.proto.
func (x *PullRequest) GetScoreFilter() int64 {
if x != nil {
return x.ScoreFilter
}
return 0
}
func (x *PullRequest) GetMaxScore() float64 {
if x != nil {
return x.MaxScore
}
return 0
}
func (x *PullRequest) GetMinScore() float64 {
if x != nil {
return x.MinScore
}
return 0
}
func (x *PullRequest) GetAckDeadlineMs() int64 {
if x != nil {
return x.AckDeadlineMs
}
return 0
}
type PullResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// List of returned messages
Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
}
func (x *PullResponse) Reset() {
*x = PullResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PullResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PullResponse) ProtoMessage() {}
func (x *PullResponse) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PullResponse.ProtoReflect.Descriptor instead.
func (*PullResponse) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{5}
}
func (x *PullResponse) GetMessages() []*Message {
if x != nil {
return x.Messages
}
return nil
}
type Message struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// ID is an unique identifier inside a queue.
// Any message with the same id and queue will be considered the same message.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Description of the message, this should be used as a human readable string to be used in diagnostics.
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
// Full name of the queue this message belongs (including any prefixes)
Queue string `protobuf:"bytes,3,opt,name=queue,proto3" json:"queue,omitempty"`
// A payload map with formatted data to be stored and used by clients.
Payload map[string]*any1.Any `protobuf:"bytes,8,rep,name=payload,proto3" json:"payload,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Metadata is a map of string to be used as a key-value store.
// It is a simple way to store data that is not part of the message payload.
Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose.
// This field can be used to store simple string data instead of using the payload field.
StringPayload string `protobuf:"bytes,5,opt,name=string_payload,json=stringPayload,proto3" json:"string_payload,omitempty"`
// Score represents the priority score the message currently have in the queue.
// The lower the score, the higher the priority.
// The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0
Score float64 `protobuf:"fixed64,6,opt,name=score,proto3" json:"score,omitempty"`
// Breakpoint is a field to be used as an auxiliar field for some specific use cases.
// For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system.
//
// Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id.
// Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited.
Breakpoint string `protobuf:"bytes,7,opt,name=breakpoint,proto3" json:"breakpoint,omitempty"`
// Diagnostics is a field holding information about the message's usage.
// It is useful to track how many times a message was ACKed or NACKed.
Diagnostics *MessageDiagnostics `protobuf:"bytes,9,opt,name=diagnostics,proto3" json:"diagnostics,omitempty"`
}
func (x *Message) Reset() {
*x = Message{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Message) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Message) ProtoMessage() {}
func (x *Message) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{6}
}
func (x *Message) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Message) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Message) GetQueue() string {
if x != nil {
return x.Queue
}
return ""
}
func (x *Message) GetPayload() map[string]*any1.Any {
if x != nil {
return x.Payload
}
return nil
}
func (x *Message) GetMetadata() map[string]string {
if x != nil {
return x.Metadata
}
return nil
}
func (x *Message) GetStringPayload() string {
if x != nil {
return x.StringPayload
}
return ""
}
func (x *Message) GetScore() float64 {
if x != nil {
return x.Score
}
return 0
}
func (x *Message) GetBreakpoint() string {
if x != nil {
return x.Breakpoint
}
return ""
}
func (x *Message) GetDiagnostics() *MessageDiagnostics {
if x != nil {
return x.Diagnostics
}
return nil
}
type MessageDiagnostics struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Track total number of ACKs
Acks int64 `protobuf:"varint,1,opt,name=acks,proto3" json:"acks,omitempty"`
// Track total number of NACKs
Nacks int64 `protobuf:"varint,2,opt,name=nacks,proto3" json:"nacks,omitempty"`
// Track number of consecutive ACKs
// This field will reset to 0 when a NACK is received
ConsecutiveAcks int64 `protobuf:"varint,3,opt,name=consecutive_acks,json=consecutiveAcks,proto3" json:"consecutive_acks,omitempty"`
// Track number of consecutive NACKs
// This field will reset to 0 when an ACK is received
ConsecutiveNacks int64 `protobuf:"varint,4,opt,name=consecutive_nacks,json=consecutiveNacks,proto3" json:"consecutive_nacks,omitempty"`
}
func (x *MessageDiagnostics) Reset() {
*x = MessageDiagnostics{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageDiagnostics) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageDiagnostics) ProtoMessage() {}
func (x *MessageDiagnostics) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageDiagnostics.ProtoReflect.Descriptor instead.
func (*MessageDiagnostics) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{7}
}
func (x *MessageDiagnostics) GetAcks() int64 {
if x != nil {
return x.Acks
}
return 0
}
func (x *MessageDiagnostics) GetNacks() int64 {
if x != nil {
return x.Nacks
}
return 0
}
func (x *MessageDiagnostics) GetConsecutiveAcks() int64 {
if x != nil {
return x.ConsecutiveAcks
}
return 0
}
func (x *MessageDiagnostics) GetConsecutiveNacks() int64 {
if x != nil {
return x.ConsecutiveNacks
}
return 0
}
type CountRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"`
}
func (x *CountRequest) Reset() {
*x = CountRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CountRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CountRequest) ProtoMessage() {}
func (x *CountRequest) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CountRequest.ProtoReflect.Descriptor instead.
func (*CountRequest) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{8}
}
func (x *CountRequest) GetQueue() string {
if x != nil {
return x.Queue
}
return ""
}
type CountResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
}
func (x *CountResponse) Reset() {
*x = CountResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CountResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CountResponse) ProtoMessage() {}
func (x *CountResponse) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CountResponse.ProtoReflect.Descriptor instead.
func (*CountResponse) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{9}
}
func (x *CountResponse) GetCount() int64 {
if x != nil {
return x.Count
}
return 0
}
type AddRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// List of messages to be added
Messages []*AddMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
}
func (x *AddRequest) Reset() {
*x = AddRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddRequest) ProtoMessage() {}
func (x *AddRequest) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
func (*AddRequest) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{10}
}
func (x *AddRequest) GetMessages() []*AddMessage {
if x != nil {
return x.Messages
}
return nil
}
type AddMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Unique id of this message
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// A payload map with formatted data to be stored and used by clients.
Payload map[string]*any1.Any `protobuf:"bytes,10,rep,name=payload,proto3" json:"payload,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Non-formatted string payload.
// This field can be used to store simple string data instead of using the payload field.
StringPayload string `protobuf:"bytes,3,opt,name=string_payload,json=stringPayload,proto3" json:"string_payload,omitempty"`
// Metadata is a map of string to be used as a key-value store.
// It is a simple way to store data that is not part of the message payload.
Metadata map[string]string `protobuf:"bytes,11,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Name of the queue to add this message
//
// Suggestion: to better observability, provide the name of the application using colon as the separator. Example: <application_name>:<queue_name>
//
// You may also add a queue prefix to the queue name using two colons as the separator. Example: <application_name>:<queue_prefix>::<queue_name>
Queue string `protobuf:"bytes,4,opt,name=queue,proto3" json:"queue,omitempty"`
// Indicate this message will never expire and will only be deleted from the queue if explicitly removed.
Timeless bool `protobuf:"varint,6,opt,name=timeless,proto3" json:"timeless,omitempty"`
// TTL is the amount of time in minutes this message will live in the queue.
// TTL is not a exact time, the message may live a little longer than the specified TTL.
TtlMinutes int64 `protobuf:"varint,7,opt,name=ttl_minutes,json=ttlMinutes,proto3" json:"ttl_minutes,omitempty"`
// Description of the message, this should be used as a human readable string to be used in diagnostics.
Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"`
// Score represents the priority score the message currently have in the queue.
// The score is used to determine the order of the messages returned in a pull request.
// The lower the score, the higher the priority.
//
// If the score is not set (or set to 0), the score will be set with the current timestamp in milliseconds at the moment of the message creation.
//
// The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0
// Negative scores will be converted to 0, adding the message with the lowest score (and highest priority)
Score float64 `protobuf:"fixed64,12,opt,name=score,proto3" json:"score,omitempty"`
}
func (x *AddMessage) Reset() {
*x = AddMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddMessage) ProtoMessage() {}
func (x *AddMessage) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddMessage.ProtoReflect.Descriptor instead.
func (*AddMessage) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{11}
}
func (x *AddMessage) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *AddMessage) GetPayload() map[string]*any1.Any {
if x != nil {
return x.Payload
}
return nil
}
func (x *AddMessage) GetStringPayload() string {
if x != nil {
return x.StringPayload
}
return ""
}
func (x *AddMessage) GetMetadata() map[string]string {
if x != nil {
return x.Metadata
}
return nil
}
func (x *AddMessage) GetQueue() string {
if x != nil {
return x.Queue
}
return ""
}
func (x *AddMessage) GetTimeless() bool {
if x != nil {
return x.Timeless
}
return false
}
func (x *AddMessage) GetTtlMinutes() int64 {
if x != nil {
return x.TtlMinutes
}
return 0
}
func (x *AddMessage) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *AddMessage) GetScore() float64 {
if x != nil {
return x.Score
}
return 0
}
type AddResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Number of created messages
CreatedCount int64 `protobuf:"varint,1,opt,name=created_count,json=createdCount,proto3" json:"created_count,omitempty"`
// Number of updated messages
UpdatedCount int64 `protobuf:"varint,2,opt,name=updated_count,json=updatedCount,proto3" json:"updated_count,omitempty"`
}
func (x *AddResponse) Reset() {
*x = AddResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddResponse) ProtoMessage() {}
func (x *AddResponse) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddResponse.ProtoReflect.Descriptor instead.
func (*AddResponse) Descriptor() ([]byte, []int) {
return file_deckard_service_proto_rawDescGZIP(), []int{12}
}
func (x *AddResponse) GetCreatedCount() int64 {
if x != nil {
return x.CreatedCount
}
return 0
}
func (x *AddResponse) GetUpdatedCount() int64 {
if x != nil {
return x.UpdatedCount
}
return 0
}
type EditQueueRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of the queue to be updated
// This includes all prefixes and suffixes
Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"`
// Configuration to apply to the queue. It will always update the queue with the newer configuration.
// Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it.
// If you want to change a configuration to its default value, manually set it to its default value following each field documentation.
Configuration *QueueConfiguration `protobuf:"bytes,2,opt,name=configuration,proto3" json:"configuration,omitempty"`
}
func (x *EditQueueRequest) Reset() {
*x = EditQueueRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_deckard_service_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EditQueueRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EditQueueRequest) ProtoMessage() {}
func (x *EditQueueRequest) ProtoReflect() protoreflect.Message {
mi := &file_deckard_service_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}