go20/devops/agent/tasks/interface.go

14 lines
337 B
Go
Raw Normal View History

2026-03-08 18:05:17 +08:00
package tasks
import (
"context"
"devops/server/apps/task"
)
// Task 是一个接口,定义了任务的基本行为
// 任务名称: task_debug, 任务描述: 调试任务, 任务类型: debug, 任务参数: {}
type TaskRunner interface {
// 任务需要的运行能力
Run(context.Context, *task.TaskSpec) (*task.Task, error)
}