diff --git a/go/vt/proto/vtadmin/vtadmin.pb.go b/go/vt/proto/vtadmin/vtadmin.pb.go new file mode 100644 index 0000000000..4d2dbb7859 --- /dev/null +++ b/go/vt/proto/vtadmin/vtadmin.pb.go @@ -0,0 +1,122 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: vtadmin.proto + +package vtadmin + +import ( + fmt "fmt" + math "math" + + proto "github.com/golang/protobuf/proto" +) + +// 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 + +// VTGate represents information about a single VTGate host. +type VTGate struct { + // Hostname is the shortname of the VTGate. + Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` + // Pool is group the VTGate serves queries for. Some deployments segment + // VTGates into groups or pools, based on the workloads they serve queries + // for. Use of this field is optional. + Pool string `protobuf:"bytes,2,opt,name=pool,proto3" json:"pool,omitempty"` + // Cell is the topology cell the VTGate is in. + Cell string `protobuf:"bytes,3,opt,name=cell,proto3" json:"cell,omitempty"` + // Cluster is the name of the cluster the VTGate serves. + Cluster string `protobuf:"bytes,4,opt,name=cluster,proto3" json:"cluster,omitempty"` + // Keyspaces is the list of keyspaces-to-watch for the VTGate. + Keyspaces []string `protobuf:"bytes,5,rep,name=keyspaces,proto3" json:"keyspaces,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VTGate) Reset() { *m = VTGate{} } +func (m *VTGate) String() string { return proto.CompactTextString(m) } +func (*VTGate) ProtoMessage() {} +func (*VTGate) Descriptor() ([]byte, []int) { + return fileDescriptor_609739e22a0a50b3, []int{0} +} + +func (m *VTGate) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VTGate.Unmarshal(m, b) +} +func (m *VTGate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VTGate.Marshal(b, m, deterministic) +} +func (m *VTGate) XXX_Merge(src proto.Message) { + xxx_messageInfo_VTGate.Merge(m, src) +} +func (m *VTGate) XXX_Size() int { + return xxx_messageInfo_VTGate.Size(m) +} +func (m *VTGate) XXX_DiscardUnknown() { + xxx_messageInfo_VTGate.DiscardUnknown(m) +} + +var xxx_messageInfo_VTGate proto.InternalMessageInfo + +func (m *VTGate) GetHostname() string { + if m != nil { + return m.Hostname + } + return "" +} + +func (m *VTGate) GetPool() string { + if m != nil { + return m.Pool + } + return "" +} + +func (m *VTGate) GetCell() string { + if m != nil { + return m.Cell + } + return "" +} + +func (m *VTGate) GetCluster() string { + if m != nil { + return m.Cluster + } + return "" +} + +func (m *VTGate) GetKeyspaces() []string { + if m != nil { + return m.Keyspaces + } + return nil +} + +func init() { + proto.RegisterType((*VTGate)(nil), "vtadmin.VTGate") +} + +func init() { proto.RegisterFile("vtadmin.proto", fileDescriptor_609739e22a0a50b3) } + +var fileDescriptor_609739e22a0a50b3 = []byte{ + // 171 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x2b, 0x49, 0x4c, + 0xc9, 0xcd, 0xcc, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0x95, 0x5a, 0x18, + 0xb9, 0xd8, 0xc2, 0x42, 0xdc, 0x13, 0x4b, 0x52, 0x85, 0xa4, 0xb8, 0x38, 0x32, 0xf2, 0x8b, 0x4b, + 0xf2, 0x12, 0x73, 0x53, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xe0, 0x7c, 0x21, 0x21, 0x2e, + 0x96, 0x82, 0xfc, 0xfc, 0x1c, 0x09, 0x26, 0xb0, 0x38, 0x98, 0x0d, 0x12, 0x4b, 0x4e, 0xcd, 0xc9, + 0x91, 0x60, 0x86, 0x88, 0x81, 0xd8, 0x42, 0x12, 0x5c, 0xec, 0xc9, 0x39, 0xa5, 0xc5, 0x25, 0xa9, + 0x45, 0x12, 0x2c, 0x60, 0x61, 0x18, 0x57, 0x48, 0x86, 0x8b, 0x33, 0x3b, 0xb5, 0xb2, 0xb8, 0x20, + 0x31, 0x39, 0xb5, 0x58, 0x82, 0x55, 0x81, 0x59, 0x83, 0x33, 0x08, 0x21, 0xe0, 0xa4, 0x16, 0xa5, + 0x52, 0x96, 0x59, 0x92, 0x5a, 0x5c, 0xac, 0x97, 0x99, 0xaf, 0x0f, 0x61, 0xe9, 0xa7, 0xe7, 0xeb, + 0x97, 0x95, 0xe8, 0x83, 0xdd, 0xab, 0x0f, 0x75, 0x6e, 0x12, 0x1b, 0x98, 0x6b, 0x0c, 0x08, 0x00, + 0x00, 0xff, 0xff, 0xc6, 0x5b, 0xcf, 0x4e, 0xcf, 0x00, 0x00, 0x00, +} diff --git a/proto/vtadmin.proto b/proto/vtadmin.proto new file mode 100644 index 0000000000..0a71af5c0c --- /dev/null +++ b/proto/vtadmin.proto @@ -0,0 +1,38 @@ +/* +Copyright 2019 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package contains the types used by VTAdmin (and later an RPC service). + +syntax = "proto3"; +option go_package = "vitess.io/vitess/go/vt/proto/vtadmin"; + +package vtadmin; + +// VTGate represents information about a single VTGate host. +message VTGate { + // Hostname is the shortname of the VTGate. + string hostname = 1; + // Pool is group the VTGate serves queries for. Some deployments segment + // VTGates into groups or pools, based on the workloads they serve queries + // for. Use of this field is optional. + string pool = 2; + // Cell is the topology cell the VTGate is in. + string cell = 3; + // Cluster is the name of the cluster the VTGate serves. + string cluster = 4; + // Keyspaces is the list of keyspaces-to-watch for the VTGate. + repeated string keyspaces = 5; +}