Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Conf svc.MSConfig
Conf .
View Source
var EtcdPoint, Region, Ethname, MSName, Dbs, LanIP string
View Source
var MicrosConn, EXChangeConn *pprpcpool.MicroClientConn
MicrosConn micro service connections.
View Source
var Service, AuthService, EXChangeMsgService *pprpc.Service
Service,AuthService global service
View Source
var Sess *sess.Sessions
Sess 存放所有连接
View Source
var SvcAgent *svc.Agent
View Source
var SvcWatcher *svc.Watcher
View Source
var TopicCache *rsub.RSub
Functions ¶
Types ¶
type ClearSameConf ¶
type ClearSameConf struct { Clear bool `json:"clear,omitempty"` WhiteAccount []string `json:"white_account,omitempty"` }
ClearSameConf clear same id
type ConnAttr ¶
type ConnAttr struct { ClientID string Account string IsAuth bool UserID int64 ConnectFlag bool OfflineEvent bool EncType uint8 MessageType uint8 ClearSession int32 WillFlag uint32 WillQos uint32 WillRetain uint32 WillTopic string WillBody string HbInterval uint32 HistorymsgType int32 HistorymsgCount int32 ConnStatus int32 ConnType int32 LastTime int64 ISSleep int32 RemoteIpaddr string // time.Timer Timers *cache.Cache CmdChan chan *packets.CmdPacket HistoryCmdList *list.List HistoryPubackSync chan uint16 RunSub bool SendOfflinemsgEnd bool }
ConnAttr .
func (*ConnAttr) StartTimer ¶
StartTimer start timer
type HistoryList ¶
type MicroClient ¶
type MicroClient struct { Name string `json:"name,omitempty"` URIS []string `json:"uris,omitempty"` }
MicroClient micrl service client
type PpmqConf ¶
type PpmqConf struct { OnlineNotify bool `json:"online_notify"` OfflineNotify bool `json:"offline_notify"` UDPHbsec uint32 `json:"udp_hbsec"` TCPHbsec uint32 `json:"tcp_hbsec"` NotifyTopicPrefix string `json:"notify_topic_prefix"` // Online Offline 通知事件的前缀 Prefix/clientid //ServerID string `json:"server_id"` MaxSessions int32 `json:"max_sessions"` Mode string `json:"mode"` ClusterSignkey string `json:"cluster_signkey,omitempty"` Qos bool `json:"qos,omitempty"` SSOEnable bool `json:"sso_enable,omitempty"` UDPRespTimeoutms int64 `json:"udp_resp_timeoutms,omitempty"` OfflinemsgTimeoutms int64 `json:"offlinemsg_timeoutms,omitempty"` OfflinemsgSendSleepms int64 `json:"offlinemsg_send_sleepms,omitempty"` OfflinemsgSendIntervalms int64 `json:"offlinemsg_send_intervalms,omitempty"` MessageOrder int64 `json:"message_order,omitempty"` MessageOrderLength int `json:"message_order_length,omitempty"` TempdbExpiredms int64 `json:"tempdb_expiredms,omitempty"` TempdbClearIntervalsec int64 `json:"tempdb_clear_intervalsec,omitempty"` }
PpmqConf .
type PrivateConf ¶
type PrivateConf struct { Ppmq PpmqConf `json:"ppmq"` MaxSession int32 `json:"max_session"` DevicePrefix string `json:"device_prefix,omitempty"` Auth int32 `json:"auth"` // 1 local db; 2 auth micro service. CheckTopic int32 `json:"check_topic"` Micros []MicroClient `json:"micros,omitempty"` // authuser, authdevice Redis svc.RedisConf `json:"redis"` ClearDIDConf ClearSameConf `json:"clear_sameid"` }
PrivateConf private conf
var PConf PrivateConf
Click to show internal directories.
Click to hide internal directories.