taskplugin

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ITaskPlugin

type ITaskPlugin interface {

	// 获取任务的配置信息
	GetPluginConf(conf *taskmodel.PluginConf) error

	// 获取任务的执行体
	GetPluginBody(body *taskmodel.PluginBody) error
}

任务插件接口, 用于获取任务的执行信息

type TaskPluginFactoryFn

type TaskPluginFactoryFn func(plugin *ITaskPlugin) error

函数类型,用于返回指定任务类型所对应的任务插件对象 每个任务类型对应一个插件对象

type TaskPluginRegistration

type TaskPluginRegistration struct {
	TaskType        uint32              // 任务类型
	PluginFactoryFn TaskPluginFactoryFn // 插件创建函数
	Name            string              // 插件类型名称
	Description     string              // 描述任务的类型及主要操作
}

任务插件注册结构

Jump to

Keyboard shortcuts

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