status

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

View Source
var GetStatusRouter = router.Handler(func(c router.Context) {
	c.ResponseFunc(nil, func() schema.Response {
		return schema.Response{
			Message: "",
			Status:  schema.StatusSuccess,
			Data: Status{
				OnlineUserNum:   ws.UserPoll.Length(),
				OnlineWaiterNum: ws.WaiterPoll.Length(),
				PendingNum:      ws.MatcherPool.GetPendingLength(),
				Matchers:        ws.MatcherPool.GetMatcher(),
			},
		}
	})
})

Functions

This section is empty.

Types

type Status

type Status struct {
	OnlineWaiterNum int                 `json:"online_waiter_num"` // 当前在线的客服
	OnlineUserNum   int                 `json:"online_user_num"`   // 当前在线的用户
	PendingNum      int                 `json:"pending_num"`       // 正在等待的用户数量
	Matchers        map[string][]string `json:"matchers"`          // 当前正在配对的连接
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL