Versions in this module Expand all Collapse all v1 v1.6.7 Feb 27, 2018 Changes in this version + var RPC_PARAM_ProtocolMarshal_TYPE = "ProtocolMarshal" + var RPC_PARAM_SESSION_TYPE = "SESSION" + func Get_uuid() string + func NewGateHandler(gate gate.Gate) *handler + func NewMqttAgent(module module.RPCModule) *agent + func NewSession(app module.App, data []byte) (gate.Session, error) + func NewSessionByMap(app module.App, data map[string]interface{}) (gate.Session, error) + func RandInt64(min, max int64) int64 + func TimeNow() time.Time + func TransNumToString(num int64) (string, error) + func TransStringToNum(str string) (int64, error) + type Gate struct + CertFile string + HTTPTimeout time.Duration + KeyFile string + MaxConnNum int + MaxMsgLen uint32 + MinStorageHeartbeat int64 + TCPAddr string + Tls bool + WSAddr string + func (this *Gate) Deserialize(ptype string, b []byte) (param interface{}, err error) + func (this *Gate) GetAgentLearner() gate.AgentLearner + func (this *Gate) GetGateHandler() gate.GateHandler + func (this *Gate) GetMinStorageHeartbeat() int64 + func (this *Gate) GetModule() module.RPCModule + func (this *Gate) GetSessionLearner() gate.SessionLearner + func (this *Gate) GetStorageHandler() (storage gate.StorageHandler) + func (this *Gate) GetTracingHandler() gate.TracingHandler + func (this *Gate) GetTypes() []string + func (this *Gate) NewSession(data []byte) (gate.Session, error) + func (this *Gate) NewSessionByMap(data map[string]interface{}) (gate.Session, error) + func (this *Gate) OnAppConfigurationLoaded(app module.App) + func (this *Gate) OnConfChanged(settings *conf.ModuleSettings) + func (this *Gate) OnDestroy() + func (this *Gate) OnInit(subclass module.RPCModule, app module.App, settings *conf.ModuleSettings) + func (this *Gate) Run(closeSig chan bool) + func (this *Gate) Serialize(param interface{}) (ptype string, p []byte, err error) + func (this *Gate) SetCreateAgent(cfunc func() gate.Agent) error + func (this *Gate) SetSessionLearner(sessionLearner gate.SessionLearner) error + func (this *Gate) SetStorageHandler(storage gate.StorageHandler) error + func (this *Gate) SetTracingHandler(tracing gate.TracingHandler) error