Versions in this module Expand all Collapse all v0 v0.7.1 Aug 16, 2018 Changes in this version + type BaseClient struct + func (baseClient *BaseClient) AddWaitMsg(msgID uint64, result *InvocationContext) + func (baseClient *BaseClient) Close() + func (baseClient *BaseClient) Closed() bool + func (baseClient *BaseClient) GetAddr() string + func (baseClient *BaseClient) GetWaitMsg(msgID uint64) *InvocationContext + func (baseClient *BaseClient) Open() error + func (baseClient *BaseClient) RemoveWaitMsg(msgID uint64) + func (baseClient *BaseClient) Send(req *Request, rsp *Response, timeout time.Duration) error + type ClientConnection struct + func (hwClientConn *ClientConnection) AsyncSendMsg(ctx *InvocationContext) error + func (hwClientConn *ClientConnection) Close() + func (hwClientConn *ClientConnection) Closed() bool + func (hwClientConn *ClientConnection) Hello() error + func (hwClientConn *ClientConnection) Open() error + func (hwClientConn *ClientConnection) PostMsg(req *Request) error + type ProtocolObject struct + FrHead highwayFrameHead + func (msgObj *ProtocolObject) DeSerializeFrame(rdBuf *bufio.Reader) error + func (msgObj *ProtocolObject) DeSerializeReq(req *Request) error + func (msgObj *ProtocolObject) DeSerializeRsp(rsp *Response) error + func (msgObj *ProtocolObject) ProtocolName() string + func (msgObj *ProtocolObject) SerializeHelloReq(wBuf *bufio.Writer) error + func (msgObj *ProtocolObject) SerializeLoginRap(msgID uint64, wBuf *bufio.Writer) error + func (msgObj *ProtocolObject) SerializeReq(req *Request, wBuf *bufio.Writer) + func (msgObj *ProtocolObject) SerializeRsp(rsp *Response, wBuf *bufio.Writer) + type Request struct + Arg interface{} + Attachments map[string]string + MethodName string + MsgID uint64 + MsgType int + Schema string + SvcName string + TwoWay bool + type Response struct + Attachments map[string]string + Err string + MsgID uint64 + MsgType int + Result interface{} + Status int v0.5.1 May 31, 2018 Changes in this version + const DefaultConnectTimeOut + const DefaultReadBufferSize + const DefaultSendTimeOut + const DefaultWriteBufferSize + const FrameHeadLen + const MagicLen + const Name + const Ok + const ServerError + func GenerateMsgID() uint64 + func NewHighwayClient(options client.Options) client.ProtocolClient + type ClientMgr struct + var CachedClients *ClientMgr + func (mgr *ClientMgr) GetClient(connParmas *ConnParams) (*HighwayBaseClient, error) + type ConnParams struct + Addr string + ConnNum int + TLSConfig *tls.Config + Timeout time.Duration + type HighWayProtocalObject struct + FrHead highwayFrameHead + func (msgObj *HighWayProtocalObject) DeSerializeFrame(rdBuf *bufio.Reader) error + func (msgObj *HighWayProtocalObject) DeSerializeReq(req *HighwayRequest) error + func (msgObj *HighWayProtocalObject) DeSerializeRsp(rsp *HighwayRespond) error + func (msgObj *HighWayProtocalObject) ProtocalName() string + func (msgObj *HighWayProtocalObject) SerializeHelloReq(wBuf *bufio.Writer) error + func (msgObj *HighWayProtocalObject) SerializeReq(req *HighwayRequest, wBuf *bufio.Writer) + func (msgObj *HighWayProtocalObject) SerializeRsp(rsp *HighwayRespond, wBuf *bufio.Writer) + func (msgObj *HighWayProtocalObject) SerializelLoginRsp(msgID uint64, wBuf *bufio.Writer) error + type HighwayBaseClient struct + func (baseClient *HighwayBaseClient) AddWaitMsg(msgID uint64, result *InvocationContext) + func (baseClient *HighwayBaseClient) Close() + func (baseClient *HighwayBaseClient) Closed() bool + func (baseClient *HighwayBaseClient) GetAddr() string + func (baseClient *HighwayBaseClient) GetWaitMsg(msgID uint64) *InvocationContext + func (baseClient *HighwayBaseClient) Open() error + func (baseClient *HighwayBaseClient) RemoveWaitMsg(msgID uint64) + func (baseClient *HighwayBaseClient) Send(req *HighwayRequest, rsp *HighwayRespond, timeout time.Duration) error + type HighwayClientConnection struct + func NewHighwayClientConnection(conn net.Conn, client *HighwayBaseClient) *HighwayClientConnection + func (hwClientConn *HighwayClientConnection) AsyncSendMsg(ctx *InvocationContext) error + func (hwClientConn *HighwayClientConnection) Close() + func (hwClientConn *HighwayClientConnection) Closed() bool + func (hwClientConn *HighwayClientConnection) Hello() error + func (hwClientConn *HighwayClientConnection) Open() error + func (hwClientConn *HighwayClientConnection) PostMsg(req *HighwayRequest) error + type HighwayRequest struct + Arg interface{} + Attachments map[string]string + MethodName string + MsgID uint64 + MsgType int + Schema string + SvcName string + TwoWay bool + type HighwayRespond struct + Attachments map[string]string + Err string + MsgID uint64 + MsgType int + Result interface{} + Status int + type InvocationContext struct + Req *HighwayRequest + Rsp *HighwayRespond + Wait *chan int + func (ctx *InvocationContext) Done()