handler

package
v2.0.0-...-d540dc0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdTable

type CmdTable = map[string]RoomTable

type FuncTable

type FuncTable = map[*events.BLiveEventHandler]struct{}

FuncTable 空结构体不占空间,作为hashSet使用 函数指针内存唯一

type Handler

type Handler struct {
	CmdChan chan *events.BLiveEvent
	DoFunc  CmdTable
	//函数反查表
	FuncPath map[*events.BLiveEventHandler]Path
}

func (*Handler) AddOption

func (handler *Handler) AddOption(RoomId int, Do events.BLiveEventHandler) *events.BLiveEventHandler

func (*Handler) CmdHandler

func (handler *Handler) CmdHandler()

func (*Handler) DelOption

func (handler *Handler) DelOption(p *events.BLiveEventHandler)

func (*Handler) DelRoomOption

func (handler *Handler) DelRoomOption(roomId int)

type Path

type Path struct {
	Cmd    string
	RoomId int
}

type RoomTable

type RoomTable = map[int]FuncTable

Jump to

Keyboard shortcuts

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