Documentation ¶
Index ¶
- func CreateEvent(evType int32, content []byte) *pb.Event
- func CreateEventRequest(session *pb.Session, ev *pb.Event) *pb.EventReq
- func CreateMessageRequest(session *pb.Session, ev *pb.Event, to *pb.User) *pb.MessageReq
- func CreateRequest() *pb.Request
- func CreateRequestWithHead(head request.Head) *pb.Request
- func CreateResponse(recvAt, clientAt int64, seqId string, code int32, desc string) *pb.Response
- func CreateResponseWithHead(recvAt int64, req *pb.Request, code int32, desc string) *pb.Response
- func CreateSession(uid uint64, appId string, plat int32, token string) *pb.Session
- func CreateSessionRequest(session *pb.Session) *pb.SessionReq
- func ReturnResponse(rsp *pb.Response)
- func WithError(res *pb.Response, err error) *pb.Response
- type Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMessageRequest ¶
func CreateRequest ¶
func CreateResponse ¶
func CreateResponseWithHead ¶
func CreateSession ¶
func CreateSessionRequest ¶
func CreateSessionRequest(session *pb.Session) *pb.SessionReq
func ReturnResponse ¶
Types ¶
type Client ¶ added in v0.2.11
type Client interface { QueryOnline(addr string, req *pb.SessionReq) (bool, error) QueryAllOnline(addr string, req *pb.SessionReq) (bool, error) // SendMsgAll // 给所有人发消息 SendMsgAll(addr string, req *pb.MessageReq) (*pb.Response, error) // SendMsg // 发送消息 SendMsg(addr string, req *pb.MessageReq) (*pb.Response, error) // GetUserList // 获取本地用户列表 GetUserList(addr string, req *pb.EventReq) (*pb.CommonReply, error) // GetAllUserList // 获取机器用户列表 GetAllUserList(addr string, req *pb.EventReq) (*pb.CommonReply, error) }
Click to show internal directories.
Click to hide internal directories.