-
Notifications
You must be signed in to change notification settings - Fork 0
/
mvcc.pb.go
1644 lines (1447 loc) · 54.5 KB
/
mvcc.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
// Copyright JAMF Software, LLC
//
// Regatta MVCC protobuffer specification
//
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.32.0
// protoc v4.25.2
// source: mvcc.proto
package regattapb
import (
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 Command_CommandType int32
const (
Command_PUT Command_CommandType = 0
Command_DELETE Command_CommandType = 1
Command_DUMMY Command_CommandType = 2
Command_PUT_BATCH Command_CommandType = 3
Command_DELETE_BATCH Command_CommandType = 4
Command_TXN Command_CommandType = 5
Command_SEQUENCE Command_CommandType = 6
)
// Enum value maps for Command_CommandType.
var (
Command_CommandType_name = map[int32]string{
0: "PUT",
1: "DELETE",
2: "DUMMY",
3: "PUT_BATCH",
4: "DELETE_BATCH",
5: "TXN",
6: "SEQUENCE",
}
Command_CommandType_value = map[string]int32{
"PUT": 0,
"DELETE": 1,
"DUMMY": 2,
"PUT_BATCH": 3,
"DELETE_BATCH": 4,
"TXN": 5,
"SEQUENCE": 6,
}
)
func (x Command_CommandType) Enum() *Command_CommandType {
p := new(Command_CommandType)
*p = x
return p
}
func (x Command_CommandType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Command_CommandType) Descriptor() protoreflect.EnumDescriptor {
return file_mvcc_proto_enumTypes[0].Descriptor()
}
func (Command_CommandType) Type() protoreflect.EnumType {
return &file_mvcc_proto_enumTypes[0]
}
func (x Command_CommandType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Command_CommandType.Descriptor instead.
func (Command_CommandType) EnumDescriptor() ([]byte, []int) {
return file_mvcc_proto_rawDescGZIP(), []int{0, 0}
}
type Compare_CompareResult int32
const (
Compare_EQUAL Compare_CompareResult = 0
Compare_GREATER Compare_CompareResult = 1
Compare_LESS Compare_CompareResult = 2
Compare_NOT_EQUAL Compare_CompareResult = 3
)
// Enum value maps for Compare_CompareResult.
var (
Compare_CompareResult_name = map[int32]string{
0: "EQUAL",
1: "GREATER",
2: "LESS",
3: "NOT_EQUAL",
}
Compare_CompareResult_value = map[string]int32{
"EQUAL": 0,
"GREATER": 1,
"LESS": 2,
"NOT_EQUAL": 3,
}
)
func (x Compare_CompareResult) Enum() *Compare_CompareResult {
p := new(Compare_CompareResult)
*p = x
return p
}
func (x Compare_CompareResult) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Compare_CompareResult) Descriptor() protoreflect.EnumDescriptor {
return file_mvcc_proto_enumTypes[1].Descriptor()
}
func (Compare_CompareResult) Type() protoreflect.EnumType {
return &file_mvcc_proto_enumTypes[1]
}
func (x Compare_CompareResult) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Compare_CompareResult.Descriptor instead.
func (Compare_CompareResult) EnumDescriptor() ([]byte, []int) {
return file_mvcc_proto_rawDescGZIP(), []int{5, 0}
}
type Compare_CompareTarget int32
const (
Compare_VALUE Compare_CompareTarget = 0
)
// Enum value maps for Compare_CompareTarget.
var (
Compare_CompareTarget_name = map[int32]string{
0: "VALUE",
}
Compare_CompareTarget_value = map[string]int32{
"VALUE": 0,
}
)
func (x Compare_CompareTarget) Enum() *Compare_CompareTarget {
p := new(Compare_CompareTarget)
*p = x
return p
}
func (x Compare_CompareTarget) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Compare_CompareTarget) Descriptor() protoreflect.EnumDescriptor {
return file_mvcc_proto_enumTypes[2].Descriptor()
}
func (Compare_CompareTarget) Type() protoreflect.EnumType {
return &file_mvcc_proto_enumTypes[2]
}
func (x Compare_CompareTarget) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Compare_CompareTarget.Descriptor instead.
func (Compare_CompareTarget) EnumDescriptor() ([]byte, []int) {
return file_mvcc_proto_rawDescGZIP(), []int{5, 1}
}
type Command struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// table name of the table
Table []byte `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`
// type is the kind of event. If type is a PUT, it indicates
// new data has been stored to the key. If type is a DELETE,
// it indicates the key was deleted.
Type Command_CommandType `protobuf:"varint,2,opt,name=type,proto3,enum=mvcc.v1.Command_CommandType" json:"type,omitempty"`
// kv holds the KeyValue for the event.
// A PUT event contains current kv pair.
// A PUT event with kv.Version=1 indicates the creation of a key.
// A DELETE/EXPIRE event contains the deleted key with
// its modification revision set to the revision of deletion.
Kv *KeyValue `protobuf:"bytes,3,opt,name=kv,proto3" json:"kv,omitempty"`
// leader_index holds the value of the log index of a leader cluster from which this command was replicated from.
LeaderIndex *uint64 `protobuf:"varint,5,opt,name=leader_index,json=leaderIndex,proto3,oneof" json:"leader_index,omitempty"`
// batch is an atomic batch of KVs to either PUT or DELETE. (faster, no read, no mix of types, no conditions).
Batch []*KeyValue `protobuf:"bytes,6,rep,name=batch,proto3" json:"batch,omitempty"`
// txn is an atomic transaction (slow, supports reads and conditions).
Txn *Txn `protobuf:"bytes,7,opt,name=txn,proto3,oneof" json:"txn,omitempty"`
// range_end is the key following the last key to affect for the range [kv.key, range_end).
// If range_end is not given, the range is defined to contain only the kv.key argument.
// If range_end is one bit larger than the given kv.key, then the range is all the keys
// with the prefix (the given key).
// If range_end is '\0', the range is all keys greater than or equal to the key argument.
RangeEnd []byte `protobuf:"bytes,8,opt,name=range_end,json=rangeEnd,proto3,oneof" json:"range_end,omitempty"`
// prev_kvs if to fetch previous KVs.
PrevKvs bool `protobuf:"varint,9,opt,name=prev_kvs,json=prevKvs,proto3" json:"prev_kvs,omitempty"`
// sequence is the sequence of commands to be applied as a single FSM step.
Sequence []*Command `protobuf:"bytes,10,rep,name=sequence,proto3" json:"sequence,omitempty"`
// count if to count number of records affected by a command.
Count bool `protobuf:"varint,11,opt,name=count,proto3" json:"count,omitempty"`
}
func (x *Command) Reset() {
*x = Command{}
if protoimpl.UnsafeEnabled {
mi := &file_mvcc_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Command) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Command) ProtoMessage() {}
func (x *Command) ProtoReflect() protoreflect.Message {
mi := &file_mvcc_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 Command.ProtoReflect.Descriptor instead.
func (*Command) Descriptor() ([]byte, []int) {
return file_mvcc_proto_rawDescGZIP(), []int{0}
}
func (x *Command) GetTable() []byte {
if x != nil {
return x.Table
}
return nil
}
func (x *Command) GetType() Command_CommandType {
if x != nil {
return x.Type
}
return Command_PUT
}
func (x *Command) GetKv() *KeyValue {
if x != nil {
return x.Kv
}
return nil
}
func (x *Command) GetLeaderIndex() uint64 {
if x != nil && x.LeaderIndex != nil {
return *x.LeaderIndex
}
return 0
}
func (x *Command) GetBatch() []*KeyValue {
if x != nil {
return x.Batch
}
return nil
}
func (x *Command) GetTxn() *Txn {
if x != nil {
return x.Txn
}
return nil
}
func (x *Command) GetRangeEnd() []byte {
if x != nil {
return x.RangeEnd
}
return nil
}
func (x *Command) GetPrevKvs() bool {
if x != nil {
return x.PrevKvs
}
return false
}
func (x *Command) GetSequence() []*Command {
if x != nil {
return x.Sequence
}
return nil
}
func (x *Command) GetCount() bool {
if x != nil {
return x.Count
}
return false
}
type CommandResult struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// responses are the responses (if any) in order of application.
Responses []*ResponseOp `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
// revision is the key-value store revision when the request was applied.
Revision uint64 `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"`
}
func (x *CommandResult) Reset() {
*x = CommandResult{}
if protoimpl.UnsafeEnabled {
mi := &file_mvcc_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CommandResult) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CommandResult) ProtoMessage() {}
func (x *CommandResult) ProtoReflect() protoreflect.Message {
mi := &file_mvcc_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 CommandResult.ProtoReflect.Descriptor instead.
func (*CommandResult) Descriptor() ([]byte, []int) {
return file_mvcc_proto_rawDescGZIP(), []int{1}
}
func (x *CommandResult) GetResponses() []*ResponseOp {
if x != nil {
return x.Responses
}
return nil
}
func (x *CommandResult) GetRevision() uint64 {
if x != nil {
return x.Revision
}
return 0
}
type Txn struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// compare is a list of predicates representing a conjunction of terms.
// If the comparisons succeed, then the success requests will be processed in order,
// and the response will contain their respective responses in order.
// If the comparisons fail, then the failure requests will be processed in order,
// and the response will contain their respective responses in order.
Compare []*Compare `protobuf:"bytes,1,rep,name=compare,proto3" json:"compare,omitempty"`
// success is a list of requests which will be applied when compare evaluates to true.
Success []*RequestOp `protobuf:"bytes,2,rep,name=success,proto3" json:"success,omitempty"`
// failure is a list of requests which will be applied when compare evaluates to false.
Failure []*RequestOp `protobuf:"bytes,3,rep,name=failure,proto3" json:"failure,omitempty"`
}
func (x *Txn) Reset() {
*x = Txn{}
if protoimpl.UnsafeEnabled {
mi := &file_mvcc_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Txn) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Txn) ProtoMessage() {}
func (x *Txn) ProtoReflect() protoreflect.Message {
mi := &file_mvcc_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 Txn.ProtoReflect.Descriptor instead.
func (*Txn) Descriptor() ([]byte, []int) {
return file_mvcc_proto_rawDescGZIP(), []int{2}
}
func (x *Txn) GetCompare() []*Compare {
if x != nil {
return x.Compare
}
return nil
}
func (x *Txn) GetSuccess() []*RequestOp {
if x != nil {
return x.Success
}
return nil
}
func (x *Txn) GetFailure() []*RequestOp {
if x != nil {
return x.Failure
}
return nil
}
type RequestOp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// request is a union of request types accepted by a transaction.
//
// Types that are assignable to Request:
//
// *RequestOp_RequestRange
// *RequestOp_RequestPut
// *RequestOp_RequestDeleteRange
Request isRequestOp_Request `protobuf_oneof:"request"`
}
func (x *RequestOp) Reset() {
*x = RequestOp{}
if protoimpl.UnsafeEnabled {
mi := &file_mvcc_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestOp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestOp) ProtoMessage() {}
func (x *RequestOp) ProtoReflect() protoreflect.Message {
mi := &file_mvcc_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 RequestOp.ProtoReflect.Descriptor instead.
func (*RequestOp) Descriptor() ([]byte, []int) {
return file_mvcc_proto_rawDescGZIP(), []int{3}
}
func (m *RequestOp) GetRequest() isRequestOp_Request {
if m != nil {
return m.Request
}
return nil
}
func (x *RequestOp) GetRequestRange() *RequestOp_Range {
if x, ok := x.GetRequest().(*RequestOp_RequestRange); ok {
return x.RequestRange
}
return nil
}
func (x *RequestOp) GetRequestPut() *RequestOp_Put {
if x, ok := x.GetRequest().(*RequestOp_RequestPut); ok {
return x.RequestPut
}
return nil
}
func (x *RequestOp) GetRequestDeleteRange() *RequestOp_DeleteRange {
if x, ok := x.GetRequest().(*RequestOp_RequestDeleteRange); ok {
return x.RequestDeleteRange
}
return nil
}
type isRequestOp_Request interface {
isRequestOp_Request()
}
type RequestOp_RequestRange struct {
RequestRange *RequestOp_Range `protobuf:"bytes,1,opt,name=request_range,json=requestRange,proto3,oneof"`
}
type RequestOp_RequestPut struct {
RequestPut *RequestOp_Put `protobuf:"bytes,2,opt,name=request_put,json=requestPut,proto3,oneof"`
}
type RequestOp_RequestDeleteRange struct {
RequestDeleteRange *RequestOp_DeleteRange `protobuf:"bytes,3,opt,name=request_delete_range,json=requestDeleteRange,proto3,oneof"`
}
func (*RequestOp_RequestRange) isRequestOp_Request() {}
func (*RequestOp_RequestPut) isRequestOp_Request() {}
func (*RequestOp_RequestDeleteRange) isRequestOp_Request() {}
type ResponseOp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// response is a union of response types returned by a transaction.
//
// Types that are assignable to Response:
//
// *ResponseOp_ResponseRange
// *ResponseOp_ResponsePut
// *ResponseOp_ResponseDeleteRange
Response isResponseOp_Response `protobuf_oneof:"response"`
}
func (x *ResponseOp) Reset() {
*x = ResponseOp{}
if protoimpl.UnsafeEnabled {
mi := &file_mvcc_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResponseOp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResponseOp) ProtoMessage() {}
func (x *ResponseOp) ProtoReflect() protoreflect.Message {
mi := &file_mvcc_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 ResponseOp.ProtoReflect.Descriptor instead.
func (*ResponseOp) Descriptor() ([]byte, []int) {
return file_mvcc_proto_rawDescGZIP(), []int{4}
}
func (m *ResponseOp) GetResponse() isResponseOp_Response {
if m != nil {
return m.Response
}
return nil
}
func (x *ResponseOp) GetResponseRange() *ResponseOp_Range {
if x, ok := x.GetResponse().(*ResponseOp_ResponseRange); ok {
return x.ResponseRange
}
return nil
}
func (x *ResponseOp) GetResponsePut() *ResponseOp_Put {
if x, ok := x.GetResponse().(*ResponseOp_ResponsePut); ok {
return x.ResponsePut
}
return nil
}
func (x *ResponseOp) GetResponseDeleteRange() *ResponseOp_DeleteRange {
if x, ok := x.GetResponse().(*ResponseOp_ResponseDeleteRange); ok {
return x.ResponseDeleteRange
}
return nil
}
type isResponseOp_Response interface {
isResponseOp_Response()
}
type ResponseOp_ResponseRange struct {
ResponseRange *ResponseOp_Range `protobuf:"bytes,1,opt,name=response_range,json=responseRange,proto3,oneof"`
}
type ResponseOp_ResponsePut struct {
ResponsePut *ResponseOp_Put `protobuf:"bytes,2,opt,name=response_put,json=responsePut,proto3,oneof"`
}
type ResponseOp_ResponseDeleteRange struct {
ResponseDeleteRange *ResponseOp_DeleteRange `protobuf:"bytes,3,opt,name=response_delete_range,json=responseDeleteRange,proto3,oneof"`
}
func (*ResponseOp_ResponseRange) isResponseOp_Response() {}
func (*ResponseOp_ResponsePut) isResponseOp_Response() {}
func (*ResponseOp_ResponseDeleteRange) isResponseOp_Response() {}
// Compare property `target` for every KV from DB in [key, range_end) with target_union using the operation `result`. e.g. `DB[key].target result target_union.target`,
// that means that for asymmetric operations LESS and GREATER the target property of the key from the DB is the left-hand side of the comparison.
// Examples:
// * `DB[key][value] EQUAL target_union.value`
// * `DB[key][value] GREATER target_union.value`
// * `DB[key...range_end][value] GREATER target_union.value`
// * `DB[key][value] LESS target_union.value`
type Compare struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// result is logical comparison operation for this comparison.
Result Compare_CompareResult `protobuf:"varint,1,opt,name=result,proto3,enum=mvcc.v1.Compare_CompareResult" json:"result,omitempty"`
// target is the key-value field to inspect for the comparison.
Target Compare_CompareTarget `protobuf:"varint,2,opt,name=target,proto3,enum=mvcc.v1.Compare_CompareTarget" json:"target,omitempty"`
// key is the subject key for the comparison operation.
Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
// Types that are assignable to TargetUnion:
//
// *Compare_Value
TargetUnion isCompare_TargetUnion `protobuf_oneof:"target_union"`
// range_end compares the given target to all keys in the range [key, range_end).
// See RangeRequest for more details on key ranges.
RangeEnd []byte `protobuf:"bytes,64,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"` // TODO: fill out with most of the rest of RangeRequest fields when needed.
}
func (x *Compare) Reset() {
*x = Compare{}
if protoimpl.UnsafeEnabled {
mi := &file_mvcc_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Compare) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Compare) ProtoMessage() {}
func (x *Compare) ProtoReflect() protoreflect.Message {
mi := &file_mvcc_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 Compare.ProtoReflect.Descriptor instead.
func (*Compare) Descriptor() ([]byte, []int) {
return file_mvcc_proto_rawDescGZIP(), []int{5}
}
func (x *Compare) GetResult() Compare_CompareResult {
if x != nil {
return x.Result
}
return Compare_EQUAL
}
func (x *Compare) GetTarget() Compare_CompareTarget {
if x != nil {
return x.Target
}
return Compare_VALUE
}
func (x *Compare) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (m *Compare) GetTargetUnion() isCompare_TargetUnion {
if m != nil {
return m.TargetUnion
}
return nil
}
func (x *Compare) GetValue() []byte {
if x, ok := x.GetTargetUnion().(*Compare_Value); ok {
return x.Value
}
return nil
}
func (x *Compare) GetRangeEnd() []byte {
if x != nil {
return x.RangeEnd
}
return nil
}
type isCompare_TargetUnion interface {
isCompare_TargetUnion()
}
type Compare_Value struct {
// value is the value of the given key, in bytes.
Value []byte `protobuf:"bytes,4,opt,name=value,proto3,oneof"`
}
func (*Compare_Value) isCompare_TargetUnion() {}
type KeyValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key is the key in bytes. An empty key is not allowed.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// create_revision is the revision of last creation on this key.
CreateRevision int64 `protobuf:"varint,2,opt,name=create_revision,json=createRevision,proto3" json:"create_revision,omitempty"`
// mod_revision is the revision of last modification on this key.
ModRevision int64 `protobuf:"varint,3,opt,name=mod_revision,json=modRevision,proto3" json:"mod_revision,omitempty"`
// value is the value held by the key, in bytes.
Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *KeyValue) Reset() {
*x = KeyValue{}
if protoimpl.UnsafeEnabled {
mi := &file_mvcc_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KeyValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KeyValue) ProtoMessage() {}
func (x *KeyValue) ProtoReflect() protoreflect.Message {
mi := &file_mvcc_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 KeyValue.ProtoReflect.Descriptor instead.
func (*KeyValue) Descriptor() ([]byte, []int) {
return file_mvcc_proto_rawDescGZIP(), []int{6}
}
func (x *KeyValue) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (x *KeyValue) GetCreateRevision() int64 {
if x != nil {
return x.CreateRevision
}
return 0
}
func (x *KeyValue) GetModRevision() int64 {
if x != nil {
return x.ModRevision
}
return 0
}
func (x *KeyValue) GetValue() []byte {
if x != nil {
return x.Value
}
return nil
}
type RequestOp_Range struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key is the first key for the range. If range_end is not given, the request only looks up key.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// range_end is the upper bound on the requested range [key, range_end).
// If range_end is '\0', the range is all keys >= key.
// If range_end is key plus one (e.g., "aa"+1 == "ab", "a\xff"+1 == "b"),
// then the range request gets all keys prefixed with key.
// If both key and range_end are '\0', then the range request returns all keys.
RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
// limit is a limit on the number of keys returned for the request. When limit is set to 0,
// it is treated as no limit.
Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
// keys_only when set returns only the keys and not the values.
KeysOnly bool `protobuf:"varint,4,opt,name=keys_only,json=keysOnly,proto3" json:"keys_only,omitempty"`
// count_only when set returns only the count of the keys in the range.
CountOnly bool `protobuf:"varint,5,opt,name=count_only,json=countOnly,proto3" json:"count_only,omitempty"`
}
func (x *RequestOp_Range) Reset() {
*x = RequestOp_Range{}
if protoimpl.UnsafeEnabled {
mi := &file_mvcc_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestOp_Range) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestOp_Range) ProtoMessage() {}
func (x *RequestOp_Range) ProtoReflect() protoreflect.Message {
mi := &file_mvcc_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 RequestOp_Range.ProtoReflect.Descriptor instead.
func (*RequestOp_Range) Descriptor() ([]byte, []int) {
return file_mvcc_proto_rawDescGZIP(), []int{3, 0}
}
func (x *RequestOp_Range) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (x *RequestOp_Range) GetRangeEnd() []byte {
if x != nil {
return x.RangeEnd
}
return nil
}
func (x *RequestOp_Range) GetLimit() int64 {
if x != nil {
return x.Limit
}
return 0
}
func (x *RequestOp_Range) GetKeysOnly() bool {
if x != nil {
return x.KeysOnly
}
return false
}
func (x *RequestOp_Range) GetCountOnly() bool {
if x != nil {
return x.CountOnly
}
return false
}
type RequestOp_Put struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key is the key, in bytes, to put into the key-value store.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value is the value, in bytes, to associate with the key in the key-value store.
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// prev_kv if true the previous key-value pair will be returned in the put response.
PrevKv bool `protobuf:"varint,3,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"`
}
func (x *RequestOp_Put) Reset() {
*x = RequestOp_Put{}
if protoimpl.UnsafeEnabled {
mi := &file_mvcc_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestOp_Put) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestOp_Put) ProtoMessage() {}
func (x *RequestOp_Put) ProtoReflect() protoreflect.Message {
mi := &file_mvcc_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 RequestOp_Put.ProtoReflect.Descriptor instead.
func (*RequestOp_Put) Descriptor() ([]byte, []int) {
return file_mvcc_proto_rawDescGZIP(), []int{3, 1}
}
func (x *RequestOp_Put) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (x *RequestOp_Put) GetValue() []byte {
if x != nil {
return x.Value
}
return nil
}
func (x *RequestOp_Put) GetPrevKv() bool {
if x != nil {
return x.PrevKv
}
return false
}
type RequestOp_DeleteRange struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key is the first key to delete in the range.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// range_end is the key following the last key to delete for the range [key, range_end).
// If range_end is not given, the range is defined to contain only the key argument.
// If range_end is one bit larger than the given key, then the range is all the keys
// with the prefix (the given key).
// If range_end is '\0', the range is all keys greater than or equal to the key argument.
RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
// If prev_kv is set, regatta gets the previous key-value pairs before deleting it.