Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Channel = "nodehub:events"
Channel 通道名称
Functions ¶
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
Bus 事件总线
type NodeAssign ¶
type NodeAssign struct { ServiceCode int32 `json:"serviceCode"` UserID []string `json:"userID"` NodeID ulid.ULID `json:"nodeID"` }
NodeAssign 给用户分配有状态节点
type NodeUnassign ¶
type NodeUnassign struct { ServiceCode int32 `json:"serviceCode"` UserID []string `json:"userID"` NodeID ulid.ULID `json:"nodeID"` }
NodeUnassign 取消用户分配的有状态节点
type UserConnected ¶
type UserConnected struct { GatewayID string `json:"gatewayID"` UserID string `json:"userID"` RemoteAddr string `json:"remoteAddr"` }
UserConnected 用户连接事件
type UserDisconnected ¶
type UserDisconnected struct { GatewayID string `json:"gatewayID"` UserID string `json:"userID"` RemoteAddr string `json:"remoteAddr"` }
UserDisconnected 用户断开连接事件
Click to show internal directories.
Click to hide internal directories.