processor

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package processor @Author Clover @Data 2025/3/7 下午8:17:00 @Desc 模块处理器

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer added in v0.7.0

type Layer struct {
	Level    plugins.PluginLevel
	RecvChan chan *message.Message
	SendChan chan *message.Message
	Plugins  []*plugins.IPlugin

	NextLayer *Layer // 下一层级
	// contains filtered or unexported fields
}

func (*Layer) Close added in v0.7.0

func (l *Layer) Close()

func (*Layer) GetPlugins added in v0.7.0

func (l *Layer) GetPlugins() []*plugins.IPlugin

func (*Layer) StartHandle added in v0.7.0

func (l *Layer) StartHandle()

type Processor

type Processor struct {
	LevelLayer []*Layer
	// contains filtered or unexported fields
}

func NewProcessor

func NewProcessor(ctx context.Context, cli *wcf.Client) *Processor

func (*Processor) Close

func (p *Processor) Close()

Close 关闭 Processor,停止所有 Layer 和 Plugin 的处理

func (*Processor) RegisterPlugin added in v0.7.0

func (p *Processor) RegisterPlugin(level plugins.PluginLevel, plugin *plugins.IPlugin)

RegisterPlugin 注册插件到指定层级

func (*Processor) Start added in v0.7.0

func (p *Processor) Start(recvChan chan *message.Message, sendChan chan *message.Message)

Start 启动 Processor 的消息接收和分发

Directories

Path Synopsis
Package cache @Author Clover @Data 2024/7/11 上午12:05:00 @Desc 缓存,持久化到文件中
Package cache @Author Clover @Data 2024/7/11 上午12:05:00 @Desc 缓存,持久化到文件中

Jump to

Keyboard shortcuts

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