Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterMysqlOperationServer(s grpc.ServiceRegistrar, srv MysqlOperationServer)
- func RegistryGrpcApp()
- type CloneRequest
- func (*CloneRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CloneRequest) GetSourceCloneUser() string
- func (x *CloneRequest) GetSourceHost() string
- func (x *CloneRequest) GetSourcePort() int64
- func (x *CloneRequest) GetUsername() string
- func (*CloneRequest) ProtoMessage()
- func (x *CloneRequest) ProtoReflect() protoreflect.Message
- func (x *CloneRequest) Reset()
- func (x *CloneRequest) String() string
- type GtidPurgeRequest
- type LogicalBackupMode
- func (LogicalBackupMode) Descriptor() protoreflect.EnumDescriptor
- func (x LogicalBackupMode) Enum() *LogicalBackupMode
- func (LogicalBackupMode) EnumDescriptor() ([]byte, []int)deprecated
- func (x LogicalBackupMode) Number() protoreflect.EnumNumber
- func (x LogicalBackupMode) String() string
- func (LogicalBackupMode) Type() protoreflect.EnumType
- type LogicalBackupRequest
- func (*LogicalBackupRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LogicalBackupRequest) GetBackupFile() string
- func (x *LogicalBackupRequest) GetDatabase() string
- func (x *LogicalBackupRequest) GetLogicalBackupMode() LogicalBackupMode
- func (x *LogicalBackupRequest) GetObjectStorage() *common.ObjectStorage
- func (x *LogicalBackupRequest) GetTable() string
- func (x *LogicalBackupRequest) GetUsername() string
- func (*LogicalBackupRequest) ProtoMessage()
- func (x *LogicalBackupRequest) ProtoReflect() protoreflect.Message
- func (x *LogicalBackupRequest) Reset()
- func (x *LogicalBackupRequest) String() string
- type MysqlOperationClient
- type MysqlOperationServer
- type PhysicalBackupRequest
- func (*PhysicalBackupRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PhysicalBackupRequest) GetBackupFile() string
- func (x *PhysicalBackupRequest) GetObjectStorage() *common.ObjectStorage
- func (x *PhysicalBackupRequest) GetTool() Tool
- func (x *PhysicalBackupRequest) GetUsername() string
- func (*PhysicalBackupRequest) ProtoMessage()
- func (x *PhysicalBackupRequest) ProtoReflect() protoreflect.Message
- func (x *PhysicalBackupRequest) Reset()
- func (x *PhysicalBackupRequest) String() string
- type RestoreRequest
- func (*RestoreRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RestoreRequest) GetBackupFile() string
- func (x *RestoreRequest) GetObjectStorage() *common.ObjectStorage
- func (x *RestoreRequest) GetTool() Tool
- func (*RestoreRequest) ProtoMessage()
- func (x *RestoreRequest) ProtoReflect() protoreflect.Message
- func (x *RestoreRequest) Reset()
- func (x *RestoreRequest) String() string
- type SetVariableRequest
- func (*SetVariableRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetVariableRequest) GetKey() string
- func (x *SetVariableRequest) GetUsername() string
- func (x *SetVariableRequest) GetValue() string
- func (*SetVariableRequest) ProtoMessage()
- func (x *SetVariableRequest) ProtoReflect() protoreflect.Message
- func (x *SetVariableRequest) Reset()
- func (x *SetVariableRequest) String() string
- type Tool
- type UnimplementedMysqlOperationServer
- func (UnimplementedMysqlOperationServer) Clone(context.Context, *CloneRequest) (*common.Empty, error)
- func (UnimplementedMysqlOperationServer) GtidPurge(context.Context, *GtidPurgeRequest) (*common.Empty, error)
- func (UnimplementedMysqlOperationServer) LogicalBackup(context.Context, *LogicalBackupRequest) (*common.Empty, error)
- func (UnimplementedMysqlOperationServer) PhysicalBackup(context.Context, *PhysicalBackupRequest) (*common.Empty, error)
- func (UnimplementedMysqlOperationServer) Restore(context.Context, *RestoreRequest) (*common.Empty, error)
- func (UnimplementedMysqlOperationServer) SetVariable(context.Context, *SetVariableRequest) (*common.Empty, error)
- type UnsafeMysqlOperationServer
Constants ¶
const ( MysqlOperation_Clone_FullMethodName = "/mysql.MysqlOperation/Clone" MysqlOperation_PhysicalBackup_FullMethodName = "/mysql.MysqlOperation/PhysicalBackup" MysqlOperation_LogicalBackup_FullMethodName = "/mysql.MysqlOperation/LogicalBackup" MysqlOperation_Restore_FullMethodName = "/mysql.MysqlOperation/Restore" MysqlOperation_GtidPurge_FullMethodName = "/mysql.MysqlOperation/GtidPurge" MysqlOperation_SetVariable_FullMethodName = "/mysql.MysqlOperation/SetVariable" )
const ( SetValidDonorListSql = `SET GLOBAL clone_valid_donor_list = ?;` ExecCloneSql = `CLONE INSTANCE FROM %s@'%s':%d IDENTIFIED BY '%s';` )
Variables ¶
var ( Tool_name = map[int32]string{ 0: "Xtrabackup", 1: "Meb", } Tool_value = map[string]int32{ "Xtrabackup": 0, "Meb": 1, } )
Enum value maps for Tool.
var ( LogicalBackupMode_name = map[int32]string{ 0: "Full", 1: "Database", 2: "Table", } LogicalBackupMode_value = map[string]int32{ "Full": 0, "Database": 1, "Table": 2, } )
Enum value maps for LogicalBackupMode.
var File_pkg_agent_app_mysql_pb_mysql_proto protoreflect.FileDescriptor
var MysqlOperation_ServiceDesc = grpc.ServiceDesc{ ServiceName: "mysql.MysqlOperation", HandlerType: (*MysqlOperationServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Clone", Handler: _MysqlOperation_Clone_Handler, }, { MethodName: "PhysicalBackup", Handler: _MysqlOperation_PhysicalBackup_Handler, }, { MethodName: "LogicalBackup", Handler: _MysqlOperation_LogicalBackup_Handler, }, { MethodName: "Restore", Handler: _MysqlOperation_Restore_Handler, }, { MethodName: "GtidPurge", Handler: _MysqlOperation_GtidPurge_Handler, }, { MethodName: "SetVariable", Handler: _MysqlOperation_SetVariable_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/agent/app/mysql/pb/mysql.proto", }
MysqlOperation_ServiceDesc is the grpc.ServiceDesc for MysqlOperation service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMysqlOperationServer ¶
func RegisterMysqlOperationServer(s grpc.ServiceRegistrar, srv MysqlOperationServer)
func RegistryGrpcApp ¶
func RegistryGrpcApp()
Types ¶
type CloneRequest ¶
type CloneRequest struct {
SourceCloneUser string `protobuf:"bytes,1,opt,name=source_clone_user,json=sourceCloneUser,proto3" json:"source_clone_user,omitempty"`
SourceHost string `protobuf:"bytes,2,opt,name=source_host,json=sourceHost,proto3" json:"source_host,omitempty"`
SourcePort int64 `protobuf:"varint,3,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"`
Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
// contains filtered or unexported fields
}
func (*CloneRequest) Descriptor
deprecated
func (*CloneRequest) Descriptor() ([]byte, []int)
Deprecated: Use CloneRequest.ProtoReflect.Descriptor instead.
func (*CloneRequest) GetSourceCloneUser ¶
func (x *CloneRequest) GetSourceCloneUser() string
func (*CloneRequest) GetSourceHost ¶
func (x *CloneRequest) GetSourceHost() string
func (*CloneRequest) GetSourcePort ¶
func (x *CloneRequest) GetSourcePort() int64
func (*CloneRequest) GetUsername ¶
func (x *CloneRequest) GetUsername() string
func (*CloneRequest) ProtoMessage ¶
func (*CloneRequest) ProtoMessage()
func (*CloneRequest) ProtoReflect ¶
func (x *CloneRequest) ProtoReflect() protoreflect.Message
func (*CloneRequest) Reset ¶
func (x *CloneRequest) Reset()
func (*CloneRequest) String ¶
func (x *CloneRequest) String() string
type GtidPurgeRequest ¶
type GtidPurgeRequest struct {
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
// contains filtered or unexported fields
}
func (*GtidPurgeRequest) Descriptor
deprecated
func (*GtidPurgeRequest) Descriptor() ([]byte, []int)
Deprecated: Use GtidPurgeRequest.ProtoReflect.Descriptor instead.
func (*GtidPurgeRequest) GetUsername ¶
func (x *GtidPurgeRequest) GetUsername() string
func (*GtidPurgeRequest) ProtoMessage ¶
func (*GtidPurgeRequest) ProtoMessage()
func (*GtidPurgeRequest) ProtoReflect ¶
func (x *GtidPurgeRequest) ProtoReflect() protoreflect.Message
func (*GtidPurgeRequest) Reset ¶
func (x *GtidPurgeRequest) Reset()
func (*GtidPurgeRequest) String ¶
func (x *GtidPurgeRequest) String() string
type LogicalBackupMode ¶
type LogicalBackupMode int32
const ( LogicalBackupMode_Full LogicalBackupMode = 0 LogicalBackupMode_Database LogicalBackupMode = 1 LogicalBackupMode_Table LogicalBackupMode = 2 )
func (LogicalBackupMode) Descriptor ¶
func (LogicalBackupMode) Descriptor() protoreflect.EnumDescriptor
func (LogicalBackupMode) Enum ¶
func (x LogicalBackupMode) Enum() *LogicalBackupMode
func (LogicalBackupMode) EnumDescriptor
deprecated
func (LogicalBackupMode) EnumDescriptor() ([]byte, []int)
Deprecated: Use LogicalBackupMode.Descriptor instead.
func (LogicalBackupMode) Number ¶
func (x LogicalBackupMode) Number() protoreflect.EnumNumber
func (LogicalBackupMode) String ¶
func (x LogicalBackupMode) String() string
func (LogicalBackupMode) Type ¶
func (LogicalBackupMode) Type() protoreflect.EnumType
type LogicalBackupRequest ¶
type LogicalBackupRequest struct {
BackupFile string `protobuf:"bytes,1,opt,name=backup_file,json=backupFile,proto3" json:"backup_file,omitempty"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
Database string `protobuf:"bytes,3,opt,name=database,proto3" json:"database,omitempty"`
Table string `protobuf:"bytes,4,opt,name=table,proto3" json:"table,omitempty"`
LogicalBackupMode LogicalBackupMode `` /* 144-byte string literal not displayed */
ObjectStorage *common.ObjectStorage `protobuf:"bytes,6,opt,name=object_storage,json=objectStorage,proto3" json:"object_storage,omitempty"`
// contains filtered or unexported fields
}
func (*LogicalBackupRequest) Descriptor
deprecated
func (*LogicalBackupRequest) Descriptor() ([]byte, []int)
Deprecated: Use LogicalBackupRequest.ProtoReflect.Descriptor instead.
func (*LogicalBackupRequest) GetBackupFile ¶
func (x *LogicalBackupRequest) GetBackupFile() string
func (*LogicalBackupRequest) GetDatabase ¶
func (x *LogicalBackupRequest) GetDatabase() string
func (*LogicalBackupRequest) GetLogicalBackupMode ¶
func (x *LogicalBackupRequest) GetLogicalBackupMode() LogicalBackupMode
func (*LogicalBackupRequest) GetObjectStorage ¶ added in v1.1.1
func (x *LogicalBackupRequest) GetObjectStorage() *common.ObjectStorage
func (*LogicalBackupRequest) GetTable ¶
func (x *LogicalBackupRequest) GetTable() string
func (*LogicalBackupRequest) GetUsername ¶
func (x *LogicalBackupRequest) GetUsername() string
func (*LogicalBackupRequest) ProtoMessage ¶
func (*LogicalBackupRequest) ProtoMessage()
func (*LogicalBackupRequest) ProtoReflect ¶
func (x *LogicalBackupRequest) ProtoReflect() protoreflect.Message
func (*LogicalBackupRequest) Reset ¶
func (x *LogicalBackupRequest) Reset()
func (*LogicalBackupRequest) String ¶
func (x *LogicalBackupRequest) String() string
type MysqlOperationClient ¶
type MysqlOperationClient interface {
Clone(ctx context.Context, in *CloneRequest, opts ...grpc.CallOption) (*common.Empty, error)
PhysicalBackup(ctx context.Context, in *PhysicalBackupRequest, opts ...grpc.CallOption) (*common.Empty, error)
LogicalBackup(ctx context.Context, in *LogicalBackupRequest, opts ...grpc.CallOption) (*common.Empty, error)
Restore(ctx context.Context, in *RestoreRequest, opts ...grpc.CallOption) (*common.Empty, error)
GtidPurge(ctx context.Context, in *GtidPurgeRequest, opts ...grpc.CallOption) (*common.Empty, error)
SetVariable(ctx context.Context, in *SetVariableRequest, opts ...grpc.CallOption) (*common.Empty, error)
}
MysqlOperationClient is the client API for MysqlOperation service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewMysqlOperationClient ¶
func NewMysqlOperationClient(cc grpc.ClientConnInterface) MysqlOperationClient
type MysqlOperationServer ¶
type MysqlOperationServer interface {
Clone(context.Context, *CloneRequest) (*common.Empty, error)
PhysicalBackup(context.Context, *PhysicalBackupRequest) (*common.Empty, error)
LogicalBackup(context.Context, *LogicalBackupRequest) (*common.Empty, error)
Restore(context.Context, *RestoreRequest) (*common.Empty, error)
GtidPurge(context.Context, *GtidPurgeRequest) (*common.Empty, error)
SetVariable(context.Context, *SetVariableRequest) (*common.Empty, error)
// contains filtered or unexported methods
}
MysqlOperationServer is the server API for MysqlOperation service. All implementations must embed UnimplementedMysqlOperationServer for forward compatibility.
type PhysicalBackupRequest ¶
type PhysicalBackupRequest struct {
BackupFile string `protobuf:"bytes,1,opt,name=backup_file,json=backupFile,proto3" json:"backup_file,omitempty"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
Tool Tool `protobuf:"varint,3,opt,name=tool,proto3,enum=mysql.Tool" json:"tool,omitempty"`
ObjectStorage *common.ObjectStorage `protobuf:"bytes,4,opt,name=object_storage,json=objectStorage,proto3" json:"object_storage,omitempty"`
// contains filtered or unexported fields
}
func (*PhysicalBackupRequest) Descriptor
deprecated
func (*PhysicalBackupRequest) Descriptor() ([]byte, []int)
Deprecated: Use PhysicalBackupRequest.ProtoReflect.Descriptor instead.
func (*PhysicalBackupRequest) GetBackupFile ¶
func (x *PhysicalBackupRequest) GetBackupFile() string
func (*PhysicalBackupRequest) GetObjectStorage ¶ added in v1.1.1
func (x *PhysicalBackupRequest) GetObjectStorage() *common.ObjectStorage
func (*PhysicalBackupRequest) GetTool ¶ added in v1.1.1
func (x *PhysicalBackupRequest) GetTool() Tool
func (*PhysicalBackupRequest) GetUsername ¶
func (x *PhysicalBackupRequest) GetUsername() string
func (*PhysicalBackupRequest) ProtoMessage ¶
func (*PhysicalBackupRequest) ProtoMessage()
func (*PhysicalBackupRequest) ProtoReflect ¶
func (x *PhysicalBackupRequest) ProtoReflect() protoreflect.Message
func (*PhysicalBackupRequest) Reset ¶
func (x *PhysicalBackupRequest) Reset()
func (*PhysicalBackupRequest) String ¶
func (x *PhysicalBackupRequest) String() string
type RestoreRequest ¶
type RestoreRequest struct {
BackupFile string `protobuf:"bytes,1,opt,name=backup_file,json=backupFile,proto3" json:"backup_file,omitempty"`
Tool Tool `protobuf:"varint,2,opt,name=tool,proto3,enum=mysql.Tool" json:"tool,omitempty"`
ObjectStorage *common.ObjectStorage `protobuf:"bytes,3,opt,name=object_storage,json=objectStorage,proto3" json:"object_storage,omitempty"`
// contains filtered or unexported fields
}
func (*RestoreRequest) Descriptor
deprecated
func (*RestoreRequest) Descriptor() ([]byte, []int)
Deprecated: Use RestoreRequest.ProtoReflect.Descriptor instead.
func (*RestoreRequest) GetBackupFile ¶
func (x *RestoreRequest) GetBackupFile() string
func (*RestoreRequest) GetObjectStorage ¶ added in v1.1.1
func (x *RestoreRequest) GetObjectStorage() *common.ObjectStorage
func (*RestoreRequest) GetTool ¶ added in v1.1.1
func (x *RestoreRequest) GetTool() Tool
func (*RestoreRequest) ProtoMessage ¶
func (*RestoreRequest) ProtoMessage()
func (*RestoreRequest) ProtoReflect ¶
func (x *RestoreRequest) ProtoReflect() protoreflect.Message
func (*RestoreRequest) Reset ¶
func (x *RestoreRequest) Reset()
func (*RestoreRequest) String ¶
func (x *RestoreRequest) String() string
type SetVariableRequest ¶
type SetVariableRequest struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
// contains filtered or unexported fields
}
func (*SetVariableRequest) Descriptor
deprecated
func (*SetVariableRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetVariableRequest.ProtoReflect.Descriptor instead.
func (*SetVariableRequest) GetKey ¶
func (x *SetVariableRequest) GetKey() string
func (*SetVariableRequest) GetUsername ¶
func (x *SetVariableRequest) GetUsername() string
func (*SetVariableRequest) GetValue ¶
func (x *SetVariableRequest) GetValue() string
func (*SetVariableRequest) ProtoMessage ¶
func (*SetVariableRequest) ProtoMessage()
func (*SetVariableRequest) ProtoReflect ¶
func (x *SetVariableRequest) ProtoReflect() protoreflect.Message
func (*SetVariableRequest) Reset ¶
func (x *SetVariableRequest) Reset()
func (*SetVariableRequest) String ¶
func (x *SetVariableRequest) String() string
type Tool ¶ added in v1.1.1
type Tool int32
func (Tool) Descriptor ¶ added in v1.1.1
func (Tool) Descriptor() protoreflect.EnumDescriptor
func (Tool) EnumDescriptor
deprecated
added in
v1.1.1
func (Tool) Number ¶ added in v1.1.1
func (x Tool) Number() protoreflect.EnumNumber
func (Tool) Type ¶ added in v1.1.1
func (Tool) Type() protoreflect.EnumType
type UnimplementedMysqlOperationServer ¶
type UnimplementedMysqlOperationServer struct{}
UnimplementedMysqlOperationServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedMysqlOperationServer) Clone ¶
func (UnimplementedMysqlOperationServer) Clone(context.Context, *CloneRequest) (*common.Empty, error)
func (UnimplementedMysqlOperationServer) GtidPurge ¶
func (UnimplementedMysqlOperationServer) GtidPurge(context.Context, *GtidPurgeRequest) (*common.Empty, error)
func (UnimplementedMysqlOperationServer) LogicalBackup ¶
func (UnimplementedMysqlOperationServer) LogicalBackup(context.Context, *LogicalBackupRequest) (*common.Empty, error)
func (UnimplementedMysqlOperationServer) PhysicalBackup ¶
func (UnimplementedMysqlOperationServer) PhysicalBackup(context.Context, *PhysicalBackupRequest) (*common.Empty, error)
func (UnimplementedMysqlOperationServer) Restore ¶
func (UnimplementedMysqlOperationServer) Restore(context.Context, *RestoreRequest) (*common.Empty, error)
func (UnimplementedMysqlOperationServer) SetVariable ¶
func (UnimplementedMysqlOperationServer) SetVariable(context.Context, *SetVariableRequest) (*common.Empty, error)
type UnsafeMysqlOperationServer ¶
type UnsafeMysqlOperationServer interface {
// contains filtered or unexported methods
}
UnsafeMysqlOperationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MysqlOperationServer will result in compilation errors.