mysql

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const (
	SetValidDonorListSql = `SET GLOBAL clone_valid_donor_list = ?;`
	ExecCloneSql         = `CLONE INSTANCE FROM %s@'%s':%d IDENTIFIED BY '%s';`
)

Variables

View Source
var (
	Tool_name = map[int32]string{
		0: "Xtrabackup",
		1: "Meb",
	}
	Tool_value = map[string]int32{
		"Xtrabackup": 0,
		"Meb":        1,
	}
)

Enum value maps for Tool.

View Source
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.

View Source
var File_pkg_agent_app_mysql_pb_mysql_proto protoreflect.FileDescriptor
View Source
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) Enum

func (LogicalBackupMode) EnumDescriptor deprecated

func (LogicalBackupMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use LogicalBackupMode.Descriptor instead.

func (LogicalBackupMode) Number

func (LogicalBackupMode) String

func (x LogicalBackupMode) String() string

func (LogicalBackupMode) Type

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.

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
const (
	Tool_Xtrabackup Tool = 0
	Tool_Meb        Tool = 1
)

func (Tool) Descriptor added in v1.1.1

func (Tool) Descriptor() protoreflect.EnumDescriptor

func (Tool) Enum added in v1.1.1

func (x Tool) Enum() *Tool

func (Tool) EnumDescriptor deprecated added in v1.1.1

func (Tool) EnumDescriptor() ([]byte, []int)

Deprecated: Use Tool.Descriptor instead.

func (Tool) Number added in v1.1.1

func (x Tool) Number() protoreflect.EnumNumber

func (Tool) String added in v1.1.1

func (x Tool) String() string

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) GtidPurge

func (UnimplementedMysqlOperationServer) LogicalBackup

func (UnimplementedMysqlOperationServer) PhysicalBackup

func (UnimplementedMysqlOperationServer) Restore

func (UnimplementedMysqlOperationServer) SetVariable

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL