Documentation ¶
Index ¶
- Variables
- func RegisterAgentServer(s grpc.ServiceRegistrar, srv AgentServer)
- type AgentClient
- type AgentServer
- type CloneRequest
- func (*CloneRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CloneRequest) GetHost() string
- func (x *CloneRequest) GetInitPassword() string
- func (x *CloneRequest) GetInitUser() string
- func (x *CloneRequest) GetPassword() string
- func (x *CloneRequest) GetPort() int32
- func (x *CloneRequest) GetUser() string
- func (*CloneRequest) ProtoMessage()
- func (x *CloneRequest) ProtoReflect() protoreflect.Message
- func (x *CloneRequest) Reset()
- func (x *CloneRequest) String() string
- type CloneResponse
- type UnimplementedAgentServer
- type UnsafeAgentServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_agentrpc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAgentServer ¶
func RegisterAgentServer(s grpc.ServiceRegistrar, srv AgentServer)
Types ¶
type AgentClient ¶
type AgentClient interface { // Clone invokes MySQL CLONE command initializes the cloned database for MOCO. // It does _not_ start the replication (START REPLICA). Actually, it works as follows. // // 1. Configure `clone_donor_valid_list` global variable to allow the donor instance. // // 2. Invoke `CLONE INSTANCE` with `user` and `password` in the CloneRequest. // // 3. Initialize the database for MOCO using `init_user` and `init_password`. // // For 2, the user must have BACKUP_ADMIN and REPLICATION SLAVE privilege. // For 3, the init_user must have ALL privilege with GRANT OPTION. // The init_user is used only via UNIX domain socket, so its host can be `localhost`. // // The donor database should have prepared these two users beforehand. Clone(ctx context.Context, in *CloneRequest, opts ...grpc.CallOption) (*CloneResponse, error) }
AgentClient is the client API for Agent 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 NewAgentClient ¶
func NewAgentClient(cc grpc.ClientConnInterface) AgentClient
type AgentServer ¶
type AgentServer interface { // Clone invokes MySQL CLONE command initializes the cloned database for MOCO. // It does _not_ start the replication (START REPLICA). Actually, it works as follows. // // 1. Configure `clone_donor_valid_list` global variable to allow the donor instance. // // 2. Invoke `CLONE INSTANCE` with `user` and `password` in the CloneRequest. // // 3. Initialize the database for MOCO using `init_user` and `init_password`. // // For 2, the user must have BACKUP_ADMIN and REPLICATION SLAVE privilege. // For 3, the init_user must have ALL privilege with GRANT OPTION. // The init_user is used only via UNIX domain socket, so its host can be `localhost`. // // The donor database should have prepared these two users beforehand. Clone(context.Context, *CloneRequest) (*CloneResponse, error) // contains filtered or unexported methods }
AgentServer is the server API for Agent service. All implementations must embed UnimplementedAgentServer for forward compatibility
type CloneRequest ¶
type CloneRequest struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // host is the donor host in the own cluster Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` // port is the port number where the donor host User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` // user is the MySQL user who has BACKUP_ADMIN privilege in the donor host. Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` // password for the above user. InitUser string `protobuf:"bytes,5,opt,name=init_user,json=initUser,proto3" json:"init_user,omitempty"` // localhost user to initialize cloned database for MOCO. InitPassword string `protobuf:"bytes,6,opt,name=init_password,json=initPassword,proto3" json:"init_password,omitempty"` // password for init_user. // contains filtered or unexported fields }
* CloneRequest is the request message to invoke MySQL CLONE command.
func (*CloneRequest) Descriptor
deprecated
func (*CloneRequest) Descriptor() ([]byte, []int)
Deprecated: Use CloneRequest.ProtoReflect.Descriptor instead.
func (*CloneRequest) GetHost ¶
func (x *CloneRequest) GetHost() string
func (*CloneRequest) GetInitPassword ¶
func (x *CloneRequest) GetInitPassword() string
func (*CloneRequest) GetInitUser ¶
func (x *CloneRequest) GetInitUser() string
func (*CloneRequest) GetPassword ¶
func (x *CloneRequest) GetPassword() string
func (*CloneRequest) GetPort ¶
func (x *CloneRequest) GetPort() int32
func (*CloneRequest) GetUser ¶
func (x *CloneRequest) GetUser() 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 CloneResponse ¶
type CloneResponse struct {
// contains filtered or unexported fields
}
* CloneResponse is the response message of Clone.
func (*CloneResponse) Descriptor
deprecated
func (*CloneResponse) Descriptor() ([]byte, []int)
Deprecated: Use CloneResponse.ProtoReflect.Descriptor instead.
func (*CloneResponse) ProtoMessage ¶
func (*CloneResponse) ProtoMessage()
func (*CloneResponse) ProtoReflect ¶
func (x *CloneResponse) ProtoReflect() protoreflect.Message
func (*CloneResponse) Reset ¶
func (x *CloneResponse) Reset()
func (*CloneResponse) String ¶
func (x *CloneResponse) String() string
type UnimplementedAgentServer ¶
type UnimplementedAgentServer struct { }
UnimplementedAgentServer must be embedded to have forward compatible implementations.
func (UnimplementedAgentServer) Clone ¶
func (UnimplementedAgentServer) Clone(context.Context, *CloneRequest) (*CloneResponse, error)
type UnsafeAgentServer ¶
type UnsafeAgentServer interface {
// contains filtered or unexported methods
}
UnsafeAgentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentServer will result in compilation errors.