pmgr

package
v0.0.0-...-c314f80 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PMgr

type PMgr struct {
	// contains filtered or unexported fields
}

func New

func New() *PMgr

func (*PMgr) Add

func (pm *PMgr) Add(key interface{}, p *player.Player)

func (*PMgr) Del

func (pm *PMgr) Del(key interface{})

func (*PMgr) Get

func (pm *PMgr) Get(key interface{}) *player.Player

func (*PMgr) Len

func (pm *PMgr) Len(filter ...func(*player.Player) bool) int

func (*PMgr) Range

func (pm *PMgr) Range(f func(key interface{}, p *player.Player) bool)

func (*PMgr) Watch

func (pm *PMgr) Watch(kind WatchKind, watch Watch)

type Player

type Player struct {
	*player.Player
	// contains filtered or unexported fields
}

type Watch

type Watch func(key interface{}, p *player.Player)

type WatchKind

type WatchKind int
const (
	WatchKindLine     WatchKind = iota // 在线/离线
	WatchKindReady                     // 准备
	WatchKindOp                        // 操作
	WatchKindView                      // 观战
	WatchKindAuto                      // 托管
	WatchKindLocation                  // 定位
	WatchKindScore                     // 分数
	WatchKindSite                      // 位置
	WatchKindExtend                    // 扩展
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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