Documentation ¶
Index ¶
- func MockGetClient(t *testing.T, svrConn string) (*xrpc.Client, func())
- func MockWaitLeaderEggs(servers []*Server, leadernums int)
- type NodeRPC
- func (n *NodeRPC) AddIdleNodes(req *model.NodeRPCRequest, rsp *model.NodeRPCResponse) error
- func (n *NodeRPC) AddNodes(req *model.NodeRPCRequest, rsp *model.NodeRPCResponse) error
- func (n *NodeRPC) GetNodes(req *model.NodeRPCRequest, rsp *model.NodeRPCResponse) error
- func (n *NodeRPC) RemoveIdleNodes(req *model.NodeRPCRequest, rsp *model.NodeRPCResponse) error
- func (n *NodeRPC) RemoveNodes(req *model.NodeRPCRequest, rsp *model.NodeRPCResponse) error
- type RPCS
- type Server
- type ServerRPC
- type UserRPC
- func (u *UserRPC) ChangePasword(req *model.MysqlUserRPCRequest, rsp *model.MysqlUserRPCResponse) error
- func (u *UserRPC) CreateNormalUser(req *model.MysqlUserRPCRequest, rsp *model.MysqlUserRPCResponse) error
- func (u *UserRPC) CreateSuperUser(req *model.MysqlUserRPCRequest, rsp *model.MysqlUserRPCResponse) error
- func (u *UserRPC) CreateUserWithPrivileges(req *model.MysqlUserRPCRequest, rsp *model.MysqlUserRPCResponse) error
- func (u *UserRPC) DropUser(req *model.MysqlUserRPCRequest, rsp *model.MysqlUserRPCResponse) error
- func (u *UserRPC) GetUser(req *model.MysqlUserRPCRequest, rsp *model.MysqlUserRPCResponse) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockGetClient ¶
xrpc client
func MockWaitLeaderEggs ¶
wait the leader eggs when leadernums >0 if leadernums == 0, we just want to sleep for a heartbeat broadcast
Types ¶
type NodeRPC ¶
type NodeRPC struct {
// contains filtered or unexported fields
}
func (*NodeRPC) AddIdleNodes ¶
func (n *NodeRPC) AddIdleNodes(req *model.NodeRPCRequest, rsp *model.NodeRPCResponse) error
func (*NodeRPC) AddNodes ¶
func (n *NodeRPC) AddNodes(req *model.NodeRPCRequest, rsp *model.NodeRPCResponse) error
func (*NodeRPC) GetNodes ¶
func (n *NodeRPC) GetNodes(req *model.NodeRPCRequest, rsp *model.NodeRPCResponse) error
func (*NodeRPC) RemoveIdleNodes ¶
func (n *NodeRPC) RemoveIdleNodes(req *model.NodeRPCRequest, rsp *model.NodeRPCResponse) error
func (*NodeRPC) RemoveNodes ¶
func (n *NodeRPC) RemoveNodes(req *model.NodeRPCRequest, rsp *model.NodeRPCResponse) error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) GetNodeRPC ¶
func (*Server) GetServerRPC ¶
func (*Server) GetUserRPC ¶
type ServerRPC ¶
type ServerRPC struct {
// contains filtered or unexported fields
}
func (*ServerRPC) Ping ¶
func (s *ServerRPC) Ping(req *model.ServerRPCRequest, rsp *model.ServerRPCResponse) error
check the server connection whether OK
func (*ServerRPC) Status ¶
func (s *ServerRPC) Status(req *model.ServerRPCRequest, rsp *model.ServerRPCResponse) error
type UserRPC ¶
type UserRPC struct {
// contains filtered or unexported fields
}
func (*UserRPC) ChangePasword ¶
func (u *UserRPC) ChangePasword(req *model.MysqlUserRPCRequest, rsp *model.MysqlUserRPCResponse) error
change password
func (*UserRPC) CreateNormalUser ¶
func (u *UserRPC) CreateNormalUser(req *model.MysqlUserRPCRequest, rsp *model.MysqlUserRPCResponse) error
CreateNormalUser used to create a normal user.
func (*UserRPC) CreateSuperUser ¶
func (u *UserRPC) CreateSuperUser(req *model.MysqlUserRPCRequest, rsp *model.MysqlUserRPCResponse) error
CreateSuperUser used to create a admin user with all grants.
func (*UserRPC) CreateUserWithPrivileges ¶
func (u *UserRPC) CreateUserWithPrivileges(req *model.MysqlUserRPCRequest, rsp *model.MysqlUserRPCResponse) error
CreateUserWithPrivileges creates user with privileges. This is used to create normal user.
func (*UserRPC) DropUser ¶
func (u *UserRPC) DropUser(req *model.MysqlUserRPCRequest, rsp *model.MysqlUserRPCResponse) error
drop user
func (*UserRPC) GetUser ¶
func (u *UserRPC) GetUser(req *model.MysqlUserRPCRequest, rsp *model.MysqlUserRPCResponse) error
GetUser get mysql user list
Click to show internal directories.
Click to hide internal directories.