vitess.io/vitess@v0.16.2/go/vt/proto/vttest/vttest.pb.go (about)

     1  //
     2  //Copyright 2019 The Vitess Authors.
     3  //
     4  //Licensed under the Apache License, Version 2.0 (the "License");
     5  //you may not use this file except in compliance with the License.
     6  //You may obtain a copy of the License at
     7  //
     8  //http://www.apache.org/licenses/LICENSE-2.0
     9  //
    10  //Unless required by applicable law or agreed to in writing, software
    11  //distributed under the License is distributed on an "AS IS" BASIS,
    12  //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  //See the License for the specific language governing permissions and
    14  //limitations under the License.
    15  
    16  // This file contains the vttest topology configuration structures.
    17  //
    18  // The protobuf message "VTTestTopology" specifies the Vitess and
    19  // database configuration of the "vttest" test component which can be
    20  // used in end-to-end tests to test an application against an actual
    21  // Vitess and MySQL server.
    22  //
    23  // To start a "vttest" instance, pass the "VTTestTopology" message,
    24  // encoded in the protobuf compact text format, to
    25  // py/vttest/run_local_database.py which in turn will send it to the
    26  // Vitess test binary called "vtcombo".
    27  //
    28  // To encode a "VTTestTopology" message in the protobuf compact text
    29  // format, create the protobuf in your test's native language first
    30  // and then use the protobuf library to encode it as text.
    31  // For an example in Python, see: test/vttest_sample_test.py
    32  // In go, see: go/vt/vttest/local_cluster_test.go
    33  //
    34  // Sample encoded proto configurations would be as follow. Note there are
    35  // multiple encoding options, see the proto documentation for more info
    36  // (first and last quote not included in the encoding):
    37  // - single keyspace named test_keyspace with one shard '0':
    38  //   'keyspaces:<name:"test_keyspace" shards:<name:"0" > > '
    39  // - two keyspaces, one with two shards, the other one with a redirect:
    40  //   'keyspaces { name: "test_keyspace" shards { name: "-80" } shards { name: "80-" } } keyspaces { name: "redirect" served_from: "test_keyspace" }'
    41  
    42  // Code generated by protoc-gen-go. DO NOT EDIT.
    43  // versions:
    44  // 	protoc-gen-go v1.28.1
    45  // 	protoc        v3.21.3
    46  // source: vttest.proto
    47  
    48  package vttest
    49  
    50  import (
    51  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    52  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    53  	reflect "reflect"
    54  	sync "sync"
    55  	vschema "vitess.io/vitess/go/vt/proto/vschema"
    56  )
    57  
    58  const (
    59  	// Verify that this generated code is sufficiently up-to-date.
    60  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    61  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    62  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    63  )
    64  
    65  // Shard describes a single shard in a keyspace.
    66  type Shard struct {
    67  	state         protoimpl.MessageState
    68  	sizeCache     protoimpl.SizeCache
    69  	unknownFields protoimpl.UnknownFields
    70  
    71  	// name has to be unique in a keyspace. For unsharded keyspaces, it
    72  	// should be '0'. For sharded keyspace, it should be derived from
    73  	// the keyrange, like '-80' or '40-80'.
    74  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    75  	// db_name_override is the mysql db name for this shard. Has to be
    76  	// globally unique. If not specified, we will by default use
    77  	// 'vt_<keyspace>_<shard>'.
    78  	DbNameOverride string `protobuf:"bytes,2,opt,name=db_name_override,json=dbNameOverride,proto3" json:"db_name_override,omitempty"`
    79  }
    80  
    81  func (x *Shard) Reset() {
    82  	*x = Shard{}
    83  	if protoimpl.UnsafeEnabled {
    84  		mi := &file_vttest_proto_msgTypes[0]
    85  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    86  		ms.StoreMessageInfo(mi)
    87  	}
    88  }
    89  
    90  func (x *Shard) String() string {
    91  	return protoimpl.X.MessageStringOf(x)
    92  }
    93  
    94  func (*Shard) ProtoMessage() {}
    95  
    96  func (x *Shard) ProtoReflect() protoreflect.Message {
    97  	mi := &file_vttest_proto_msgTypes[0]
    98  	if protoimpl.UnsafeEnabled && x != nil {
    99  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   100  		if ms.LoadMessageInfo() == nil {
   101  			ms.StoreMessageInfo(mi)
   102  		}
   103  		return ms
   104  	}
   105  	return mi.MessageOf(x)
   106  }
   107  
   108  // Deprecated: Use Shard.ProtoReflect.Descriptor instead.
   109  func (*Shard) Descriptor() ([]byte, []int) {
   110  	return file_vttest_proto_rawDescGZIP(), []int{0}
   111  }
   112  
   113  func (x *Shard) GetName() string {
   114  	if x != nil {
   115  		return x.Name
   116  	}
   117  	return ""
   118  }
   119  
   120  func (x *Shard) GetDbNameOverride() string {
   121  	if x != nil {
   122  		return x.DbNameOverride
   123  	}
   124  	return ""
   125  }
   126  
   127  // Keyspace describes a single keyspace.
   128  type Keyspace struct {
   129  	state         protoimpl.MessageState
   130  	sizeCache     protoimpl.SizeCache
   131  	unknownFields protoimpl.UnknownFields
   132  
   133  	// name has to be unique in a VTTestTopology.
   134  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   135  	// shards inside this keyspace. Ignored if redirect is set.
   136  	Shards []*Shard `protobuf:"bytes,2,rep,name=shards,proto3" json:"shards,omitempty"`
   137  	// redirects all traffic to another keyspace. If set, shards is ignored.
   138  	ServedFrom string `protobuf:"bytes,5,opt,name=served_from,json=servedFrom,proto3" json:"served_from,omitempty"`
   139  	// number of replica tablets to instantiate. This includes the primary tablet.
   140  	ReplicaCount int32 `protobuf:"varint,6,opt,name=replica_count,json=replicaCount,proto3" json:"replica_count,omitempty"`
   141  	// number of rdonly tablets to instantiate.
   142  	RdonlyCount int32 `protobuf:"varint,7,opt,name=rdonly_count,json=rdonlyCount,proto3" json:"rdonly_count,omitempty"`
   143  }
   144  
   145  func (x *Keyspace) Reset() {
   146  	*x = Keyspace{}
   147  	if protoimpl.UnsafeEnabled {
   148  		mi := &file_vttest_proto_msgTypes[1]
   149  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   150  		ms.StoreMessageInfo(mi)
   151  	}
   152  }
   153  
   154  func (x *Keyspace) String() string {
   155  	return protoimpl.X.MessageStringOf(x)
   156  }
   157  
   158  func (*Keyspace) ProtoMessage() {}
   159  
   160  func (x *Keyspace) ProtoReflect() protoreflect.Message {
   161  	mi := &file_vttest_proto_msgTypes[1]
   162  	if protoimpl.UnsafeEnabled && x != nil {
   163  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   164  		if ms.LoadMessageInfo() == nil {
   165  			ms.StoreMessageInfo(mi)
   166  		}
   167  		return ms
   168  	}
   169  	return mi.MessageOf(x)
   170  }
   171  
   172  // Deprecated: Use Keyspace.ProtoReflect.Descriptor instead.
   173  func (*Keyspace) Descriptor() ([]byte, []int) {
   174  	return file_vttest_proto_rawDescGZIP(), []int{1}
   175  }
   176  
   177  func (x *Keyspace) GetName() string {
   178  	if x != nil {
   179  		return x.Name
   180  	}
   181  	return ""
   182  }
   183  
   184  func (x *Keyspace) GetShards() []*Shard {
   185  	if x != nil {
   186  		return x.Shards
   187  	}
   188  	return nil
   189  }
   190  
   191  func (x *Keyspace) GetServedFrom() string {
   192  	if x != nil {
   193  		return x.ServedFrom
   194  	}
   195  	return ""
   196  }
   197  
   198  func (x *Keyspace) GetReplicaCount() int32 {
   199  	if x != nil {
   200  		return x.ReplicaCount
   201  	}
   202  	return 0
   203  }
   204  
   205  func (x *Keyspace) GetRdonlyCount() int32 {
   206  	if x != nil {
   207  		return x.RdonlyCount
   208  	}
   209  	return 0
   210  }
   211  
   212  // VTTestTopology describes the keyspaces in the topology.
   213  type VTTestTopology struct {
   214  	state         protoimpl.MessageState
   215  	sizeCache     protoimpl.SizeCache
   216  	unknownFields protoimpl.UnknownFields
   217  
   218  	// all keyspaces in the topology.
   219  	Keyspaces []*Keyspace `protobuf:"bytes,1,rep,name=keyspaces,proto3" json:"keyspaces,omitempty"`
   220  	// list of cells the keyspaces reside in. Vtgate is started in only the first cell.
   221  	Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
   222  	// routing rules for the topology.
   223  	RoutingRules *vschema.RoutingRules `protobuf:"bytes,3,opt,name=routing_rules,json=routingRules,proto3" json:"routing_rules,omitempty"`
   224  }
   225  
   226  func (x *VTTestTopology) Reset() {
   227  	*x = VTTestTopology{}
   228  	if protoimpl.UnsafeEnabled {
   229  		mi := &file_vttest_proto_msgTypes[2]
   230  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   231  		ms.StoreMessageInfo(mi)
   232  	}
   233  }
   234  
   235  func (x *VTTestTopology) String() string {
   236  	return protoimpl.X.MessageStringOf(x)
   237  }
   238  
   239  func (*VTTestTopology) ProtoMessage() {}
   240  
   241  func (x *VTTestTopology) ProtoReflect() protoreflect.Message {
   242  	mi := &file_vttest_proto_msgTypes[2]
   243  	if protoimpl.UnsafeEnabled && x != nil {
   244  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   245  		if ms.LoadMessageInfo() == nil {
   246  			ms.StoreMessageInfo(mi)
   247  		}
   248  		return ms
   249  	}
   250  	return mi.MessageOf(x)
   251  }
   252  
   253  // Deprecated: Use VTTestTopology.ProtoReflect.Descriptor instead.
   254  func (*VTTestTopology) Descriptor() ([]byte, []int) {
   255  	return file_vttest_proto_rawDescGZIP(), []int{2}
   256  }
   257  
   258  func (x *VTTestTopology) GetKeyspaces() []*Keyspace {
   259  	if x != nil {
   260  		return x.Keyspaces
   261  	}
   262  	return nil
   263  }
   264  
   265  func (x *VTTestTopology) GetCells() []string {
   266  	if x != nil {
   267  		return x.Cells
   268  	}
   269  	return nil
   270  }
   271  
   272  func (x *VTTestTopology) GetRoutingRules() *vschema.RoutingRules {
   273  	if x != nil {
   274  		return x.RoutingRules
   275  	}
   276  	return nil
   277  }
   278  
   279  var File_vttest_proto protoreflect.FileDescriptor
   280  
   281  var file_vttest_proto_rawDesc = []byte{
   282  	0x0a, 0x0c, 0x76, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
   283  	0x76, 0x74, 0x74, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x76, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e,
   284  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x05, 0x53, 0x68, 0x61, 0x72, 0x64, 0x12, 0x12,
   285  	0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
   286  	0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6f, 0x76,
   287  	0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x62,
   288  	0x4e, 0x61, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0xba, 0x01, 0x0a,
   289  	0x08, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
   290  	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a,
   291  	0x06, 0x73, 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
   292  	0x76, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x52, 0x06, 0x73, 0x68,
   293  	0x61, 0x72, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x66,
   294  	0x72, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65,
   295  	0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61,
   296  	0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x72, 0x65,
   297  	0x70, 0x6c, 0x69, 0x63, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x64,
   298  	0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05,
   299  	0x52, 0x0b, 0x72, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x04, 0x08,
   300  	0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x92, 0x01, 0x0a, 0x0e, 0x56, 0x54,
   301  	0x54, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x2e, 0x0a, 0x09,
   302  	0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
   303  	0x10, 0x2e, 0x76, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63,
   304  	0x65, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05,
   305  	0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c,
   306  	0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75,
   307  	0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x73, 0x63, 0x68,
   308  	0x65, 0x6d, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73,
   309  	0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x25,
   310  	0x5a, 0x23, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65,
   311  	0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76,
   312  	0x74, 0x74, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   313  }
   314  
   315  var (
   316  	file_vttest_proto_rawDescOnce sync.Once
   317  	file_vttest_proto_rawDescData = file_vttest_proto_rawDesc
   318  )
   319  
   320  func file_vttest_proto_rawDescGZIP() []byte {
   321  	file_vttest_proto_rawDescOnce.Do(func() {
   322  		file_vttest_proto_rawDescData = protoimpl.X.CompressGZIP(file_vttest_proto_rawDescData)
   323  	})
   324  	return file_vttest_proto_rawDescData
   325  }
   326  
   327  var file_vttest_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
   328  var file_vttest_proto_goTypes = []interface{}{
   329  	(*Shard)(nil),                // 0: vttest.Shard
   330  	(*Keyspace)(nil),             // 1: vttest.Keyspace
   331  	(*VTTestTopology)(nil),       // 2: vttest.VTTestTopology
   332  	(*vschema.RoutingRules)(nil), // 3: vschema.RoutingRules
   333  }
   334  var file_vttest_proto_depIdxs = []int32{
   335  	0, // 0: vttest.Keyspace.shards:type_name -> vttest.Shard
   336  	1, // 1: vttest.VTTestTopology.keyspaces:type_name -> vttest.Keyspace
   337  	3, // 2: vttest.VTTestTopology.routing_rules:type_name -> vschema.RoutingRules
   338  	3, // [3:3] is the sub-list for method output_type
   339  	3, // [3:3] is the sub-list for method input_type
   340  	3, // [3:3] is the sub-list for extension type_name
   341  	3, // [3:3] is the sub-list for extension extendee
   342  	0, // [0:3] is the sub-list for field type_name
   343  }
   344  
   345  func init() { file_vttest_proto_init() }
   346  func file_vttest_proto_init() {
   347  	if File_vttest_proto != nil {
   348  		return
   349  	}
   350  	if !protoimpl.UnsafeEnabled {
   351  		file_vttest_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   352  			switch v := v.(*Shard); i {
   353  			case 0:
   354  				return &v.state
   355  			case 1:
   356  				return &v.sizeCache
   357  			case 2:
   358  				return &v.unknownFields
   359  			default:
   360  				return nil
   361  			}
   362  		}
   363  		file_vttest_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   364  			switch v := v.(*Keyspace); i {
   365  			case 0:
   366  				return &v.state
   367  			case 1:
   368  				return &v.sizeCache
   369  			case 2:
   370  				return &v.unknownFields
   371  			default:
   372  				return nil
   373  			}
   374  		}
   375  		file_vttest_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
   376  			switch v := v.(*VTTestTopology); i {
   377  			case 0:
   378  				return &v.state
   379  			case 1:
   380  				return &v.sizeCache
   381  			case 2:
   382  				return &v.unknownFields
   383  			default:
   384  				return nil
   385  			}
   386  		}
   387  	}
   388  	type x struct{}
   389  	out := protoimpl.TypeBuilder{
   390  		File: protoimpl.DescBuilder{
   391  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   392  			RawDescriptor: file_vttest_proto_rawDesc,
   393  			NumEnums:      0,
   394  			NumMessages:   3,
   395  			NumExtensions: 0,
   396  			NumServices:   0,
   397  		},
   398  		GoTypes:           file_vttest_proto_goTypes,
   399  		DependencyIndexes: file_vttest_proto_depIdxs,
   400  		MessageInfos:      file_vttest_proto_msgTypes,
   401  	}.Build()
   402  	File_vttest_proto = out.File
   403  	file_vttest_proto_rawDesc = nil
   404  	file_vttest_proto_goTypes = nil
   405  	file_vttest_proto_depIdxs = nil
   406  }