Versions in this module Expand all Collapse all v1 v1.3.0 Mar 22, 2018 Changes in this version + var ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") + type AccessToken interface + String func() string + Uid func() string + type AccessTokenMgr interface + QueryForHttp func(args RequestArgs) string + Verify func(accessToken string) (AccessToken, *tp.Rerror) + func DefaultAccessTokenMgr() AccessTokenMgr + type Business struct + func DefaultBusiness() *Business + func (biz *Business) Init() + type GwHosts struct + Http []string + Socket []string + func (*GwHosts) Descriptor() ([]byte, []int) + func (*GwHosts) ProtoMessage() + func (m *GwHosts) GetHttp() []string + func (m *GwHosts) GetSocket() []string + func (m *GwHosts) Marshal() (dAtA []byte, err error) + func (m *GwHosts) MarshalTo(dAtA []byte) (int, error) + func (m *GwHosts) Reset() + func (m *GwHosts) Size() (n int) + func (m *GwHosts) String() string + func (m *GwHosts) Unmarshal(dAtA []byte) error + type HttpHooks interface + OnRequest func(RequestArgs, ...AccessToken) ([]socket.PacketSetting, *tp.Rerror) + func DefaultHttpHooks() HttpHooks + type ProxyHooks interface + BeforePull func(uri string, args interface{}, reply interface{}, ...) *tp.Rerror + BeforePush func(uri string, args interface{}, setting ...socket.PacketSetting) *tp.Rerror + func DefaultProxyHooks() ProxyHooks + type RequestArgs interface + Cookie func(key string) string + Header func(key string) string + Query func(key string) string + type SocketHooks interface + GetSession func(peer tp.Peer, uid string) (tp.Session, *tp.Rerror) + OnLogoff func(tp.BaseSession) *tp.Rerror + OnLogon func(plugin.AuthSession, AccessToken) *tp.Rerror + PreWritePush func(tp.WriteCtx) *tp.Rerror + func DefaultSocketHooks() SocketHooks + type SocketPushArgs struct + Body []byte + BodyCodec int32 + Uid string + Uri string + func (*SocketPushArgs) Descriptor() ([]byte, []int) + func (*SocketPushArgs) ProtoMessage() + func (m *SocketPushArgs) GetBody() []byte + func (m *SocketPushArgs) GetBodyCodec() int32 + func (m *SocketPushArgs) GetUid() string + func (m *SocketPushArgs) GetUri() string + func (m *SocketPushArgs) Marshal() (dAtA []byte, err error) + func (m *SocketPushArgs) MarshalTo(dAtA []byte) (int, error) + func (m *SocketPushArgs) Reset() + func (m *SocketPushArgs) Size() (n int) + func (m *SocketPushArgs) String() string + func (m *SocketPushArgs) Unmarshal(dAtA []byte) error + type SocketPushReply = codec.PbEmpty + type SocketTotalArgs = codec.PbEmpty + type SocketTotalReply struct + ConnTotal int32 + func (*SocketTotalReply) Descriptor() ([]byte, []int) + func (*SocketTotalReply) ProtoMessage() + func (m *SocketTotalReply) GetConnTotal() int32 + func (m *SocketTotalReply) Marshal() (dAtA []byte, err error) + func (m *SocketTotalReply) MarshalTo(dAtA []byte) (int, error) + func (m *SocketTotalReply) Reset() + func (m *SocketTotalReply) Size() (n int) + func (m *SocketTotalReply) String() string + func (m *SocketTotalReply) Unmarshal(dAtA []byte) error Incompatible versions in this module v2.0.0+incompatible Jun 21, 2018