/
rpc.pb.go
2598 lines (2346 loc) · 78.3 KB
/
rpc.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-gogo. DO NOT EDIT.
// source: api/v2rpc/rpc.proto
package v2rpc
import (
context "context"
fmt "fmt"
_ "github.com/gogo/googleapis/google/api"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
golang_proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = golang_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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type RangeFilter_Hash int32
const (
RangeFilter_MD5 RangeFilter_Hash = 0
RangeFilter_SHA1 RangeFilter_Hash = 1
)
var RangeFilter_Hash_name = map[int32]string{
0: "MD5",
1: "SHA1",
}
var RangeFilter_Hash_value = map[string]int32{
"MD5": 0,
"SHA1": 1,
}
func (x RangeFilter_Hash) String() string {
return proto.EnumName(RangeFilter_Hash_name, int32(x))
}
func (RangeFilter_Hash) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{4, 0}
}
type Event_EventType int32
const (
Event_CREATE Event_EventType = 0
Event_PUT Event_EventType = 1
Event_DELETE Event_EventType = 2
)
var Event_EventType_name = map[int32]string{
0: "CREATE",
1: "PUT",
2: "DELETE",
}
var Event_EventType_value = map[string]int32{
"CREATE": 0,
"PUT": 1,
"DELETE": 2,
}
func (x Event_EventType) String() string {
return proto.EnumName(Event_EventType_name, int32(x))
}
func (Event_EventType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{12, 0}
}
type ResponseHeader struct {
// revision is tso which increases monotonically.
Revision uint64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ResponseHeader) Reset() { *m = ResponseHeader{} }
func (m *ResponseHeader) String() string { return proto.CompactTextString(m) }
func (*ResponseHeader) ProtoMessage() {}
func (*ResponseHeader) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{0}
}
func (m *ResponseHeader) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResponseHeader.Unmarshal(m, b)
}
func (m *ResponseHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ResponseHeader.Marshal(b, m, deterministic)
}
func (m *ResponseHeader) XXX_Merge(src proto.Message) {
xxx_messageInfo_ResponseHeader.Merge(m, src)
}
func (m *ResponseHeader) XXX_Size() int {
return xxx_messageInfo_ResponseHeader.Size(m)
}
func (m *ResponseHeader) XXX_DiscardUnknown() {
xxx_messageInfo_ResponseHeader.DiscardUnknown(m)
}
var xxx_messageInfo_ResponseHeader proto.InternalMessageInfo
func (m *ResponseHeader) GetRevision() uint64 {
if m != nil {
return m.Revision
}
return 0
}
func (*ResponseHeader) XXX_MessageName() string {
return "ResponseHeader"
}
type KeyValue struct {
// key is the identifier in bytes. An empty key is not allowed.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// revision is the revision of latest modification on this key.
Revision uint64 `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"`
// value is the value held by the key, in bytes.
Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `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 fileDescriptor_4fd62e805becb3ae, []int{1}
}
func (m *KeyValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KeyValue.Unmarshal(m, b)
}
func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic)
}
func (m *KeyValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_KeyValue.Merge(m, src)
}
func (m *KeyValue) XXX_Size() int {
return xxx_messageInfo_KeyValue.Size(m)
}
func (m *KeyValue) XXX_DiscardUnknown() {
xxx_messageInfo_KeyValue.DiscardUnknown(m)
}
var xxx_messageInfo_KeyValue proto.InternalMessageInfo
func (m *KeyValue) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *KeyValue) GetRevision() uint64 {
if m != nil {
return m.Revision
}
return 0
}
func (m *KeyValue) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
func (*KeyValue) XXX_MessageName() string {
return "KeyValue"
}
type GetRequest struct {
// key is the identifier in bytes. An empty key is not allowed.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// revision is the point-in-time of the key-value store to use for the get.
// If revision is less or equal to zero, the range is over the newest key-value store.
// If the revision has been compacted, ErrCompacted is returned as a response.
Revision uint64 `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetRequest) Reset() { *m = GetRequest{} }
func (m *GetRequest) String() string { return proto.CompactTextString(m) }
func (*GetRequest) ProtoMessage() {}
func (*GetRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{2}
}
func (m *GetRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetRequest.Unmarshal(m, b)
}
func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic)
}
func (m *GetRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetRequest.Merge(m, src)
}
func (m *GetRequest) XXX_Size() int {
return xxx_messageInfo_GetRequest.Size(m)
}
func (m *GetRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetRequest proto.InternalMessageInfo
func (m *GetRequest) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *GetRequest) GetRevision() uint64 {
if m != nil {
return m.Revision
}
return 0
}
func (*GetRequest) XXX_MessageName() string {
return "GetRequest"
}
type GetResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// kv is the key-value pair by the get request.
Kv *KeyValue `protobuf:"bytes,2,opt,name=kv,proto3" json:"kv,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetResponse) Reset() { *m = GetResponse{} }
func (m *GetResponse) String() string { return proto.CompactTextString(m) }
func (*GetResponse) ProtoMessage() {}
func (*GetResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{3}
}
func (m *GetResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetResponse.Unmarshal(m, b)
}
func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic)
}
func (m *GetResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetResponse.Merge(m, src)
}
func (m *GetResponse) XXX_Size() int {
return xxx_messageInfo_GetResponse.Size(m)
}
func (m *GetResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetResponse proto.InternalMessageInfo
func (m *GetResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *GetResponse) GetKv() *KeyValue {
if m != nil {
return m.Kv
}
return nil
}
func (*GetResponse) XXX_MessageName() string {
return "GetResponse"
}
type RangeFilter struct {
// hash(key) % shard_num = shard_index
Hash RangeFilter_Hash `protobuf:"varint,1,opt,name=hash,proto3,enum=RangeFilter_Hash" json:"hash,omitempty"`
// trim prefix before hash
TrimPrefix []byte `protobuf:"bytes,2,opt,name=trim_prefix,json=trimPrefix,proto3" json:"trim_prefix,omitempty"`
// total shard number
ShardCount int64 `protobuf:"varint,3,opt,name=shard_count,json=shardCount,proto3" json:"shard_count,omitempty"`
// shard id to filter
ShardIndex int64 `protobuf:"varint,4,opt,name=shard_index,json=shardIndex,proto3" json:"shard_index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RangeFilter) Reset() { *m = RangeFilter{} }
func (m *RangeFilter) String() string { return proto.CompactTextString(m) }
func (*RangeFilter) ProtoMessage() {}
func (*RangeFilter) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{4}
}
func (m *RangeFilter) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RangeFilter.Unmarshal(m, b)
}
func (m *RangeFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RangeFilter.Marshal(b, m, deterministic)
}
func (m *RangeFilter) XXX_Merge(src proto.Message) {
xxx_messageInfo_RangeFilter.Merge(m, src)
}
func (m *RangeFilter) XXX_Size() int {
return xxx_messageInfo_RangeFilter.Size(m)
}
func (m *RangeFilter) XXX_DiscardUnknown() {
xxx_messageInfo_RangeFilter.DiscardUnknown(m)
}
var xxx_messageInfo_RangeFilter proto.InternalMessageInfo
func (m *RangeFilter) GetHash() RangeFilter_Hash {
if m != nil {
return m.Hash
}
return RangeFilter_MD5
}
func (m *RangeFilter) GetTrimPrefix() []byte {
if m != nil {
return m.TrimPrefix
}
return nil
}
func (m *RangeFilter) GetShardCount() int64 {
if m != nil {
return m.ShardCount
}
return 0
}
func (m *RangeFilter) GetShardIndex() int64 {
if m != nil {
return m.ShardIndex
}
return 0
}
func (*RangeFilter) XXX_MessageName() string {
return "RangeFilter"
}
type RangeRequest struct {
// key is the first key for the range.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// end is the upper bound on the requested range [key, end).
End []byte `protobuf:"bytes,2,opt,name=end,proto3" json:"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"`
// revision is the point-in-time of the key-value store to use for the range.
// If revision is less or equal to zero, the range is over the newest key-value store.
// If the revision has been compacted, ErrCompacted is returned as a response.
Revision uint64 `protobuf:"varint,4,opt,name=revision,proto3" json:"revision,omitempty"`
// filter when range, only key satisfying filter condition will be returned
Filter *RangeFilter `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RangeRequest) Reset() { *m = RangeRequest{} }
func (m *RangeRequest) String() string { return proto.CompactTextString(m) }
func (*RangeRequest) ProtoMessage() {}
func (*RangeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{5}
}
func (m *RangeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RangeRequest.Unmarshal(m, b)
}
func (m *RangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RangeRequest.Marshal(b, m, deterministic)
}
func (m *RangeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_RangeRequest.Merge(m, src)
}
func (m *RangeRequest) XXX_Size() int {
return xxx_messageInfo_RangeRequest.Size(m)
}
func (m *RangeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_RangeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_RangeRequest proto.InternalMessageInfo
func (m *RangeRequest) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *RangeRequest) GetEnd() []byte {
if m != nil {
return m.End
}
return nil
}
func (m *RangeRequest) GetLimit() int64 {
if m != nil {
return m.Limit
}
return 0
}
func (m *RangeRequest) GetRevision() uint64 {
if m != nil {
return m.Revision
}
return 0
}
func (m *RangeRequest) GetFilter() *RangeFilter {
if m != nil {
return m.Filter
}
return nil
}
func (*RangeRequest) XXX_MessageName() string {
return "RangeRequest"
}
type RangeResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// kvs is the list of key-value pairs matched by the range request.
Kvs []*KeyValue `protobuf:"bytes,2,rep,name=kvs,proto3" json:"kvs,omitempty"`
// more indicates if there are more keys to return in the requested range.
More bool `protobuf:"varint,3,opt,name=more,proto3" json:"more,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RangeResponse) Reset() { *m = RangeResponse{} }
func (m *RangeResponse) String() string { return proto.CompactTextString(m) }
func (*RangeResponse) ProtoMessage() {}
func (*RangeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{6}
}
func (m *RangeResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RangeResponse.Unmarshal(m, b)
}
func (m *RangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RangeResponse.Marshal(b, m, deterministic)
}
func (m *RangeResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_RangeResponse.Merge(m, src)
}
func (m *RangeResponse) XXX_Size() int {
return xxx_messageInfo_RangeResponse.Size(m)
}
func (m *RangeResponse) XXX_DiscardUnknown() {
xxx_messageInfo_RangeResponse.DiscardUnknown(m)
}
var xxx_messageInfo_RangeResponse proto.InternalMessageInfo
func (m *RangeResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *RangeResponse) GetKvs() []*KeyValue {
if m != nil {
return m.Kvs
}
return nil
}
func (m *RangeResponse) GetMore() bool {
if m != nil {
return m.More
}
return false
}
func (*RangeResponse) XXX_MessageName() string {
return "RangeResponse"
}
type StreamRangeResponse struct {
RangeResponse *RangeResponse `protobuf:"bytes,1,opt,name=range_response,json=rangeResponse,proto3" json:"range_response,omitempty"`
Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StreamRangeResponse) Reset() { *m = StreamRangeResponse{} }
func (m *StreamRangeResponse) String() string { return proto.CompactTextString(m) }
func (*StreamRangeResponse) ProtoMessage() {}
func (*StreamRangeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{7}
}
func (m *StreamRangeResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StreamRangeResponse.Unmarshal(m, b)
}
func (m *StreamRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StreamRangeResponse.Marshal(b, m, deterministic)
}
func (m *StreamRangeResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_StreamRangeResponse.Merge(m, src)
}
func (m *StreamRangeResponse) XXX_Size() int {
return xxx_messageInfo_StreamRangeResponse.Size(m)
}
func (m *StreamRangeResponse) XXX_DiscardUnknown() {
xxx_messageInfo_StreamRangeResponse.DiscardUnknown(m)
}
var xxx_messageInfo_StreamRangeResponse proto.InternalMessageInfo
func (m *StreamRangeResponse) GetRangeResponse() *RangeResponse {
if m != nil {
return m.RangeResponse
}
return nil
}
func (m *StreamRangeResponse) GetErr() string {
if m != nil {
return m.Err
}
return ""
}
func (*StreamRangeResponse) XXX_MessageName() string {
return "StreamRangeResponse"
}
type CountRequest struct {
// key is the first key for the count.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// end is the upper bound on the requested count [key, end).
End []byte `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
// filter when count, only keys which satisfy filter condition requirement will be counted
Filter *RangeFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CountRequest) Reset() { *m = CountRequest{} }
func (m *CountRequest) String() string { return proto.CompactTextString(m) }
func (*CountRequest) ProtoMessage() {}
func (*CountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{8}
}
func (m *CountRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CountRequest.Unmarshal(m, b)
}
func (m *CountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CountRequest.Marshal(b, m, deterministic)
}
func (m *CountRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CountRequest.Merge(m, src)
}
func (m *CountRequest) XXX_Size() int {
return xxx_messageInfo_CountRequest.Size(m)
}
func (m *CountRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CountRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CountRequest proto.InternalMessageInfo
func (m *CountRequest) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *CountRequest) GetEnd() []byte {
if m != nil {
return m.End
}
return nil
}
func (m *CountRequest) GetFilter() *RangeFilter {
if m != nil {
return m.Filter
}
return nil
}
func (*CountRequest) XXX_MessageName() string {
return "CountRequest"
}
type CountResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// count is set to the number of keys within the range when requested.
Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CountResponse) Reset() { *m = CountResponse{} }
func (m *CountResponse) String() string { return proto.CompactTextString(m) }
func (*CountResponse) ProtoMessage() {}
func (*CountResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{9}
}
func (m *CountResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CountResponse.Unmarshal(m, b)
}
func (m *CountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CountResponse.Marshal(b, m, deterministic)
}
func (m *CountResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CountResponse.Merge(m, src)
}
func (m *CountResponse) XXX_Size() int {
return xxx_messageInfo_CountResponse.Size(m)
}
func (m *CountResponse) XXX_DiscardUnknown() {
xxx_messageInfo_CountResponse.DiscardUnknown(m)
}
var xxx_messageInfo_CountResponse proto.InternalMessageInfo
func (m *CountResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *CountResponse) GetCount() uint64 {
if m != nil {
return m.Count
}
return 0
}
func (*CountResponse) XXX_MessageName() string {
return "CountResponse"
}
type ListPartitionRequest struct {
// key is the first key for partition list.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// end is the upper bound on the requested partition list [key, end).
End []byte `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListPartitionRequest) Reset() { *m = ListPartitionRequest{} }
func (m *ListPartitionRequest) String() string { return proto.CompactTextString(m) }
func (*ListPartitionRequest) ProtoMessage() {}
func (*ListPartitionRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{10}
}
func (m *ListPartitionRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListPartitionRequest.Unmarshal(m, b)
}
func (m *ListPartitionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListPartitionRequest.Marshal(b, m, deterministic)
}
func (m *ListPartitionRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListPartitionRequest.Merge(m, src)
}
func (m *ListPartitionRequest) XXX_Size() int {
return xxx_messageInfo_ListPartitionRequest.Size(m)
}
func (m *ListPartitionRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListPartitionRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListPartitionRequest proto.InternalMessageInfo
func (m *ListPartitionRequest) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *ListPartitionRequest) GetEnd() []byte {
if m != nil {
return m.End
}
return nil
}
func (*ListPartitionRequest) XXX_MessageName() string {
return "ListPartitionRequest"
}
type ListPartitionResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// partition_num is the number of partitions .
PartitionNum int64 `protobuf:"varint,2,opt,name=partition_num,json=partitionNum,proto3" json:"partition_num,omitempty"`
// partition_keys, format is [ key, partition_split keys ..., end ]
PartitionKeys [][]byte `protobuf:"bytes,3,rep,name=partition_keys,json=partitionKeys,proto3" json:"partition_keys,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListPartitionResponse) Reset() { *m = ListPartitionResponse{} }
func (m *ListPartitionResponse) String() string { return proto.CompactTextString(m) }
func (*ListPartitionResponse) ProtoMessage() {}
func (*ListPartitionResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{11}
}
func (m *ListPartitionResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListPartitionResponse.Unmarshal(m, b)
}
func (m *ListPartitionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListPartitionResponse.Marshal(b, m, deterministic)
}
func (m *ListPartitionResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListPartitionResponse.Merge(m, src)
}
func (m *ListPartitionResponse) XXX_Size() int {
return xxx_messageInfo_ListPartitionResponse.Size(m)
}
func (m *ListPartitionResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListPartitionResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListPartitionResponse proto.InternalMessageInfo
func (m *ListPartitionResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *ListPartitionResponse) GetPartitionNum() int64 {
if m != nil {
return m.PartitionNum
}
return 0
}
func (m *ListPartitionResponse) GetPartitionKeys() [][]byte {
if m != nil {
return m.PartitionKeys
}
return nil
}
func (*ListPartitionResponse) XXX_MessageName() string {
return "ListPartitionResponse"
}
type Event struct {
// type is the kind of event. If type is a CREATE or PUT, it indicates
// new data has been stored to the key. If type is a DELETE,
// it indicates the key was deleted.
Type Event_EventType `protobuf:"varint,1,opt,name=type,proto3,enum=Event_EventType" json:"type,omitempty"`
// kv holds the KeyValue for the event.
// A CREATE event indicates the creation of a key.
// A PUT event contains current kv pair.
// A DELETE/EXPIRE event contains the deleted key with
// its modification revision set to the revision of deletion.
Kv *KeyValue `protobuf:"bytes,2,opt,name=kv,proto3" json:"kv,omitempty"`
// revision is tso which increases monotonically.
Revision uint64 `protobuf:"varint,3,opt,name=revision,proto3" json:"revision,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Event) Reset() { *m = Event{} }
func (m *Event) String() string { return proto.CompactTextString(m) }
func (*Event) ProtoMessage() {}
func (*Event) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{12}
}
func (m *Event) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Event.Unmarshal(m, b)
}
func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Event.Marshal(b, m, deterministic)
}
func (m *Event) XXX_Merge(src proto.Message) {
xxx_messageInfo_Event.Merge(m, src)
}
func (m *Event) XXX_Size() int {
return xxx_messageInfo_Event.Size(m)
}
func (m *Event) XXX_DiscardUnknown() {
xxx_messageInfo_Event.DiscardUnknown(m)
}
var xxx_messageInfo_Event proto.InternalMessageInfo
func (m *Event) GetType() Event_EventType {
if m != nil {
return m.Type
}
return Event_CREATE
}
func (m *Event) GetKv() *KeyValue {
if m != nil {
return m.Kv
}
return nil
}
func (m *Event) GetRevision() uint64 {
if m != nil {
return m.Revision
}
return 0
}
func (*Event) XXX_MessageName() string {
return "Event"
}
type WatchRequest struct {
// key is the first key for the range.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// end is the upper bound on the requested range [key, end).
End []byte `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
// revision is an optional revision to watch from (inclusive). No start_revision is "now".
Revision uint64 `protobuf:"varint,4,opt,name=revision,proto3" json:"revision,omitempty"`
// filter when watch, only events which satisfy filter condition requirement will be send to subscriber
Filter *RangeFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WatchRequest) Reset() { *m = WatchRequest{} }
func (m *WatchRequest) String() string { return proto.CompactTextString(m) }
func (*WatchRequest) ProtoMessage() {}
func (*WatchRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{13}
}
func (m *WatchRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WatchRequest.Unmarshal(m, b)
}
func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WatchRequest.Marshal(b, m, deterministic)
}
func (m *WatchRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_WatchRequest.Merge(m, src)
}
func (m *WatchRequest) XXX_Size() int {
return xxx_messageInfo_WatchRequest.Size(m)
}
func (m *WatchRequest) XXX_DiscardUnknown() {
xxx_messageInfo_WatchRequest.DiscardUnknown(m)
}
var xxx_messageInfo_WatchRequest proto.InternalMessageInfo
func (m *WatchRequest) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *WatchRequest) GetEnd() []byte {
if m != nil {
return m.End
}
return nil
}
func (m *WatchRequest) GetRevision() uint64 {
if m != nil {
return m.Revision
}
return 0
}
func (m *WatchRequest) GetFilter() *RangeFilter {
if m != nil {
return m.Filter
}
return nil
}
func (*WatchRequest) XXX_MessageName() string {
return "WatchRequest"
}
type WatchResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// events is the list of events matched by the watch request.
Events []*Event `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"`
// err indicates internal err occurs.
Err string `protobuf:"bytes,5,opt,name=err,proto3" json:"err,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WatchResponse) Reset() { *m = WatchResponse{} }
func (m *WatchResponse) String() string { return proto.CompactTextString(m) }
func (*WatchResponse) ProtoMessage() {}
func (*WatchResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{14}
}
func (m *WatchResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WatchResponse.Unmarshal(m, b)
}
func (m *WatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WatchResponse.Marshal(b, m, deterministic)
}
func (m *WatchResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_WatchResponse.Merge(m, src)
}
func (m *WatchResponse) XXX_Size() int {
return xxx_messageInfo_WatchResponse.Size(m)
}
func (m *WatchResponse) XXX_DiscardUnknown() {
xxx_messageInfo_WatchResponse.DiscardUnknown(m)
}
var xxx_messageInfo_WatchResponse proto.InternalMessageInfo
func (m *WatchResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *WatchResponse) GetEvents() []*Event {
if m != nil {
return m.Events
}
return nil
}
func (m *WatchResponse) GetErr() string {
if m != nil {
return m.Err
}
return ""
}
func (*WatchResponse) XXX_MessageName() string {
return "WatchResponse"
}
type CreateRequest struct {
// key is the subject key for the comparison operation.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value is the value of the given key, in bytes.
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// lease is the lease ttl seconds of the given key.
Lease int64 `protobuf:"varint,3,opt,name=lease,proto3" json:"lease,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateRequest) Reset() { *m = CreateRequest{} }
func (m *CreateRequest) String() string { return proto.CompactTextString(m) }
func (*CreateRequest) ProtoMessage() {}
func (*CreateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4fd62e805becb3ae, []int{15}
}
func (m *CreateRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateRequest.Unmarshal(m, b)
}
func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateRequest.Marshal(b, m, deterministic)
}