Documentation ¶
Index ¶
- func MustInitClientRPCSerivce(clientID, clientSecret string, event pb.Event, ...)
- func NewMasterCli() (pb.MasterClient, error)
- func RegistClientToMaster(recvStream pb.Master_ServerSendClient, event pb.Event, ...)
- func RunRPCClient(recvStream pb.Master_ServerSendClient, done chan bool, clientID string, ...)
- func StartRPCClient(client pb.MasterClient, done chan bool, clientID, clientSecret string, ...)
- type ClientRPC
- type ClientRPCHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustInitClientRPCSerivce ¶
func MustInitClientRPCSerivce( clientID, clientSecret string, event pb.Event, handerFunc func(req *pb.ServerMessage) *pb.ClientMessage, )
func NewMasterCli ¶
func NewMasterCli() (pb.MasterClient, error)
func RegistClientToMaster ¶
func RegistClientToMaster(recvStream pb.Master_ServerSendClient, event pb.Event, clientID, clientSecret string)
func RunRPCClient ¶
func RunRPCClient(recvStream pb.Master_ServerSendClient, done chan bool, clientID string, clientHandleServerSend func(req *pb.ServerMessage) *pb.ClientMessage)
func StartRPCClient ¶
func StartRPCClient(client pb.MasterClient, done chan bool, clientID, clientSecret string, event pb.Event, clientHandleServerSend func(req *pb.ServerMessage) *pb.ClientMessage)
Types ¶
type ClientRPC ¶
type ClientRPC struct {
// contains filtered or unexported fields
}
func NewClientRPCHandler ¶
func NewClientRPCHandler( clientID, clientSecret string, event pb.Event, handerFunc func(req *pb.ServerMessage) *pb.ClientMessage, ) *ClientRPC
func (*ClientRPC) GetCli ¶
func (s *ClientRPC) GetCli() pb.MasterClient
type ClientRPCHandler ¶
type ClientRPCHandler interface { Run() Stop() GetCli() pb.MasterClient }
func GetClientRPCSerivce ¶
func GetClientRPCSerivce() ClientRPCHandler
Click to show internal directories.
Click to hide internal directories.