model

package
v0.0.0-...-d9ad550 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MetaWeight meta weight
	MetaWeight = "weight"
	// MetaOffline meta offline
	MetaOffline = "offline"
	// MetaIPAddrs meta public ip addrs
	MetaIPAddrs = "ip_addrs"
	// MetaIPCount meta ip count
	MetaIPCount = "ip_count"
	// MetaConnCount meta conn count
	MetaConnCount = "conn_count"

	// PlatformWeb platform web
	PlatformWeb = "web"
)

Variables

This section is empty.

Functions

func DecodeRoomKey

func DecodeRoomKey(key string) (string, string, error)

DecodeRoomKey decode room key.

func EncodeRoomKey

func EncodeRoomKey(business string, room string) string

EncodeRoomKey encode a room key.

Types

type CometInfo

type CometInfo struct {
	Addr string
	TCP  []string
	WS   []string
}

type Online

type Online struct {
	Server    string           `json:"server"`
	RoomCount map[string]int32 `json:"room_count"`
	Updated   int64            `json:"updated"`
}

Online ip and room online.

type ServerInfo

type ServerInfo struct {
	Server    string   `json:"server"`
	IPAddrs   []string `json:"ip_addrs"`
	IPCount   int32    `json:"ip_count"`
	ConnCount int32    `json:"conn_count"`
	Updated   int64    `json:"updated"`
}

ServerInfo server info.

type Top

type Top struct {
	RoomID string `json:"room_id"`
	Count  int32  `json:"count"`
}

Top top sorted.

Jump to

Keyboard shortcuts

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