From 1ec725ea7fe52fedf06aff360b883e4763ec8072 Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Fri, 22 Jan 2021 17:04:49 -0500 Subject: [PATCH 1/5] Add GetBackups (formerly `ListBackups`) rpc, generate codegen and stubs Signed-off-by: Andrew Mason --- go/vt/proto/mysqlctl/mysqlctl.pb.go | 97 +++++-- go/vt/proto/vtctldata/vtctldata.pb.go | 290 +++++++++++++------- go/vt/proto/vtctlservice/vtctlservice.pb.go | 91 ++++-- go/vt/vtctl/grpcvtctldclient/client_gen.go | 9 + go/vt/vtctl/grpcvtctldserver/server.go | 5 + proto/mysqlctl.proto | 6 + proto/vtctldata.proto | 10 + proto/vtctlservice.proto | 2 + 8 files changed, 362 insertions(+), 148 deletions(-) diff --git a/go/vt/proto/mysqlctl/mysqlctl.pb.go b/go/vt/proto/mysqlctl/mysqlctl.pb.go index 2b80a9971d9..f7c1b3af765 100644 --- a/go/vt/proto/mysqlctl/mysqlctl.pb.go +++ b/go/vt/proto/mysqlctl/mysqlctl.pb.go @@ -351,6 +351,54 @@ func (m *RefreshConfigResponse) XXX_DiscardUnknown() { var xxx_messageInfo_RefreshConfigResponse proto.InternalMessageInfo +// BackupInfo is the read-only attributes of a mysqlctl/backupstorage.BackupHandle. +type BackupInfo struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Directory string `protobuf:"bytes,2,opt,name=directory,proto3" json:"directory,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BackupInfo) Reset() { *m = BackupInfo{} } +func (m *BackupInfo) String() string { return proto.CompactTextString(m) } +func (*BackupInfo) ProtoMessage() {} +func (*BackupInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_cd8c110e42f9cbb9, []int{10} +} + +func (m *BackupInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BackupInfo.Unmarshal(m, b) +} +func (m *BackupInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BackupInfo.Marshal(b, m, deterministic) +} +func (m *BackupInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_BackupInfo.Merge(m, src) +} +func (m *BackupInfo) XXX_Size() int { + return xxx_messageInfo_BackupInfo.Size(m) +} +func (m *BackupInfo) XXX_DiscardUnknown() { + xxx_messageInfo_BackupInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_BackupInfo proto.InternalMessageInfo + +func (m *BackupInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *BackupInfo) GetDirectory() string { + if m != nil { + return m.Directory + } + return "" +} + func init() { proto.RegisterType((*StartRequest)(nil), "mysqlctl.StartRequest") proto.RegisterType((*StartResponse)(nil), "mysqlctl.StartResponse") @@ -362,34 +410,37 @@ func init() { proto.RegisterType((*ReinitConfigResponse)(nil), "mysqlctl.ReinitConfigResponse") proto.RegisterType((*RefreshConfigRequest)(nil), "mysqlctl.RefreshConfigRequest") proto.RegisterType((*RefreshConfigResponse)(nil), "mysqlctl.RefreshConfigResponse") + proto.RegisterType((*BackupInfo)(nil), "mysqlctl.BackupInfo") } func init() { proto.RegisterFile("mysqlctl.proto", fileDescriptor_cd8c110e42f9cbb9) } var fileDescriptor_cd8c110e42f9cbb9 = []byte{ - // 339 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x4d, 0x4f, 0xfa, 0x30, - 0x1c, 0xc7, 0xff, 0x84, 0xfc, 0xcd, 0xfc, 0x09, 0xce, 0x54, 0x79, 0x6a, 0xa2, 0xe0, 0x12, 0x95, - 0x13, 0x4d, 0xf4, 0xa4, 0x37, 0x25, 0xf1, 0x66, 0x4c, 0x4a, 0x4c, 0x8c, 0x17, 0x32, 0xa5, 0x8c, - 0x26, 0xb8, 0x42, 0x5b, 0x20, 0xbe, 0x05, 0x5f, 0xb5, 0xb1,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1f, 0x3c, 0xf7, 0xc6, 0xa8, 0x95, 0x89, 0xe5, 0x01, 0x62, 0xbc, 0xcd, 0x4a, 0x47, 0x5e, 0xc1, - 0xdf, 0x00, 0x81, 0x3a, 0xeb, 0xc2, 0x76, 0x7a, 0xf8, 0xfc, 0x8f, 0x44, 0xba, 0xfc, 0x0c, 0x95, - 0x2c, 0x30, 0x74, 0x9a, 0x29, 0x15, 0xf9, 0xe2, 0xb3, 0x5d, 0x76, 0x3a, 0x48, 0xa1, 0x9a, 0x23, - 0x8a, 0x72, 0x95, 0xe2, 0x27, 0xc0, 0xed, 0x9d, 0xbe, 0xdb, 0x7c, 0xb8, 0x7a, 0xbb, 0x58, 0x72, - 0xcd, 0x94, 0xea, 0x71, 0x41, 0x92, 0x27, 0x12, 0x09, 0xb2, 0xd4, 0xc4, 0xfc, 0xdc, 0xc4, 0x0d, - 0xbc, 0xef, 0x99, 0xf3, 0xcd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb8, 0xe2, 0x15, 0x86, 0xfe, - 0x02, 0x00, 0x00, + // 376 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xdf, 0x4b, 0xc2, 0x40, + 0x1c, 0xcf, 0xac, 0x98, 0xdf, 0xb4, 0xc5, 0x95, 0x3a, 0x47, 0xa5, 0x0d, 0x2a, 0x9f, 0x1c, 0xd4, + 0x53, 0x3d, 0x04, 0x29, 0x04, 0x3d, 0x44, 0x30, 0x09, 0xa2, 0x17, 0x59, 0xee, 0x36, 0x47, 0xba, + 0x9b, 0x77, 0x37, 0xc5, 0x7f, 0xa1, 0xbf, 0x3a, 0x3a, 0x6f, 0x73, 0x73, 0xda, 0xdb, 0xdd, 0xe7, + 0x17, 0xb7, 0xcf, 0x87, 0xc1, 0xd1, 0x64, 0xc1, 0xa6, 0xe3, 0x21, 0x1f, 0x77, 0x42, 0x4a, 0x38, + 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xd5, 0x3a, 0xc9, 0x2c, 0xe9, 0x0d, 0xf4, 0x7a, 0x0e, 0x97, + 0xcf, 0xd8, 0x41, 0x3d, 0x50, 0xe2, 0xc6, 0x50, 0x23, 0x25, 0xcb, 0x0e, 0xa0, 0xeb, 0x9b, 0xa8, + 0x24, 0xe4, 0x03, 0xd4, 0xb5, 0x22, 0x51, 0x6b, 0x65, 0xd8, 0xdc, 0xbe, 0x7e, 0xf9, 0x8f, 0x22, + 0x49, 0x7e, 0x83, 0x72, 0xba, 0x70, 0x74, 0x9e, 0x32, 0xe5, 0xf7, 0xd1, 0x2f, 0xb6, 0xd1, 0x49, + 0xa0, 0x05, 0x95, 0xcc, 0x22, 0x28, 0x63, 0xc9, 0x4f, 0xa8, 0x37, 0xb7, 0xf2, 0x71, 0x66, 0xf7, + 0xe6, 0xf3, 0x6a, 0xe6, 0x73, 0xcc, 0x58, 0xc7, 0x27, 0xe6, 0xf2, 0x64, 0x7a, 0xc4, 0x9c, 0x71, + 0x53, 0xfc, 0x1c, 0x66, 0x1c, 0xf0, 0x75, 0x20, 0xee, 0x77, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xd3, 0x4f, 0x5c, 0x33, 0x3e, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index 0b7cdd5e83d..46dc4b54750 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -10,6 +10,7 @@ import ( proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" logutil "vitess.io/vitess/go/vt/proto/logutil" + mysqlctl "vitess.io/vitess/go/vt/proto/mysqlctl" tabletmanagerdata "vitess.io/vitess/go/vt/proto/tabletmanagerdata" topodata "vitess.io/vitess/go/vt/proto/topodata" vschema "vitess.io/vitess/go/vt/proto/vschema" @@ -115,6 +116,92 @@ func (m *ExecuteVtctlCommandResponse) GetEvent() *logutil.Event { return nil } +type GetBackupsRequest struct { + Keyspace string `protobuf:"bytes,1,opt,name=keyspace,proto3" json:"keyspace,omitempty"` + Shard string `protobuf:"bytes,2,opt,name=shard,proto3" json:"shard,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetBackupsRequest) Reset() { *m = GetBackupsRequest{} } +func (m *GetBackupsRequest) String() string { return proto.CompactTextString(m) } +func (*GetBackupsRequest) ProtoMessage() {} +func (*GetBackupsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f41247b323a1ab2e, []int{2} +} + +func (m *GetBackupsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetBackupsRequest.Unmarshal(m, b) +} +func (m *GetBackupsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetBackupsRequest.Marshal(b, m, deterministic) +} +func (m *GetBackupsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetBackupsRequest.Merge(m, src) +} +func (m *GetBackupsRequest) XXX_Size() int { + return xxx_messageInfo_GetBackupsRequest.Size(m) +} +func (m *GetBackupsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetBackupsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetBackupsRequest proto.InternalMessageInfo + +func (m *GetBackupsRequest) GetKeyspace() string { + if m != nil { + return m.Keyspace + } + return "" +} + +func (m *GetBackupsRequest) GetShard() string { + if m != nil { + return m.Shard + } + return "" +} + +type GetBackupsResponse struct { + Backups []*mysqlctl.BackupInfo `protobuf:"bytes,1,rep,name=backups,proto3" json:"backups,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetBackupsResponse) Reset() { *m = GetBackupsResponse{} } +func (m *GetBackupsResponse) String() string { return proto.CompactTextString(m) } +func (*GetBackupsResponse) ProtoMessage() {} +func (*GetBackupsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f41247b323a1ab2e, []int{3} +} + +func (m *GetBackupsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetBackupsResponse.Unmarshal(m, b) +} +func (m *GetBackupsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetBackupsResponse.Marshal(b, m, deterministic) +} +func (m *GetBackupsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetBackupsResponse.Merge(m, src) +} +func (m *GetBackupsResponse) XXX_Size() int { + return xxx_messageInfo_GetBackupsResponse.Size(m) +} +func (m *GetBackupsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetBackupsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetBackupsResponse proto.InternalMessageInfo + +func (m *GetBackupsResponse) GetBackups() []*mysqlctl.BackupInfo { + if m != nil { + return m.Backups + } + return nil +} + type GetCellInfoNamesRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -125,7 +212,7 @@ func (m *GetCellInfoNamesRequest) Reset() { *m = GetCellInfoNamesRequest func (m *GetCellInfoNamesRequest) String() string { return proto.CompactTextString(m) } func (*GetCellInfoNamesRequest) ProtoMessage() {} func (*GetCellInfoNamesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{2} + return fileDescriptor_f41247b323a1ab2e, []int{4} } func (m *GetCellInfoNamesRequest) XXX_Unmarshal(b []byte) error { @@ -157,7 +244,7 @@ func (m *GetCellInfoNamesResponse) Reset() { *m = GetCellInfoNamesRespon func (m *GetCellInfoNamesResponse) String() string { return proto.CompactTextString(m) } func (*GetCellInfoNamesResponse) ProtoMessage() {} func (*GetCellInfoNamesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{3} + return fileDescriptor_f41247b323a1ab2e, []int{5} } func (m *GetCellInfoNamesResponse) XXX_Unmarshal(b []byte) error { @@ -196,7 +283,7 @@ func (m *GetCellInfoRequest) Reset() { *m = GetCellInfoRequest{} } func (m *GetCellInfoRequest) String() string { return proto.CompactTextString(m) } func (*GetCellInfoRequest) ProtoMessage() {} func (*GetCellInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{4} + return fileDescriptor_f41247b323a1ab2e, []int{6} } func (m *GetCellInfoRequest) XXX_Unmarshal(b []byte) error { @@ -235,7 +322,7 @@ func (m *GetCellInfoResponse) Reset() { *m = GetCellInfoResponse{} } func (m *GetCellInfoResponse) String() string { return proto.CompactTextString(m) } func (*GetCellInfoResponse) ProtoMessage() {} func (*GetCellInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{5} + return fileDescriptor_f41247b323a1ab2e, []int{7} } func (m *GetCellInfoResponse) XXX_Unmarshal(b []byte) error { @@ -273,7 +360,7 @@ func (m *GetCellsAliasesRequest) Reset() { *m = GetCellsAliasesRequest{} func (m *GetCellsAliasesRequest) String() string { return proto.CompactTextString(m) } func (*GetCellsAliasesRequest) ProtoMessage() {} func (*GetCellsAliasesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{6} + return fileDescriptor_f41247b323a1ab2e, []int{8} } func (m *GetCellsAliasesRequest) XXX_Unmarshal(b []byte) error { @@ -305,7 +392,7 @@ func (m *GetCellsAliasesResponse) Reset() { *m = GetCellsAliasesResponse func (m *GetCellsAliasesResponse) String() string { return proto.CompactTextString(m) } func (*GetCellsAliasesResponse) ProtoMessage() {} func (*GetCellsAliasesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{7} + return fileDescriptor_f41247b323a1ab2e, []int{9} } func (m *GetCellsAliasesResponse) XXX_Unmarshal(b []byte) error { @@ -343,7 +430,7 @@ func (m *GetKeyspacesRequest) Reset() { *m = GetKeyspacesRequest{} } func (m *GetKeyspacesRequest) String() string { return proto.CompactTextString(m) } func (*GetKeyspacesRequest) ProtoMessage() {} func (*GetKeyspacesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{8} + return fileDescriptor_f41247b323a1ab2e, []int{10} } func (m *GetKeyspacesRequest) XXX_Unmarshal(b []byte) error { @@ -375,7 +462,7 @@ func (m *GetKeyspacesResponse) Reset() { *m = GetKeyspacesResponse{} } func (m *GetKeyspacesResponse) String() string { return proto.CompactTextString(m) } func (*GetKeyspacesResponse) ProtoMessage() {} func (*GetKeyspacesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{9} + return fileDescriptor_f41247b323a1ab2e, []int{11} } func (m *GetKeyspacesResponse) XXX_Unmarshal(b []byte) error { @@ -414,7 +501,7 @@ func (m *GetKeyspaceRequest) Reset() { *m = GetKeyspaceRequest{} } func (m *GetKeyspaceRequest) String() string { return proto.CompactTextString(m) } func (*GetKeyspaceRequest) ProtoMessage() {} func (*GetKeyspaceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{10} + return fileDescriptor_f41247b323a1ab2e, []int{12} } func (m *GetKeyspaceRequest) XXX_Unmarshal(b []byte) error { @@ -453,7 +540,7 @@ func (m *GetKeyspaceResponse) Reset() { *m = GetKeyspaceResponse{} } func (m *GetKeyspaceResponse) String() string { return proto.CompactTextString(m) } func (*GetKeyspaceResponse) ProtoMessage() {} func (*GetKeyspaceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{11} + return fileDescriptor_f41247b323a1ab2e, []int{13} } func (m *GetKeyspaceResponse) XXX_Unmarshal(b []byte) error { @@ -507,7 +594,7 @@ func (m *GetSchemaRequest) Reset() { *m = GetSchemaRequest{} } func (m *GetSchemaRequest) String() string { return proto.CompactTextString(m) } func (*GetSchemaRequest) ProtoMessage() {} func (*GetSchemaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{12} + return fileDescriptor_f41247b323a1ab2e, []int{14} } func (m *GetSchemaRequest) XXX_Unmarshal(b []byte) error { @@ -581,7 +668,7 @@ func (m *GetSchemaResponse) Reset() { *m = GetSchemaResponse{} } func (m *GetSchemaResponse) String() string { return proto.CompactTextString(m) } func (*GetSchemaResponse) ProtoMessage() {} func (*GetSchemaResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{13} + return fileDescriptor_f41247b323a1ab2e, []int{15} } func (m *GetSchemaResponse) XXX_Unmarshal(b []byte) error { @@ -620,7 +707,7 @@ func (m *GetSrvVSchemaRequest) Reset() { *m = GetSrvVSchemaRequest{} } func (m *GetSrvVSchemaRequest) String() string { return proto.CompactTextString(m) } func (*GetSrvVSchemaRequest) ProtoMessage() {} func (*GetSrvVSchemaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{14} + return fileDescriptor_f41247b323a1ab2e, []int{16} } func (m *GetSrvVSchemaRequest) XXX_Unmarshal(b []byte) error { @@ -659,7 +746,7 @@ func (m *GetSrvVSchemaResponse) Reset() { *m = GetSrvVSchemaResponse{} } func (m *GetSrvVSchemaResponse) String() string { return proto.CompactTextString(m) } func (*GetSrvVSchemaResponse) ProtoMessage() {} func (*GetSrvVSchemaResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{15} + return fileDescriptor_f41247b323a1ab2e, []int{17} } func (m *GetSrvVSchemaResponse) XXX_Unmarshal(b []byte) error { @@ -698,7 +785,7 @@ func (m *GetTabletRequest) Reset() { *m = GetTabletRequest{} } func (m *GetTabletRequest) String() string { return proto.CompactTextString(m) } func (*GetTabletRequest) ProtoMessage() {} func (*GetTabletRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{16} + return fileDescriptor_f41247b323a1ab2e, []int{18} } func (m *GetTabletRequest) XXX_Unmarshal(b []byte) error { @@ -737,7 +824,7 @@ func (m *GetTabletResponse) Reset() { *m = GetTabletResponse{} } func (m *GetTabletResponse) String() string { return proto.CompactTextString(m) } func (*GetTabletResponse) ProtoMessage() {} func (*GetTabletResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{17} + return fileDescriptor_f41247b323a1ab2e, []int{19} } func (m *GetTabletResponse) XXX_Unmarshal(b []byte) error { @@ -783,7 +870,7 @@ func (m *GetTabletsRequest) Reset() { *m = GetTabletsRequest{} } func (m *GetTabletsRequest) String() string { return proto.CompactTextString(m) } func (*GetTabletsRequest) ProtoMessage() {} func (*GetTabletsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{18} + return fileDescriptor_f41247b323a1ab2e, []int{20} } func (m *GetTabletsRequest) XXX_Unmarshal(b []byte) error { @@ -836,7 +923,7 @@ func (m *GetTabletsResponse) Reset() { *m = GetTabletsResponse{} } func (m *GetTabletsResponse) String() string { return proto.CompactTextString(m) } func (*GetTabletsResponse) ProtoMessage() {} func (*GetTabletsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{19} + return fileDescriptor_f41247b323a1ab2e, []int{21} } func (m *GetTabletsResponse) XXX_Unmarshal(b []byte) error { @@ -879,7 +966,7 @@ func (m *InitShardPrimaryRequest) Reset() { *m = InitShardPrimaryRequest func (m *InitShardPrimaryRequest) String() string { return proto.CompactTextString(m) } func (*InitShardPrimaryRequest) ProtoMessage() {} func (*InitShardPrimaryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{20} + return fileDescriptor_f41247b323a1ab2e, []int{22} } func (m *InitShardPrimaryRequest) XXX_Unmarshal(b []byte) error { @@ -946,7 +1033,7 @@ func (m *InitShardPrimaryResponse) Reset() { *m = InitShardPrimaryRespon func (m *InitShardPrimaryResponse) String() string { return proto.CompactTextString(m) } func (*InitShardPrimaryResponse) ProtoMessage() {} func (*InitShardPrimaryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{21} + return fileDescriptor_f41247b323a1ab2e, []int{23} } func (m *InitShardPrimaryResponse) XXX_Unmarshal(b []byte) error { @@ -986,7 +1073,7 @@ 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_f41247b323a1ab2e, []int{22} + return fileDescriptor_f41247b323a1ab2e, []int{24} } func (m *Keyspace) XXX_Unmarshal(b []byte) error { @@ -1032,7 +1119,7 @@ func (m *FindAllShardsInKeyspaceRequest) Reset() { *m = FindAllShardsInK func (m *FindAllShardsInKeyspaceRequest) String() string { return proto.CompactTextString(m) } func (*FindAllShardsInKeyspaceRequest) ProtoMessage() {} func (*FindAllShardsInKeyspaceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{23} + return fileDescriptor_f41247b323a1ab2e, []int{25} } func (m *FindAllShardsInKeyspaceRequest) XXX_Unmarshal(b []byte) error { @@ -1071,7 +1158,7 @@ func (m *FindAllShardsInKeyspaceResponse) Reset() { *m = FindAllShardsIn func (m *FindAllShardsInKeyspaceResponse) String() string { return proto.CompactTextString(m) } func (*FindAllShardsInKeyspaceResponse) ProtoMessage() {} func (*FindAllShardsInKeyspaceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{24} + return fileDescriptor_f41247b323a1ab2e, []int{26} } func (m *FindAllShardsInKeyspaceResponse) XXX_Unmarshal(b []byte) error { @@ -1112,7 +1199,7 @@ 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_f41247b323a1ab2e, []int{25} + return fileDescriptor_f41247b323a1ab2e, []int{27} } func (m *Shard) XXX_Unmarshal(b []byte) error { @@ -1172,7 +1259,7 @@ func (m *TableMaterializeSettings) Reset() { *m = TableMaterializeSettin func (m *TableMaterializeSettings) String() string { return proto.CompactTextString(m) } func (*TableMaterializeSettings) ProtoMessage() {} func (*TableMaterializeSettings) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{26} + return fileDescriptor_f41247b323a1ab2e, []int{28} } func (m *TableMaterializeSettings) XXX_Unmarshal(b []byte) error { @@ -1235,7 +1322,7 @@ func (m *MaterializeSettings) Reset() { *m = MaterializeSettings{} } func (m *MaterializeSettings) String() string { return proto.CompactTextString(m) } func (*MaterializeSettings) ProtoMessage() {} func (*MaterializeSettings) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{27} + return fileDescriptor_f41247b323a1ab2e, []int{29} } func (m *MaterializeSettings) XXX_Unmarshal(b []byte) error { @@ -1308,6 +1395,8 @@ func (m *MaterializeSettings) GetTabletTypes() string { func init() { proto.RegisterType((*ExecuteVtctlCommandRequest)(nil), "vtctldata.ExecuteVtctlCommandRequest") proto.RegisterType((*ExecuteVtctlCommandResponse)(nil), "vtctldata.ExecuteVtctlCommandResponse") + proto.RegisterType((*GetBackupsRequest)(nil), "vtctldata.GetBackupsRequest") + proto.RegisterType((*GetBackupsResponse)(nil), "vtctldata.GetBackupsResponse") proto.RegisterType((*GetCellInfoNamesRequest)(nil), "vtctldata.GetCellInfoNamesRequest") proto.RegisterType((*GetCellInfoNamesResponse)(nil), "vtctldata.GetCellInfoNamesResponse") proto.RegisterType((*GetCellInfoRequest)(nil), "vtctldata.GetCellInfoRequest") @@ -1341,77 +1430,80 @@ func init() { func init() { proto.RegisterFile("vtctldata.proto", fileDescriptor_f41247b323a1ab2e) } var fileDescriptor_f41247b323a1ab2e = []byte{ - // 1144 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x5b, 0x6f, 0x1b, 0x45, - 0x14, 0x96, 0x9d, 0xda, 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0x1f, 0xf3, 0xbe, 0xf9, 0xea, 0x8f, 0x78, 0x7f, 0x2a, - 0xcd, 0xcf, 0x73, 0x3f, 0x0f, 0xe4, 0xac, 0xae, 0x81, 0x4f, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, - 0xde, 0x21, 0xc4, 0x18, 0x79, 0x0b, 0x00, 0x00, + // 1193 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x5f, 0x6f, 0xdb, 0x36, + 0x10, 0x87, 0x9d, 0xda, 0x89, 0x2f, 0xb1, 0xe3, 0x2a, 0x49, 0xa3, 0x7a, 0x58, 0x97, 0xa9, 0x6b, + 0x6a, 0x74, 0x80, 0xdc, 0x75, 0xd8, 0x50, 0xec, 0x0f, 0xb0, 0x36, 0x71, 0x83, 0xac, 0x6b, 0x16, + 0x28, 0x41, 0x06, 0x6c, 0xc0, 0x04, 0x46, 0xa6, 0x5d, 0x21, 0xb4, 0xa8, 0x8a, 0xb4, 0x13, 0xf7, + 0x79, 0x2f, 0xfb, 0x32, 0x7b, 0xdc, 0xe3, 0x3e, 0xdb, 0x40, 0xf2, 0x28, 0xc9, 0xf9, 0xd3, 0x62, + 0xdd, 0x9b, 0xee, 0x77, 0x77, 0xbc, 0xbb, 0xdf, 0x1d, 0x79, 0x82, 0xd5, 0xa9, 0x8c, 0x24, 0x1b, + 0x10, 0x49, 0xfc, 0x34, 0xe3, 0x92, 0x3b, 0x8d, 0x1c, 0xe8, 0xdc, 0x1b, 0x71, 0x3e, 0x62, 0xb4, + 0xa7, 0x15, 0xa7, 0x93, 0x61, 0x6f, 0x30, 0xc9, 0x88, 0x8c, 0x79, 0x62, 0x4c, 0x3b, 0x4d, 0xc6, + 0x47, 0x13, 0x19, 0x33, 0x14, 0x5b, 0xe3, 0x99, 0x78, 0xc3, 0x22, 0x69, 0xe5, 0x4d, 0x49, 0x4e, + 0x19, 0x95, 0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, 0xcf, + 0x6d, 0xe9, 0x56, 0x76, 0x1e, 0xc2, 0x2a, 0xc6, 0x9f, 0x9b, 0xaa, 0x46, 0xd0, 0x32, 0x70, 0x3e, + 0x8b, 0x0f, 0x61, 0x15, 0x6b, 0xc9, 0x0d, 0x4d, 0x02, 0x2d, 0x03, 0xe7, 0x86, 0xdb, 0xb0, 0x2a, + 0x24, 0x4f, 0x43, 0x32, 0x94, 0x34, 0x0b, 0x23, 0x9e, 0xce, 0xf0, 0xce, 0x35, 0x15, 0xfc, 0x4c, + 0xa1, 0x3b, 0x3c, 0x9d, 0x39, 0x3f, 0x42, 0x0b, 0xf7, 0x0a, 0xe6, 0xe9, 0xd6, 0xf4, 0xf8, 0xdc, + 0x2f, 0xb5, 0xf3, 0x26, 0x66, 0x83, 0xa6, 0x59, 0x3d, 0xb6, 0x42, 0xbb, 0x0f, 0xea, 0xc5, 0x3e, + 0x30, 0xe4, 0xeb, 0x77, 0x43, 0xce, 0x52, 0x2a, 0xdc, 0x45, 0x4b, 0xbe, 0xc2, 0x8e, 0x15, 0xf4, + 0xbc, 0xfb, 0xeb, 0xf6, 0x34, 0x96, 0x54, 0x08, 0x3f, 0xe6, 0x3d, 0xf3, 0xd5, 0x1b, 0xf1, 0xde, + 0x54, 0x9a, 0x3f, 0xfb, 0x5e, 0x9e, 0xc8, 0x69, 0x5d, 0x03, 0x5f, 0xfe, 0x1b, 0x00, 0x00, 0xff, + 0xff, 0xd6, 0x12, 0x65, 0xa6, 0x16, 0x0c, 0x00, 0x00, } diff --git a/go/vt/proto/vtctlservice/vtctlservice.pb.go b/go/vt/proto/vtctlservice/vtctlservice.pb.go index 86f6bd31d38..620ef228e9c 100644 --- a/go/vt/proto/vtctlservice/vtctlservice.pb.go +++ b/go/vt/proto/vtctlservice/vtctlservice.pb.go @@ -29,32 +29,33 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("vtctlservice.proto", fileDescriptor_27055cdbb1148d2b) } var fileDescriptor_27055cdbb1148d2b = []byte{ - // 387 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x5f, 0x4f, 0xf2, 0x30, - 0x14, 0x87, 0xdf, 0xf7, 0x42, 0x8c, 0x15, 0x83, 0xa9, 0x17, 0x26, 0x28, 0xa8, 0x18, 0x4d, 0xd0, - 0x84, 0x19, 0xfc, 0x04, 0x48, 0x14, 0x09, 0x09, 0x51, 0x21, 0x5c, 0x90, 0x78, 0x51, 0xb6, 0xa3, - 0x2c, 0xd9, 0x1f, 0xd8, 0x29, 0x8b, 0x7c, 0x3b, 0x3f, 0x9a, 0x61, 0xa3, 0xa5, 0x94, 0x15, 0xbd, - 0x5b, 0xcf, 0xf3, 0x3b, 0x4f, 0x4f, 0x9a, 0xae, 0x84, 0xc6, 0xdc, 0xe6, 0x1e, 0x42, 0x14, 0xbb, - 0x36, 0xd4, 0x26, 0x51, 0xc8, 0x43, 0x9a, 0x57, 0x6b, 0xc5, 0x42, 0xb2, 0x72, 0x18, 0x67, 0x29, - 0xae, 0x4f, 0xc9, 0xce, 0x60, 0x51, 0xa2, 0x63, 0x72, 0xf4, 0xf8, 0x05, 0xf6, 0x8c, 0x43, 0xb2, - 0x6e, 0x86, 0xbe, 0xcf, 0x02, 0x87, 0x5e, 0xd5, 0x56, 0x1d, 0x19, 0xfc, 0x0d, 0xa6, 0x33, 0x40, - 0x5e, 0xbc, 0xfe, 0x2d, 0x86, 0x93, 0x30, 0x40, 0xa8, 0xfc, 0xbb, 0xfb, 0x5f, 0xff, 0xde, 0x25, - 0xb9, 0x04, 0x3a, 0x34, 0x22, 0xc7, 0x4f, 0x6e, 0xe0, 0x34, 0x3c, 0xaf, 0x37, 0x66, 0x91, 0x83, - 0xed, 0xa0, 0x03, 0x73, 0x9c, 0x30, 0x1b, 0x68, 0x55, 0x31, 0x1a, 0x32, 0x62, 0xf3, 0x9b, 0xb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37, 0xb4, 0xd2, 0x2f, 0xeb, 0x33, 0xb4, 0x62, 0x6e, 0x25, 0xaf, 0x8a, 0xa5, 0xbe, - 0x39, 0xa3, 0x5c, 0x52, 0xbb, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x59, 0x68, 0x09, 0x39, 0x9e, - 0x04, 0x00, 0x00, + // 405 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xdf, 0x4e, 0xc2, 0x30, + 0x14, 0x87, 0xf5, 0x42, 0xa2, 0x15, 0x83, 0xa9, 0x17, 0x26, 0x08, 0xa8, 0x18, 0x4d, 0xd0, 0x84, + 0x19, 0x7c, 0x02, 0x20, 0x8a, 0x84, 0x84, 0xa8, 0x10, 0x2e, 0x48, 0xbc, 0x28, 0xdb, 0x51, 0x16, + 0xf7, 0x8f, 0xb5, 0x2c, 0xf2, 0x10, 0xbe, 0xb3, 0x61, 0xa3, 0xa5, 0x2b, 0x2b, 0x7a, 0xc7, 0x7e, + 0xdf, 0x39, 0x5f, 0x4f, 0xd2, 0x43, 0x11, 0x8e, 0x98, 0xc9, 0x1c, 0x0a, 0x61, 0x64, 0x9b, 0x50, + 0x0f, 0x42, 0x9f, 0xf9, 0x38, 0x2f, 0x67, 0xc5, 0x42, 0xfc, 0x65, 0x11, 0x46, 0x12, 0xdc, 0x98, + 0xa1, 0xbd, 0xd1, 0x32, 0xc2, 0x53, 0x74, 0xf2, 0xf8, 0x0d, 0xe6, 0x9c, 0x41, 0xfc, 0xdd, 0xf6, + 0x5d, 0x97, 0x78, 0x16, 0xbe, 0xae, 0xaf, 0x3b, 0x32, 0xf8, 0x1b, 0xcc, 0xe6, 0x40, 0x59, 0xf1, + 0xe6, 0xaf, 0x32, 0x1a, 0xf8, 0x1e, 0x85, 0xea, 0xce, 0xfd, 0x6e, 0xe3, 0x67, 0x1f, 0xe5, 0x62, + 0x68, 0xe1, 0x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0xf2, 0x24, 0xde, 0x58, 0xf2, 0x55, + 0xac, 0x59, 0x72, 0x41, 0xe5, 0x25, 0xef, 0x7a, 0x36, 0x8b, 0xff, 0x53, 0x2f, 0xa1, 0xed, 0x92, + 0x70, 0x91, 0x5a, 0x72, 0x15, 0x66, 0x2d, 0xf9, 0x66, 0x0d, 0xd7, 0xb7, 0xee, 0xc6, 0xb5, 0xc8, + 0x66, 0x40, 0x69, 0xdd, 0xf6, 0x8d, 0xe4, 0x97, 0xf1, 0xe9, 0x1b, 0x11, 0x33, 0xe2, 0x27, 0xca, + 0x90, 0x1f, 0xb0, 0x49, 0x2e, 0xce, 0x1e, 0x7e, 0x03, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x26, 0xdd, + 0x4b, 0xeb, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -171,6 +172,8 @@ type VtctldClient interface { // FindAllShardsInKeyspace returns a map of shard names to shard references // for a given keyspace. FindAllShardsInKeyspace(ctx context.Context, in *vtctldata.FindAllShardsInKeyspaceRequest, opts ...grpc.CallOption) (*vtctldata.FindAllShardsInKeyspaceResponse, error) + // GetBackups returns all the backups for a shard. + GetBackups(ctx context.Context, in *vtctldata.GetBackupsRequest, opts ...grpc.CallOption) (*vtctldata.GetBackupsResponse, error) // GetCellInfoNames returns all the cells for which we have a CellInfo object, // meaning we have a topology service registered. GetCellInfoNames(ctx context.Context, in *vtctldata.GetCellInfoNamesRequest, opts ...grpc.CallOption) (*vtctldata.GetCellInfoNamesResponse, error) @@ -218,6 +221,15 @@ func (c *vtctldClient) FindAllShardsInKeyspace(ctx context.Context, in *vtctldat return out, nil } +func (c *vtctldClient) GetBackups(ctx context.Context, in *vtctldata.GetBackupsRequest, opts ...grpc.CallOption) (*vtctldata.GetBackupsResponse, error) { + out := new(vtctldata.GetBackupsResponse) + err := c.cc.Invoke(ctx, "/vtctlservice.Vtctld/GetBackups", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *vtctldClient) GetCellInfoNames(ctx context.Context, in *vtctldata.GetCellInfoNamesRequest, opts ...grpc.CallOption) (*vtctldata.GetCellInfoNamesResponse, error) { out := new(vtctldata.GetCellInfoNamesResponse) err := c.cc.Invoke(ctx, "/vtctlservice.Vtctld/GetCellInfoNames", in, out, opts...) @@ -313,6 +325,8 @@ type VtctldServer interface { // FindAllShardsInKeyspace returns a map of shard names to shard references // for a given keyspace. FindAllShardsInKeyspace(context.Context, *vtctldata.FindAllShardsInKeyspaceRequest) (*vtctldata.FindAllShardsInKeyspaceResponse, error) + // GetBackups returns all the backups for a shard. + GetBackups(context.Context, *vtctldata.GetBackupsRequest) (*vtctldata.GetBackupsResponse, error) // GetCellInfoNames returns all the cells for which we have a CellInfo object, // meaning we have a topology service registered. GetCellInfoNames(context.Context, *vtctldata.GetCellInfoNamesRequest) (*vtctldata.GetCellInfoNamesResponse, error) @@ -350,6 +364,9 @@ type UnimplementedVtctldServer struct { func (*UnimplementedVtctldServer) FindAllShardsInKeyspace(ctx context.Context, req *vtctldata.FindAllShardsInKeyspaceRequest) (*vtctldata.FindAllShardsInKeyspaceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindAllShardsInKeyspace not implemented") } +func (*UnimplementedVtctldServer) GetBackups(ctx context.Context, req *vtctldata.GetBackupsRequest) (*vtctldata.GetBackupsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBackups not implemented") +} func (*UnimplementedVtctldServer) GetCellInfoNames(ctx context.Context, req *vtctldata.GetCellInfoNamesRequest) (*vtctldata.GetCellInfoNamesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetCellInfoNames not implemented") } @@ -403,6 +420,24 @@ func _Vtctld_FindAllShardsInKeyspace_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _Vtctld_GetBackups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(vtctldata.GetBackupsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VtctldServer).GetBackups(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vtctlservice.Vtctld/GetBackups", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VtctldServer).GetBackups(ctx, req.(*vtctldata.GetBackupsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Vtctld_GetCellInfoNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(vtctldata.GetCellInfoNamesRequest) if err := dec(in); err != nil { @@ -591,6 +626,10 @@ var _Vtctld_serviceDesc = grpc.ServiceDesc{ MethodName: "FindAllShardsInKeyspace", Handler: _Vtctld_FindAllShardsInKeyspace_Handler, }, + { + MethodName: "GetBackups", + Handler: _Vtctld_GetBackups_Handler, + }, { MethodName: "GetCellInfoNames", Handler: _Vtctld_GetCellInfoNames_Handler, diff --git a/go/vt/vtctl/grpcvtctldclient/client_gen.go b/go/vt/vtctl/grpcvtctldclient/client_gen.go index 0743ed1e3c4..ec2fe75265f 100644 --- a/go/vt/vtctl/grpcvtctldclient/client_gen.go +++ b/go/vt/vtctl/grpcvtctldclient/client_gen.go @@ -37,6 +37,15 @@ func (client *gRPCVtctldClient) FindAllShardsInKeyspace(ctx context.Context, in return client.c.FindAllShardsInKeyspace(ctx, in, opts...) } +// GetBackups is part of the vtctlservicepb.VtctldClient interface. +func (client *gRPCVtctldClient) GetBackups(ctx context.Context, in *vtctldatapb.GetBackupsRequest, opts ...grpc.CallOption) (*vtctldatapb.GetBackupsResponse, error) { + if client.c == nil { + return nil, status.Error(codes.Unavailable, connClosedMsg) + } + + return client.c.GetBackups(ctx, in, opts...) +} + // GetCellInfo is part of the vtctlservicepb.VtctldClient interface. func (client *gRPCVtctldClient) GetCellInfo(ctx context.Context, in *vtctldatapb.GetCellInfoRequest, opts ...grpc.CallOption) (*vtctldatapb.GetCellInfoResponse, error) { if client.c == nil { diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index 57bd6026055..88f1e7de20e 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -81,6 +81,11 @@ func (s *VtctldServer) FindAllShardsInKeyspace(ctx context.Context, req *vtctlda }, nil } +// GetBackups is part of the vtctldservicepb.VtctldServer interface. +func (s *VtctldServer) GetBackups(ctx context.Context, req *vtctldatapb.GetBackupsRequest) (*vtctldatapb.GetBackupsResponse, error) { + panic("unimplemented!") +} + // GetCellInfoNames is part of the vtctlservicepb.VtctldServer interface. func (s *VtctldServer) GetCellInfoNames(ctx context.Context, req *vtctldatapb.GetCellInfoNamesRequest) (*vtctldatapb.GetCellInfoNamesResponse, error) { names, err := s.ts.GetCellInfoNames(ctx) diff --git a/proto/mysqlctl.proto b/proto/mysqlctl.proto index 274f82e74c6..adcd921d004 100644 --- a/proto/mysqlctl.proto +++ b/proto/mysqlctl.proto @@ -54,3 +54,9 @@ service MysqlCtl { rpc ReinitConfig(ReinitConfigRequest) returns (ReinitConfigResponse) {}; rpc RefreshConfig(RefreshConfigRequest) returns (RefreshConfigResponse) {}; } + +// BackupInfo is the read-only attributes of a mysqlctl/backupstorage.BackupHandle. +message BackupInfo { + string name = 1; + string directory = 2; +} diff --git a/proto/vtctldata.proto b/proto/vtctldata.proto index 1336d019130..8ba152d65a8 100644 --- a/proto/vtctldata.proto +++ b/proto/vtctldata.proto @@ -25,6 +25,7 @@ package vtctldata; import "google/protobuf/duration.proto"; import "logutil.proto"; +import "mysqlctl.proto"; import "tabletmanagerdata.proto"; import "topodata.proto"; import "vschema.proto"; @@ -41,6 +42,15 @@ message ExecuteVtctlCommandResponse { logutil.Event event = 1; } +message GetBackupsRequest { + string keyspace = 1; + string shard = 2; +} + +message GetBackupsResponse { + repeated mysqlctl.BackupInfo backups = 1; +} + message GetCellInfoNamesRequest { } diff --git a/proto/vtctlservice.proto b/proto/vtctlservice.proto index 6e659b922ea..549da5b9200 100644 --- a/proto/vtctlservice.proto +++ b/proto/vtctlservice.proto @@ -34,6 +34,8 @@ service Vtctld { // FindAllShardsInKeyspace returns a map of shard names to shard references // for a given keyspace. rpc FindAllShardsInKeyspace(vtctldata.FindAllShardsInKeyspaceRequest) returns (vtctldata.FindAllShardsInKeyspaceResponse) {}; + // GetBackups returns all the backups for a shard. + rpc GetBackups(vtctldata.GetBackupsRequest) returns (vtctldata.GetBackupsResponse) {}; // GetCellInfoNames returns all the cells for which we have a CellInfo object, // meaning we have a topology service registered. rpc GetCellInfoNames(vtctldata.GetCellInfoNamesRequest) returns (vtctldata.GetCellInfoNamesResponse) {}; From 23108b310d2dabeeefd7d6717e003ac8e8328621 Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Fri, 22 Jan 2021 21:36:46 -0500 Subject: [PATCH 2/5] Add utility package for working with mysqlctlpb types, similar to topoproto Signed-off-by: Andrew Mason --- go/vt/mysqlctl/mysqlctlproto/backup.go | 31 ++++++++++++++++++++++++++ go/vt/mysqlctl/mysqlctlproto/doc.go | 21 +++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 go/vt/mysqlctl/mysqlctlproto/backup.go create mode 100644 go/vt/mysqlctl/mysqlctlproto/doc.go diff --git a/go/vt/mysqlctl/mysqlctlproto/backup.go b/go/vt/mysqlctl/mysqlctlproto/backup.go new file mode 100644 index 00000000000..6fa2755b441 --- /dev/null +++ b/go/vt/mysqlctl/mysqlctlproto/backup.go @@ -0,0 +1,31 @@ +/* +Copyright 2021 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. +*/ + +package mysqlctlproto + +import ( + "vitess.io/vitess/go/vt/mysqlctl/backupstorage" + + mysqlctlpb "vitess.io/vitess/go/vt/proto/mysqlctl" +) + +// BackupHandleToProto returns a BackupInfo proto from a BackupHandle. +func BackupHandleToProto(bh backupstorage.BackupHandle) *mysqlctlpb.BackupInfo { + return &mysqlctlpb.BackupInfo{ + Name: bh.Name(), + Directory: bh.Directory(), + } +} diff --git a/go/vt/mysqlctl/mysqlctlproto/doc.go b/go/vt/mysqlctl/mysqlctlproto/doc.go new file mode 100644 index 00000000000..cf77ea853ff --- /dev/null +++ b/go/vt/mysqlctl/mysqlctlproto/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2021 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. +*/ + +/* +Package mysqlctlproto provides utility functions for working with data +structures in mysqlctl.proto. +*/ +package mysqlctlproto From cb75d841c212c848af8639f9e76b2ac2f368f10d Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Fri, 22 Jan 2021 21:37:26 -0500 Subject: [PATCH 3/5] Implement `GetBackups`, add testutil BackupStorage implementation, add tests Signed-off-by: Andrew Mason --- go/vt/vtctl/grpcvtctldserver/server.go | 27 +++++- go/vt/vtctl/grpcvtctldserver/server_test.go | 55 +++++++++++ .../testutil/test_backupstorage.go | 92 +++++++++++++++++++ 3 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 go/vt/vtctl/grpcvtctldserver/testutil/test_backupstorage.go diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index 88f1e7de20e..908b297a0ce 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -19,6 +19,7 @@ package grpcvtctldserver import ( "context" "fmt" + "path/filepath" "sync" "time" @@ -30,6 +31,8 @@ import ( "vitess.io/vitess/go/vt/concurrency" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/logutil" + "vitess.io/vitess/go/vt/mysqlctl/backupstorage" + "vitess.io/vitess/go/vt/mysqlctl/mysqlctlproto" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topo/topoproto" "vitess.io/vitess/go/vt/topotools" @@ -38,6 +41,7 @@ import ( "vitess.io/vitess/go/vt/vttablet/tmclient" logutilpb "vitess.io/vitess/go/vt/proto/logutil" + mysqlctlpb "vitess.io/vitess/go/vt/proto/mysqlctl" tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" @@ -83,7 +87,28 @@ func (s *VtctldServer) FindAllShardsInKeyspace(ctx context.Context, req *vtctlda // GetBackups is part of the vtctldservicepb.VtctldServer interface. func (s *VtctldServer) GetBackups(ctx context.Context, req *vtctldatapb.GetBackupsRequest) (*vtctldatapb.GetBackupsResponse, error) { - panic("unimplemented!") + bs, err := backupstorage.GetBackupStorage() + if err != nil { + return nil, err + } + + defer bs.Close() + + bucket := filepath.Join(req.Keyspace, req.Shard) + bhs, err := bs.ListBackups(ctx, bucket) + if err != nil { + return nil, err + } + + resp := &vtctldatapb.GetBackupsResponse{ + Backups: make([]*mysqlctlpb.BackupInfo, len(bhs)), + } + + for i, bh := range bhs { + resp.Backups[i] = mysqlctlproto.BackupHandleToProto(bh) + } + + return resp, nil } // GetCellInfoNames is part of the vtctlservicepb.VtctldServer interface. diff --git a/go/vt/vtctl/grpcvtctldserver/server_test.go b/go/vt/vtctl/grpcvtctldserver/server_test.go index cdc6003e80c..ad1b466e3cc 100644 --- a/go/vt/vtctl/grpcvtctldserver/server_test.go +++ b/go/vt/vtctl/grpcvtctldserver/server_test.go @@ -27,11 +27,13 @@ import ( "github.com/stretchr/testify/require" "vitess.io/vitess/go/vt/logutil" + "vitess.io/vitess/go/vt/mysqlctl/backupstorage" "vitess.io/vitess/go/vt/topo/memorytopo" "vitess.io/vitess/go/vt/topo/topoproto" "vitess.io/vitess/go/vt/vtctl/grpcvtctldserver/testutil" "vitess.io/vitess/go/vt/vttablet/tmclient" + mysqlctlpb "vitess.io/vitess/go/vt/proto/mysqlctl" querypb "vitess.io/vitess/go/vt/proto/query" tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" topodatapb "vitess.io/vitess/go/vt/proto/topodata" @@ -41,6 +43,7 @@ import ( func init() { *tmclient.TabletManagerProtocol = testutil.TabletManagerClientProtocol + *backupstorage.BackupStorageImplementation = testutil.BackupStorageImplementation } func TestFindAllShardsInKeyspace(t *testing.T) { @@ -82,6 +85,58 @@ func TestFindAllShardsInKeyspace(t *testing.T) { assert.Error(t, err) } +func TestGetBackups(t *testing.T) { + ctx := context.Background() + ts := memorytopo.NewServer() + vtctld := NewVtctldServer(ts) + + testutil.BackupStorage.Backups = map[string][]string{ + "testkeyspace/-": {"backup1", "backup2"}, + } + + expected := &vtctldatapb.GetBackupsResponse{ + Backups: []*mysqlctlpb.BackupInfo{ + { + Directory: "testkeyspace/-", + Name: "backup1", + }, + { + Directory: "testkeyspace/-", + Name: "backup2", + }, + }, + } + + resp, err := vtctld.GetBackups(ctx, &vtctldatapb.GetBackupsRequest{ + Keyspace: "testkeyspace", + Shard: "-", + }) + assert.NoError(t, err) + assert.Equal(t, expected, resp) + + t.Run("no backupstorage", func(t *testing.T) { + *backupstorage.BackupStorageImplementation = "doesnotexist" + defer func() { *backupstorage.BackupStorageImplementation = testutil.BackupStorageImplementation }() + + _, err := vtctld.GetBackups(ctx, &vtctldatapb.GetBackupsRequest{ + Keyspace: "testkeyspace", + Shard: "-", + }) + assert.Error(t, err) + }) + + t.Run("listbackups error", func(t *testing.T) { + testutil.BackupStorage.ListBackupsError = assert.AnError + defer func() { testutil.BackupStorage.ListBackupsError = nil }() + + _, err := vtctld.GetBackups(ctx, &vtctldatapb.GetBackupsRequest{ + Keyspace: "testkeyspace", + Shard: "-", + }) + assert.Error(t, err) + }) +} + func TestGetKeyspace(t *testing.T) { ctx := context.Background() ts := memorytopo.NewServer("cell1") diff --git a/go/vt/vtctl/grpcvtctldserver/testutil/test_backupstorage.go b/go/vt/vtctl/grpcvtctldserver/testutil/test_backupstorage.go new file mode 100644 index 00000000000..a871cbfdbf7 --- /dev/null +++ b/go/vt/vtctl/grpcvtctldserver/testutil/test_backupstorage.go @@ -0,0 +1,92 @@ +/* +Copyright 2021 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. +*/ + +package testutil + +import ( + "context" + "sort" + + "vitess.io/vitess/go/vt/mysqlctl/backupstorage" +) + +type backupStorage struct { + backupstorage.BackupStorage + + // Backups is a mapping of directory to list of backup names stored in that + // directory. + Backups map[string][]string + // ListBackupsError is returned from ListBackups when it is non-nil. + ListBackupsError error +} + +// ListBackups is part of the backupstorage.BackupStorage interface. +func (bs *backupStorage) ListBackups(ctx context.Context, dir string) ([]backupstorage.BackupHandle, error) { + if bs.ListBackupsError != nil { + return nil, bs.ListBackupsError + } + + handles := []backupstorage.BackupHandle{} + + for k, v := range bs.Backups { + if k == dir { + for _, name := range v { + handles = append(handles, &backupHandle{directory: k, name: name}) + } + } + } + + sort.Sort(handlesByName(handles)) + + return handles, nil +} + +// Close is part of the backupstorage.BackupStorage interface. +func (bs *backupStorage) Close() error { return nil } + +// backupHandle implements a subset of the backupstorage.backupHandle interface. +type backupHandle struct { + backupstorage.BackupHandle + + directory string + name string +} + +func (bh *backupHandle) Directory() string { return bh.directory } +func (bh *backupHandle) Name() string { return bh.name } + +// handlesByName implements the sort interface for backup handles by Name(). +type handlesByName []backupstorage.BackupHandle + +func (a handlesByName) Len() int { return len(a) } +func (a handlesByName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a handlesByName) Less(i, j int) bool { return a[i].Name() < a[j].Name() } + +// BackupStorageImplementation is the name this package registers its test +// backupstorage.BackupStorage implementation as. Users should set +// *backupstorage.BackupStorageImplementation to this value before use. +const BackupStorageImplementation = "grpcvtctldserver.testutil" + +// BackupStorage is the singleton test backupstorage.BackupStorage intastnce. It +// is public and singleton to allow tests to both mutate and assert against its +// state. +var BackupStorage = &backupStorage{ + Backups: map[string][]string{}, +} + +func init() { + backupstorage.BackupStorageMap[BackupStorageImplementation] = BackupStorage +} From 3c1a07570d9965daad333f2ef315056f405c4e76 Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Fri, 22 Jan 2021 21:39:09 -0500 Subject: [PATCH 4/5] Stop exporting the fake tmclient type The reason this should not be exported is that we want to enforce a singleton usage for these testutil implementations, and the best way to ensure that is to make it impossible for users to create a new instance by hiding the type away. Signed-off-by: Andrew Mason --- go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go b/go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go index facaaf4f5bc..938e71e9595 100644 --- a/go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go +++ b/go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go @@ -27,15 +27,15 @@ import ( topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) -// TestTabletManagerClient implements the tmclient.TabletManagerClient for +// tabletManagerClient implements the tmclient.TabletManagerClient for // testing. It allows users to mock various tmclient methods. -type TestTabletManagerClient struct { +type tabletManagerClient struct { tmclient.TabletManagerClient Schemas map[string]*tabletmanagerdatapb.SchemaDefinition } // GetSchema is part of the tmclient.TabletManagerClient interface. -func (c *TestTabletManagerClient) GetSchema(ctx context.Context, tablet *topodatapb.Tablet, tablets []string, excludeTables []string, includeViews bool) (*tabletmanagerdatapb.SchemaDefinition, error) { +func (c *tabletManagerClient) GetSchema(ctx context.Context, tablet *topodatapb.Tablet, tablets []string, excludeTables []string, includeViews bool) (*tabletmanagerdatapb.SchemaDefinition, error) { key := topoproto.TabletAliasString(tablet.Alias) schema, ok := c.Schemas[key] @@ -53,7 +53,7 @@ const TabletManagerClientProtocol = "grpcvtctldserver.testutil" // TabletManagerClient is the singleton test client instance. It is public and // singleton to allow tests to mutate and verify its state. -var TabletManagerClient = &TestTabletManagerClient{ +var TabletManagerClient = &tabletManagerClient{ Schemas: map[string]*tabletmanagerdatapb.SchemaDefinition{}, } From 9abe8e148c83735191e117eeea67239778f7f203 Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Fri, 22 Jan 2021 21:45:23 -0500 Subject: [PATCH 5/5] Implement GetBackups CLI Signed-off-by: Andrew Mason --- .../vtctldclient/internal/command/backups.go | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 go/cmd/vtctldclient/internal/command/backups.go diff --git a/go/cmd/vtctldclient/internal/command/backups.go b/go/cmd/vtctldclient/internal/command/backups.go new file mode 100644 index 00000000000..3b1fea947d2 --- /dev/null +++ b/go/cmd/vtctldclient/internal/command/backups.go @@ -0,0 +1,59 @@ +/* +Copyright 2021 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. +*/ + +package command + +import ( + "fmt" + "strings" + + "github.com/spf13/cobra" + + vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" +) + +// GetBackups makes a GetBackups gRPC call to a vtctld. +var GetBackups = &cobra.Command{ + Use: "GetBackups keyspace shard", + Args: cobra.ExactArgs(2), + RunE: commandGetBackups, +} + +func commandGetBackups(cmd *cobra.Command, args []string) error { + keyspace := cmd.Flags().Arg(0) + shard := cmd.Flags().Arg(1) + + resp, err := client.GetBackups(commandCtx, &vtctldatapb.GetBackupsRequest{ + Keyspace: keyspace, + Shard: shard, + }) + if err != nil { + return err + } + + names := make([]string, len(resp.Backups)) + for i, b := range resp.Backups { + names[i] = b.Name + } + + fmt.Printf("%s\n", strings.Join(names, "\n")) + + return nil +} + +func init() { + Root.AddCommand(GetBackups) +}