-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
topodata.pb.go
6945 lines (6682 loc) · 172 KB
/
topodata.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: topodata.proto
package topodata
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
proto "github.com/golang/protobuf/proto"
vttime "vitess.io/vitess/go/vt/proto/vttime"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// KeyspaceType describes the type of the keyspace
type KeyspaceType int32
const (
// NORMAL is the default value
KeyspaceType_NORMAL KeyspaceType = 0
// SNAPSHOT is when we are creating a snapshot keyspace
KeyspaceType_SNAPSHOT KeyspaceType = 1
)
var KeyspaceType_name = map[int32]string{
0: "NORMAL",
1: "SNAPSHOT",
}
var KeyspaceType_value = map[string]int32{
"NORMAL": 0,
"SNAPSHOT": 1,
}
func (x KeyspaceType) String() string {
return proto.EnumName(KeyspaceType_name, int32(x))
}
func (KeyspaceType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{0}
}
// KeyspaceIdType describes the type of the sharding key for a
// range-based sharded keyspace.
type KeyspaceIdType int32
const (
// UNSET is the default value, when range-based sharding is not used.
KeyspaceIdType_UNSET KeyspaceIdType = 0
// UINT64 is when uint64 value is used.
// This is represented as 'unsigned bigint' in mysql
KeyspaceIdType_UINT64 KeyspaceIdType = 1
// BYTES is when an array of bytes is used.
// This is represented as 'varbinary' in mysql
KeyspaceIdType_BYTES KeyspaceIdType = 2
)
var KeyspaceIdType_name = map[int32]string{
0: "UNSET",
1: "UINT64",
2: "BYTES",
}
var KeyspaceIdType_value = map[string]int32{
"UNSET": 0,
"UINT64": 1,
"BYTES": 2,
}
func (x KeyspaceIdType) String() string {
return proto.EnumName(KeyspaceIdType_name, int32(x))
}
func (KeyspaceIdType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{1}
}
// TabletType represents the type of a given tablet.
type TabletType int32
const (
// UNKNOWN is not a valid value.
TabletType_UNKNOWN TabletType = 0
// MASTER is the master server for the shard. Only MASTER allows DMLs.
TabletType_MASTER TabletType = 1
// REPLICA replicates from master. It is used to serve live traffic.
// A REPLICA can be promoted to MASTER. A demoted MASTER will go to REPLICA.
TabletType_REPLICA TabletType = 2
// RDONLY (old name) / BATCH (new name) is used to serve traffic for
// long-running jobs. It is a separate type from REPLICA so
// long-running queries don't affect web-like traffic.
TabletType_RDONLY TabletType = 3
TabletType_BATCH TabletType = 3
// SPARE is a type of servers that cannot serve queries, but is available
// in case an extra server is needed.
TabletType_SPARE TabletType = 4
// EXPERIMENTAL is like SPARE, except it can serve queries. This
// type can be used for usages not planned by Vitess, like online
// export to another storage engine.
TabletType_EXPERIMENTAL TabletType = 5
// BACKUP is the type a server goes to when taking a backup. No queries
// can be served in BACKUP mode.
TabletType_BACKUP TabletType = 6
// RESTORE is the type a server uses when restoring a backup, at
// startup time. No queries can be served in RESTORE mode.
TabletType_RESTORE TabletType = 7
// DRAINED is the type a server goes into when used by Vitess tools
// to perform an offline action. It is a serving type (as
// the tools processes may need to run queries), but it's not used
// to route queries from Vitess users. In this state,
// this tablet is dedicated to the process that uses it.
TabletType_DRAINED TabletType = 8
)
var TabletType_name = map[int32]string{
0: "UNKNOWN",
1: "MASTER",
2: "REPLICA",
3: "RDONLY",
// Duplicate value: 3: "BATCH",
4: "SPARE",
5: "EXPERIMENTAL",
6: "BACKUP",
7: "RESTORE",
8: "DRAINED",
}
var TabletType_value = map[string]int32{
"UNKNOWN": 0,
"MASTER": 1,
"REPLICA": 2,
"RDONLY": 3,
"BATCH": 3,
"SPARE": 4,
"EXPERIMENTAL": 5,
"BACKUP": 6,
"RESTORE": 7,
"DRAINED": 8,
}
func (x TabletType) String() string {
return proto.EnumName(TabletType_name, int32(x))
}
func (TabletType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{2}
}
// KeyRange describes a range of sharding keys, when range-based
// sharding is used.
type KeyRange struct {
Start []byte `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
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 *KeyRange) Reset() { *m = KeyRange{} }
func (m *KeyRange) String() string { return proto.CompactTextString(m) }
func (*KeyRange) ProtoMessage() {}
func (*KeyRange) Descriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{0}
}
func (m *KeyRange) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *KeyRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_KeyRange.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *KeyRange) XXX_Merge(src proto.Message) {
xxx_messageInfo_KeyRange.Merge(m, src)
}
func (m *KeyRange) XXX_Size() int {
return m.Size()
}
func (m *KeyRange) XXX_DiscardUnknown() {
xxx_messageInfo_KeyRange.DiscardUnknown(m)
}
var xxx_messageInfo_KeyRange proto.InternalMessageInfo
func (m *KeyRange) GetStart() []byte {
if m != nil {
return m.Start
}
return nil
}
func (m *KeyRange) GetEnd() []byte {
if m != nil {
return m.End
}
return nil
}
// TabletAlias is a globally unique tablet identifier.
type TabletAlias struct {
// cell is the cell (or datacenter) the tablet is in
Cell string `protobuf:"bytes,1,opt,name=cell,proto3" json:"cell,omitempty"`
// uid is a unique id for this tablet within the shard
// (this is the MySQL server id as well).
Uid uint32 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TabletAlias) Reset() { *m = TabletAlias{} }
func (m *TabletAlias) String() string { return proto.CompactTextString(m) }
func (*TabletAlias) ProtoMessage() {}
func (*TabletAlias) Descriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{1}
}
func (m *TabletAlias) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *TabletAlias) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_TabletAlias.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *TabletAlias) XXX_Merge(src proto.Message) {
xxx_messageInfo_TabletAlias.Merge(m, src)
}
func (m *TabletAlias) XXX_Size() int {
return m.Size()
}
func (m *TabletAlias) XXX_DiscardUnknown() {
xxx_messageInfo_TabletAlias.DiscardUnknown(m)
}
var xxx_messageInfo_TabletAlias proto.InternalMessageInfo
func (m *TabletAlias) GetCell() string {
if m != nil {
return m.Cell
}
return ""
}
func (m *TabletAlias) GetUid() uint32 {
if m != nil {
return m.Uid
}
return 0
}
// Tablet represents information about a running instance of vttablet.
type Tablet struct {
// alias is the unique name of the tablet.
Alias *TabletAlias `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
// Fully qualified domain name of the host.
Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
// Map of named ports. Normally this should include vt and grpc.
// Going forward, the mysql port will be stored in mysql_port
// instead of here.
// For accessing mysql port, use topoproto.MysqlPort to fetch, and
// topoproto.SetMysqlPort to set. These wrappers will ensure
// legacy behavior is supported.
PortMap map[string]int32 `protobuf:"bytes,4,rep,name=port_map,json=portMap,proto3" json:"port_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
// Keyspace name.
Keyspace string `protobuf:"bytes,5,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
// Shard name. If range based sharding is used, it should match
// key_range.
Shard string `protobuf:"bytes,6,opt,name=shard,proto3" json:"shard,omitempty"`
// If range based sharding is used, range for the tablet's shard.
KeyRange *KeyRange `protobuf:"bytes,7,opt,name=key_range,json=keyRange,proto3" json:"key_range,omitempty"`
// type is the current type of the tablet.
Type TabletType `protobuf:"varint,8,opt,name=type,proto3,enum=topodata.TabletType" json:"type,omitempty"`
// It this is set, it is used as the database name instead of the
// normal "vt_" + keyspace.
DbNameOverride string `protobuf:"bytes,9,opt,name=db_name_override,json=dbNameOverride,proto3" json:"db_name_override,omitempty"`
// tablet tags
Tags map[string]string `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// MySQL hostname.
MysqlHostname string `protobuf:"bytes,12,opt,name=mysql_hostname,json=mysqlHostname,proto3" json:"mysql_hostname,omitempty"`
// MySQL port. Use topoproto.MysqlPort and topoproto.SetMysqlPort
// to access this variable. The functions provide support
// for legacy behavior.
MysqlPort int32 `protobuf:"varint,13,opt,name=mysql_port,json=mysqlPort,proto3" json:"mysql_port,omitempty"`
// master_term_start_time is the time (in UTC) at which the current term of
// the current tablet began as master. If this tablet is not currently the
// master, this value is ignored.
//
// A new master term begins any time an authoritative decision is communicated
// about which tablet should be the master, such as via Vitess
// replication-management commands like PlannedReparentShard,
// EmergencyReparentShard, and TabletExternallyReparented.
//
MasterTermStartTime *vttime.Time `protobuf:"bytes,14,opt,name=master_term_start_time,json=masterTermStartTime,proto3" json:"master_term_start_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Tablet) Reset() { *m = Tablet{} }
func (m *Tablet) String() string { return proto.CompactTextString(m) }
func (*Tablet) ProtoMessage() {}
func (*Tablet) Descriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{2}
}
func (m *Tablet) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Tablet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Tablet.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Tablet) XXX_Merge(src proto.Message) {
xxx_messageInfo_Tablet.Merge(m, src)
}
func (m *Tablet) XXX_Size() int {
return m.Size()
}
func (m *Tablet) XXX_DiscardUnknown() {
xxx_messageInfo_Tablet.DiscardUnknown(m)
}
var xxx_messageInfo_Tablet proto.InternalMessageInfo
func (m *Tablet) GetAlias() *TabletAlias {
if m != nil {
return m.Alias
}
return nil
}
func (m *Tablet) GetHostname() string {
if m != nil {
return m.Hostname
}
return ""
}
func (m *Tablet) GetPortMap() map[string]int32 {
if m != nil {
return m.PortMap
}
return nil
}
func (m *Tablet) GetKeyspace() string {
if m != nil {
return m.Keyspace
}
return ""
}
func (m *Tablet) GetShard() string {
if m != nil {
return m.Shard
}
return ""
}
func (m *Tablet) GetKeyRange() *KeyRange {
if m != nil {
return m.KeyRange
}
return nil
}
func (m *Tablet) GetType() TabletType {
if m != nil {
return m.Type
}
return TabletType_UNKNOWN
}
func (m *Tablet) GetDbNameOverride() string {
if m != nil {
return m.DbNameOverride
}
return ""
}
func (m *Tablet) GetTags() map[string]string {
if m != nil {
return m.Tags
}
return nil
}
func (m *Tablet) GetMysqlHostname() string {
if m != nil {
return m.MysqlHostname
}
return ""
}
func (m *Tablet) GetMysqlPort() int32 {
if m != nil {
return m.MysqlPort
}
return 0
}
func (m *Tablet) GetMasterTermStartTime() *vttime.Time {
if m != nil {
return m.MasterTermStartTime
}
return nil
}
// A Shard contains data about a subset of the data whithin a keyspace.
type Shard struct {
// master_alias is the tablet alias of the master for the shard.
// If it is unset, then there is no master in this shard yet.
// No lock is necessary to update this field, when for instance
// TabletExternallyReparented updates this. However, we lock the
// shard for reparenting operations (InitShardMaster,
// PlannedReparentShard,EmergencyReparentShard), to guarantee
// exclusive operation.
MasterAlias *TabletAlias `protobuf:"bytes,1,opt,name=master_alias,json=masterAlias,proto3" json:"master_alias,omitempty"`
// master_term_start_time is the time (in UTC) at which the current term of
// the master specified in master_alias began.
//
// A new master term begins any time an authoritative decision is communicated
// about which tablet should be the master, such as via Vitess
// replication-management commands like PlannedReparentShard,
// EmergencyReparentShard, and TabletExternallyReparented.
//
// The master_alias should only ever be changed if the new master's term began
// at a later time than this. Note that a new term can start for the tablet
// that is already the master. In that case, the master_term_start_time would
// be increased without changing the master_alias.
MasterTermStartTime *vttime.Time `protobuf:"bytes,8,opt,name=master_term_start_time,json=masterTermStartTime,proto3" json:"master_term_start_time,omitempty"`
// key_range is the KeyRange for this shard. It can be unset if:
// - we are not using range-based sharding in this shard.
// - the shard covers the entire keyrange.
// This must match the shard name based on our other conventions, but
// helpful to have it decomposed here.
// Once set at creation time, it is never changed.
KeyRange *KeyRange `protobuf:"bytes,2,opt,name=key_range,json=keyRange,proto3" json:"key_range,omitempty"`
// served_types has at most one entry per TabletType
// This field is in the process of being deprecated in favor of
// is_master_serving. Keeping for backwards compatibility purposes.
ServedTypes []*Shard_ServedType `protobuf:"bytes,3,rep,name=served_types,json=servedTypes,proto3" json:"served_types,omitempty"`
// SourceShards is the list of shards we're replicating from,
// using filtered replication.
// The keyspace lock is always taken when changing this.
SourceShards []*Shard_SourceShard `protobuf:"bytes,4,rep,name=source_shards,json=sourceShards,proto3" json:"source_shards,omitempty"`
// tablet_controls has at most one entry per TabletType.
// The keyspace lock is always taken when changing this.
TabletControls []*Shard_TabletControl `protobuf:"bytes,6,rep,name=tablet_controls,json=tabletControls,proto3" json:"tablet_controls,omitempty"`
// is_master_serving sets whether this shard master is serving traffic or not.
// The keyspace lock is always taken when changing this.
IsMasterServing bool `protobuf:"varint,7,opt,name=is_master_serving,json=isMasterServing,proto3" json:"is_master_serving,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Shard) Reset() { *m = Shard{} }
func (m *Shard) String() string { return proto.CompactTextString(m) }
func (*Shard) ProtoMessage() {}
func (*Shard) Descriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{3}
}
func (m *Shard) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Shard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Shard.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Shard) XXX_Merge(src proto.Message) {
xxx_messageInfo_Shard.Merge(m, src)
}
func (m *Shard) XXX_Size() int {
return m.Size()
}
func (m *Shard) XXX_DiscardUnknown() {
xxx_messageInfo_Shard.DiscardUnknown(m)
}
var xxx_messageInfo_Shard proto.InternalMessageInfo
func (m *Shard) GetMasterAlias() *TabletAlias {
if m != nil {
return m.MasterAlias
}
return nil
}
func (m *Shard) GetMasterTermStartTime() *vttime.Time {
if m != nil {
return m.MasterTermStartTime
}
return nil
}
func (m *Shard) GetKeyRange() *KeyRange {
if m != nil {
return m.KeyRange
}
return nil
}
func (m *Shard) GetServedTypes() []*Shard_ServedType {
if m != nil {
return m.ServedTypes
}
return nil
}
func (m *Shard) GetSourceShards() []*Shard_SourceShard {
if m != nil {
return m.SourceShards
}
return nil
}
func (m *Shard) GetTabletControls() []*Shard_TabletControl {
if m != nil {
return m.TabletControls
}
return nil
}
func (m *Shard) GetIsMasterServing() bool {
if m != nil {
return m.IsMasterServing
}
return false
}
// ServedType is an entry in the served_types
type Shard_ServedType struct {
TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Shard_ServedType) Reset() { *m = Shard_ServedType{} }
func (m *Shard_ServedType) String() string { return proto.CompactTextString(m) }
func (*Shard_ServedType) ProtoMessage() {}
func (*Shard_ServedType) Descriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{3, 0}
}
func (m *Shard_ServedType) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Shard_ServedType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Shard_ServedType.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Shard_ServedType) XXX_Merge(src proto.Message) {
xxx_messageInfo_Shard_ServedType.Merge(m, src)
}
func (m *Shard_ServedType) XXX_Size() int {
return m.Size()
}
func (m *Shard_ServedType) XXX_DiscardUnknown() {
xxx_messageInfo_Shard_ServedType.DiscardUnknown(m)
}
var xxx_messageInfo_Shard_ServedType proto.InternalMessageInfo
func (m *Shard_ServedType) GetTabletType() TabletType {
if m != nil {
return m.TabletType
}
return TabletType_UNKNOWN
}
func (m *Shard_ServedType) GetCells() []string {
if m != nil {
return m.Cells
}
return nil
}
// SourceShard represents a data source for filtered replication
// across shards. When this is used in a destination shard, the master
// of that shard will run filtered replication.
type Shard_SourceShard struct {
// Uid is the unique ID for this SourceShard object.
Uid uint32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
// the source keyspace
Keyspace string `protobuf:"bytes,2,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
// the source shard
Shard string `protobuf:"bytes,3,opt,name=shard,proto3" json:"shard,omitempty"`
// the source shard keyrange
KeyRange *KeyRange `protobuf:"bytes,4,opt,name=key_range,json=keyRange,proto3" json:"key_range,omitempty"`
// the source table list to replicate
Tables []string `protobuf:"bytes,5,rep,name=tables,proto3" json:"tables,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Shard_SourceShard) Reset() { *m = Shard_SourceShard{} }
func (m *Shard_SourceShard) String() string { return proto.CompactTextString(m) }
func (*Shard_SourceShard) ProtoMessage() {}
func (*Shard_SourceShard) Descriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{3, 1}
}
func (m *Shard_SourceShard) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Shard_SourceShard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Shard_SourceShard.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Shard_SourceShard) XXX_Merge(src proto.Message) {
xxx_messageInfo_Shard_SourceShard.Merge(m, src)
}
func (m *Shard_SourceShard) XXX_Size() int {
return m.Size()
}
func (m *Shard_SourceShard) XXX_DiscardUnknown() {
xxx_messageInfo_Shard_SourceShard.DiscardUnknown(m)
}
var xxx_messageInfo_Shard_SourceShard proto.InternalMessageInfo
func (m *Shard_SourceShard) GetUid() uint32 {
if m != nil {
return m.Uid
}
return 0
}
func (m *Shard_SourceShard) GetKeyspace() string {
if m != nil {
return m.Keyspace
}
return ""
}
func (m *Shard_SourceShard) GetShard() string {
if m != nil {
return m.Shard
}
return ""
}
func (m *Shard_SourceShard) GetKeyRange() *KeyRange {
if m != nil {
return m.KeyRange
}
return nil
}
func (m *Shard_SourceShard) GetTables() []string {
if m != nil {
return m.Tables
}
return nil
}
// TabletControl controls tablet's behavior
type Shard_TabletControl struct {
// which tablet type is affected
TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
BlacklistedTables []string `protobuf:"bytes,4,rep,name=blacklisted_tables,json=blacklistedTables,proto3" json:"blacklisted_tables,omitempty"`
// frozen is set if we've started failing over traffic for
// the master. If set, this record should not be removed.
Frozen bool `protobuf:"varint,5,opt,name=frozen,proto3" json:"frozen,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Shard_TabletControl) Reset() { *m = Shard_TabletControl{} }
func (m *Shard_TabletControl) String() string { return proto.CompactTextString(m) }
func (*Shard_TabletControl) ProtoMessage() {}
func (*Shard_TabletControl) Descriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{3, 2}
}
func (m *Shard_TabletControl) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Shard_TabletControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Shard_TabletControl.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Shard_TabletControl) XXX_Merge(src proto.Message) {
xxx_messageInfo_Shard_TabletControl.Merge(m, src)
}
func (m *Shard_TabletControl) XXX_Size() int {
return m.Size()
}
func (m *Shard_TabletControl) XXX_DiscardUnknown() {
xxx_messageInfo_Shard_TabletControl.DiscardUnknown(m)
}
var xxx_messageInfo_Shard_TabletControl proto.InternalMessageInfo
func (m *Shard_TabletControl) GetTabletType() TabletType {
if m != nil {
return m.TabletType
}
return TabletType_UNKNOWN
}
func (m *Shard_TabletControl) GetCells() []string {
if m != nil {
return m.Cells
}
return nil
}
func (m *Shard_TabletControl) GetBlacklistedTables() []string {
if m != nil {
return m.BlacklistedTables
}
return nil
}
func (m *Shard_TabletControl) GetFrozen() bool {
if m != nil {
return m.Frozen
}
return false
}
// A Keyspace contains data about a keyspace.
type Keyspace struct {
// name of the column used for sharding
// empty if the keyspace is not sharded
ShardingColumnName string `protobuf:"bytes,1,opt,name=sharding_column_name,json=shardingColumnName,proto3" json:"sharding_column_name,omitempty"`
// type of the column used for sharding
// UNSET if the keyspace is not sharded
ShardingColumnType KeyspaceIdType `protobuf:"varint,2,opt,name=sharding_column_type,json=shardingColumnType,proto3,enum=topodata.KeyspaceIdType" json:"sharding_column_type,omitempty"`
// ServedFrom will redirect the appropriate traffic to
// another keyspace.
ServedFroms []*Keyspace_ServedFrom `protobuf:"bytes,4,rep,name=served_froms,json=servedFroms,proto3" json:"served_froms,omitempty"`
// keyspace_type will determine how this keyspace is treated by
// vtgate / vschema. Normal keyspaces are routable by
// any query. Snapshot keyspaces are only accessible
// by explicit addresssing or by calling "use keyspace" first
KeyspaceType KeyspaceType `protobuf:"varint,5,opt,name=keyspace_type,json=keyspaceType,proto3,enum=topodata.KeyspaceType" json:"keyspace_type,omitempty"`
// base_keyspace is the base keyspace from which a snapshot
// keyspace is created. empty for normal keyspaces
BaseKeyspace string `protobuf:"bytes,6,opt,name=base_keyspace,json=baseKeyspace,proto3" json:"base_keyspace,omitempty"`
// snapshot_time (in UTC) is a property of snapshot
// keyspaces which tells us what point in time
// the snapshot is of
SnapshotTime *vttime.Time `protobuf:"bytes,7,opt,name=snapshot_time,json=snapshotTime,proto3" json:"snapshot_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Keyspace) Reset() { *m = Keyspace{} }
func (m *Keyspace) String() string { return proto.CompactTextString(m) }
func (*Keyspace) ProtoMessage() {}
func (*Keyspace) Descriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{4}
}
func (m *Keyspace) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Keyspace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Keyspace.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Keyspace) XXX_Merge(src proto.Message) {
xxx_messageInfo_Keyspace.Merge(m, src)
}
func (m *Keyspace) XXX_Size() int {
return m.Size()
}
func (m *Keyspace) XXX_DiscardUnknown() {
xxx_messageInfo_Keyspace.DiscardUnknown(m)
}
var xxx_messageInfo_Keyspace proto.InternalMessageInfo
func (m *Keyspace) GetShardingColumnName() string {
if m != nil {
return m.ShardingColumnName
}
return ""
}
func (m *Keyspace) GetShardingColumnType() KeyspaceIdType {
if m != nil {
return m.ShardingColumnType
}
return KeyspaceIdType_UNSET
}
func (m *Keyspace) GetServedFroms() []*Keyspace_ServedFrom {
if m != nil {
return m.ServedFroms
}
return nil
}
func (m *Keyspace) GetKeyspaceType() KeyspaceType {
if m != nil {
return m.KeyspaceType
}
return KeyspaceType_NORMAL
}
func (m *Keyspace) GetBaseKeyspace() string {
if m != nil {
return m.BaseKeyspace
}
return ""
}
func (m *Keyspace) GetSnapshotTime() *vttime.Time {
if m != nil {
return m.SnapshotTime
}
return nil
}
// ServedFrom indicates a relationship between a TabletType and the
// keyspace name that's serving it.
type Keyspace_ServedFrom struct {
// the tablet type (key for the map)
TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
// the cells to limit this to
Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
// the keyspace name that's serving it
Keyspace string `protobuf:"bytes,3,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Keyspace_ServedFrom) Reset() { *m = Keyspace_ServedFrom{} }
func (m *Keyspace_ServedFrom) String() string { return proto.CompactTextString(m) }
func (*Keyspace_ServedFrom) ProtoMessage() {}
func (*Keyspace_ServedFrom) Descriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{4, 0}
}
func (m *Keyspace_ServedFrom) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Keyspace_ServedFrom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Keyspace_ServedFrom.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Keyspace_ServedFrom) XXX_Merge(src proto.Message) {
xxx_messageInfo_Keyspace_ServedFrom.Merge(m, src)
}
func (m *Keyspace_ServedFrom) XXX_Size() int {
return m.Size()
}
func (m *Keyspace_ServedFrom) XXX_DiscardUnknown() {
xxx_messageInfo_Keyspace_ServedFrom.DiscardUnknown(m)
}
var xxx_messageInfo_Keyspace_ServedFrom proto.InternalMessageInfo
func (m *Keyspace_ServedFrom) GetTabletType() TabletType {
if m != nil {
return m.TabletType
}
return TabletType_UNKNOWN
}
func (m *Keyspace_ServedFrom) GetCells() []string {
if m != nil {
return m.Cells
}
return nil
}
func (m *Keyspace_ServedFrom) GetKeyspace() string {
if m != nil {
return m.Keyspace
}
return ""
}
// ShardReplication describes the MySQL replication relationships
// whithin a cell.
type ShardReplication struct {
// Note there can be only one Node in this array
// for a given tablet.
Nodes []*ShardReplication_Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ShardReplication) Reset() { *m = ShardReplication{} }
func (m *ShardReplication) String() string { return proto.CompactTextString(m) }
func (*ShardReplication) ProtoMessage() {}
func (*ShardReplication) Descriptor() ([]byte, []int) {
return fileDescriptor_52c350cb619f972e, []int{5}
}
func (m *ShardReplication) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ShardReplication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ShardReplication.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ShardReplication) XXX_Merge(src proto.Message) {
xxx_messageInfo_ShardReplication.Merge(m, src)
}
func (m *ShardReplication) XXX_Size() int {
return m.Size()
}
func (m *ShardReplication) XXX_DiscardUnknown() {