Embed cluster message, rather than just the name, in VTGates

There are cases where we need more than just the name, so let's make
sure we have it.

Signed-off-by: Andrew Mason <amason@slack-corp.com>
This commit is contained in:
Andrew Mason 2020-12-23 19:04:35 -05:00
Родитель 8aae5e3e60
Коммит 1e38cde199
2 изменённых файлов: 37 добавлений и 37 удалений

Просмотреть файл

@ -169,8 +169,8 @@ type VTGate struct {
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"`
// Cluster is the cluster the VTGate serves.
Cluster *Cluster `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:"-"`
@ -224,11 +224,11 @@ func (m *VTGate) GetCell() string {
return ""
}
func (m *VTGate) GetCluster() string {
func (m *VTGate) GetCluster() *Cluster {
if m != nil {
return m.Cluster
}
return ""
return nil
}
func (m *VTGate) GetKeyspaces() []string {
@ -459,37 +459,37 @@ func init() {
func init() { proto.RegisterFile("vtadmin.proto", fileDescriptor_609739e22a0a50b3) }
var fileDescriptor_609739e22a0a50b3 = []byte{
// 473 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x5d, 0x8b, 0xd3, 0x40,
0x14, 0x6d, 0xb2, 0xdb, 0x66, 0x73, 0xa3, 0x6d, 0xbd, 0x4f, 0x31, 0x2e, 0x58, 0x82, 0x4a, 0x15,
0x6c, 0x20, 0xfa, 0xd2, 0x27, 0x59, 0x45, 0xca, 0x22, 0xa4, 0x30, 0xad, 0x15, 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51, 0x45, 0xfb, 0x82,
0xe2, 0x16, 0x4e, 0x00, 0x76, 0x56, 0x30, 0x3a, 0xe4, 0x5a, 0x05, 0x4f, 0x8e, 0xce, 0x1a, 0x0d,
0xef, 0x5f, 0x7c, 0x7d, 0xb6, 0x2d, 0x05, 0xe5, 0x7c, 0x54, 0xb2, 0x44, 0x57, 0xc9, 0x8a, 0x25,
0x5b, 0x91, 0xa8, 0xff, 0x35, 0x31, 0xe4, 0xeb, 0x8e, 0x6a, 0xdf, 0xfc, 0x0d, 0x00, 0x00, 0xff,
0xff, 0x51, 0x4b, 0xaa, 0x23, 0xe8, 0x03, 0x00, 0x00,
// 474 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x5f, 0x8b, 0xd3, 0x4e,
0x14, 0x6d, 0xb2, 0xdb, 0x66, 0x73, 0xf3, 0xfb, 0xb5, 0xf5, 0x3e, 0xc5, 0xb8, 0x60, 0x19, 0x54,
0xaa, 0x60, 0x03, 0xd1, 0x97, 0x3e, 0xc9, 0x2a, 0x52, 0x16, 0x21, 0x85, 0x69, 0xad, 0xe0, 0xcb,
0x92, 0x6d, 0x86, 0x1a, 0xcc, 0x76, 0x62, 0x67, 0xb6, 0xe0, 0x17, 0xf1, 0x5b, 0x09, 0x7e, 0x24,
0x99, 0x3f, 0x49, 0xbb, 0xed, 0xa2, 0xbe, 0xdd, 0x7b, 0xcf, 0x39, 0x77, 0xce, 0x3d, 0x6d, 0xe0,
0xff, 0xad, 0xcc, 0xf2, 0x9b, 0x62, 0x3d, 0xaa, 0x36, 0x5c, 0x72, 0xf4, 0x6c, 0x1b, 0x75, 0x25,
0xaf, 0x78, 0x9e, 0xc9, 0xcc, 0x00, 0xe4, 0x25, 0x78, 0xef, 0xca, 0x5b, 0x21, 0xd9, 0x06, 0xbb,
0xe0, 0x16, 0x79, 0xe8, 0x0c, 0x9c, 0xa1, 0x4f, 0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08, 0xac, 0xf6, 0xaa, 0xc8, 0x45, 0xe8, 0x68, 0x09, 0xd8, 0xd1, 0x65, 0x2e, 0xc8, 0x18, 0xfa,
0x3b, 0x8d, 0xa8, 0xf8, 0x5a, 0x30, 0x7c, 0x0a, 0xed, 0x95, 0x1a, 0x68, 0x7a, 0x90, 0xf4, 0x1a,
0x3f, 0xe6, 0x6a, 0x6a, 0x50, 0x32, 0xd5, 0x52, 0xfb, 0x5b, 0xd8, 0xf7, 0xfe, 0x14, 0xc8, 0x81,
0x17, 0xf7, 0xc8, 0xcb, 0x6b, 0x78, 0xd0, 0x2c, 0xfc, 0xf7, 0x0b, 0xde, 0x00, 0xee, 0xab, 0xec,
0x0d, 0xcf, 0xc1, 0x33, 0xff, 0x8e, 0xe3, 0x2b, 0xac, 0xe3, 0x1a, 0x4f, 0x7e, 0x39, 0xe0, 0x2d,
0xe6, 0x17, 0x0a, 0xc3, 0x0b, 0x38, 0xab, 0xe3, 0xc0, 0xb0, 0x51, 0x1c, 0xa4, 0x1a, 0x3d, 0xbc,
0x07, 0x31, 0xef, 0x92, 0x16, 0x8e, 0xc1, 0x6f, 0xfc, 0xe0, 0x1d, 0xe6, 0x9d, 0xa8, 0xa2, 0x43,
0x43, 0xa4, 0x85, 0x13, 0x80, 0xdd, 0x29, 0x18, 0x1d, 0x6b, 0x1b, 0x07, 0x8f, 0xee, 0xc5, 0x6a,
0x0f, 0x6f, 0x9f, 0x7d, 0x7e, 0xb2, 0x2d, 0x24, 0x13, 0x62, 0x54, 0xf0, 0xd8, 0x54, 0xf1, 0x8a,
0xc7, 0x5b, 0x19, 0xeb, 0x2f, 0x38, 0xb6, 0xe2, 0xeb, 0x8e, 0x6e, 0x5f, 0xfd, 0x0e, 0x00, 0x00,
0xff, 0xff, 0x34, 0xe6, 0x6b, 0x4d, 0xfa, 0x03, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

Просмотреть файл

@ -70,8 +70,8 @@ message VTGate {
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;
// Cluster is the cluster the VTGate serves.
Cluster cluster = 4;
// Keyspaces is the list of keyspaces-to-watch for the VTGate.
repeated string keyspaces = 5;
}