Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_PADDING_SIZE = 2 DEFAULT_PADDING = " " DEFAULT_HOST_PADDING_SIZE = 15 )
Variables ¶
View Source
var Commit string
View Source
var CommitDate string
View Source
var Version string
Functions ¶
Types ¶
type API ¶ added in v1.0.3
type API struct {
// contains filtered or unexported fields
}
func (*API) SetBaseURL ¶ added in v1.0.3
type ConnInfo ¶
type ConnInfo struct { ID int64 `json:"id"` // 连接ID UID string `json:"uid"` // 用户uid IP string `json:"ip"` // 客户端IP Port int `json:"port"` // 客户端端口 LastActivity time.Time `json:"last_activity"` // 最后一次活动时间 Uptime string `json:"uptime"` // 启动时间 Idle string `json:"idle"` // 客户端闲置时间 PendingBytes int `json:"pending_bytes"` // 等待发送的字节数 InMsgs int64 `json:"in_msgs"` // 流入的消息数 OutMsgs int64 `json:"out_msgs"` // 流出的消息数量 InBytes int64 `json:"in_bytes"` // 流入的字节数量 OutBytes int64 `json:"out_bytes"` // 流出的字节数量 Device string `json:"device"` // 设备 DeviceID string `json:"device_id"` // 设备ID Version uint8 `json:"version"` // 客户端协议版本 }
type RedrawCause ¶
type RedrawCause int
const ( DueToNewStats RedrawCause = iota DueToViewportResize )
type Varz ¶
type Varz struct { ServerID string `json:"server_id"` // 服务端ID ServerName string `json:"server_name"` // 服务端名称 Version string `json:"version"` // 服务端版本 Connections int `json:"connections"` // 当前连接数量 Uptime string `json:"uptime"` // 上线时间 Mem int64 `json:"mem"` // 内存 CPU float64 `json:"cpu"` // cpu InMsgs int64 `json:"in_msgs"` // 流入消息数量 OutMsgs int64 `json:"out_msgs"` // 流出消息数量 InBytes int64 `json:"in_bytes"` // 流入字节数量 OutBytes int64 `json:"out_bytes"` // 流出字节数量 SlowConsumers int64 `json:"slow_consumers"` // 慢客户端数量 TCPAddr string `json:"tcp_addr"` // tcp地址 WSAddr string `json:"ws_addr"` // wss地址 MonitorAddr string `json:"monitor_addr"` // 监控地址 MonitorOn int `json:"monitor_on"` // 监控是否开启 Commit string `json:"commit"` // git commit id CommitDate string `json:"commit_date"` // git commit date TreeState string `json:"tree_state"` // git tree state }
type WuKongIM ¶
type WuKongIM struct {
// contains filtered or unexported fields
}
func NewWuKongIM ¶
func NewWuKongIM() *WuKongIM
type WuKongIMContext ¶
type WuKongIMContext struct {
// contains filtered or unexported fields
}
func NewWuKongIMContext ¶
func NewWuKongIMContext(w *WuKongIM) *WuKongIMContext
Click to show internal directories.
Click to hide internal directories.