schedule

package
v1.22.4 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	Clients    map[string]*client.Client // 客户端集合
	Register   chan *client.Client       // 注册客户端通道
	Unregister chan *client.Client       // 注销客户端通道
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context) *Manager

func (*Manager) Count

func (m *Manager) Count() int

func (*Manager) Ctx

func (m *Manager) Ctx() context.Context

func (*Manager) GetClientEvents

func (m *Manager) GetClientEvents(clientId string) []string

GetClientEvents 获取指定客户端订阅的所有event

func (*Manager) GetClientsByEvent

func (m *Manager) GetClientsByEvent(eventType string) []string

GetClientsByEvent 获取订阅了指定event的所有客户端ID

func (*Manager) Run

func (m *Manager) Run()

func (*Manager) SendEvent

func (m *Manager) SendEvent(e event.Event) (err error)

SendEvent 发送事件

Jump to

Keyboard shortcuts

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