execution

package
v0.0.0-...-2fa33bc Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 29 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct{}

Handler implements task and step HTTP endpoints.

func (*Handler) ApprovalCallback

func (*Handler) ApprovalCallback(w http.ResponseWriter, r *http.Request)

ApprovalCallback validates the wire format and publishes a decision. Only the subscribed runner can decide whether it applies to its invocation. @Summary 接收外部审批结果 @Description 校验消息格式后通过进程内 RPC 转交审批决策。204 不表示审批已采纳。 @Tags 审批 @Accept json @Param decision body iproto.ApprovalDecision true "审批结果" @Success 204 "无响应体" @Failure 400 "回调格式错误" @Failure 503 "审批服务不可用" @Router /api/v1/approval/callback [post] @Router /api/v1/approval/callback [put]

func (*Handler) CreateTask

func (h *Handler) CreateTask(w http.ResponseWriter, r *http.Request)

CreateTask 校验并提交任务定义。 @Summary 创建 @Description JSON/YAML 请求体为任务对象;时长字段支持 Go 时长字符串(如 2m)或整数纳秒。Swagger 2.0 的时长 schema 展示整数形式。 @Tags 任务 @Accept application/json,application/yaml @Produce application/json,application/yaml @Param task body iproto.STaskReq true "任务内容" @Success 200 {object} api.Response[iproto.STaskCreateRes] @Router /api/v1/task [post]

func (*Handler) DeleteTask

func (h *Handler) DeleteTask(w http.ResponseWriter, r *http.Request)

DeleteTask 删除指定任务。 @Summary 删除 @Description 删除指定任务 @Tags 任务 @Produce application/json,application/yaml @Param task path string true "任务名称" @Success 200 {object} api.Response[any] @Router /api/v1/task/{task} [delete]

func (*Handler) DumpTask

func (h *Handler) DumpTask(w http.ResponseWriter, r *http.Request)

DumpTask 导出可重新提交的任务定义。 @Summary 导出 @Description 导出任务 @Tags 任务 @Produce application/json,application/yaml @Param task path string true "任务名称" @Success 200 {object} api.Response[string] "data 字段为 YAML 字符串" @Router /api/v1/task/{task}/dump [get]

func (*Handler) GetStep

func (h *Handler) GetStep(w http.ResponseWriter, r *http.Request)

GetStep 返回指定步骤的详情。 @Summary 详情 @Description 获取步骤详情;实时订阅走 /api/v1/ws 的 step 主题 @Tags 步骤 @Produce application/json,application/yaml @Param task path string true "任务名称" @Param step path string true "步骤名称" @Success 200 {object} api.Response[iproto.SStepRes] @Router /api/v1/task/{task}/step/{step} [get]

func (*Handler) GetStepLog

func (h *Handler) GetStepLog(w http.ResponseWriter, r *http.Request)

GetStepLog 返回指定步骤的日志快照。 @Summary 日志 @Description 指定任务指定步骤的执行输出;实时候选订阅走 /api/v1/ws 的 step-log 主题 @Tags 步骤 @Produce application/json,application/yaml @Param task path string true "任务名称" @Param step path string true "步骤名称" @Success 200 {object} api.Response[iproto.SStepLogsRes] @Router /api/v1/task/{task}/step/{step}/log [get]

func (*Handler) GetTask

func (h *Handler) GetTask(w http.ResponseWriter, r *http.Request)

GetTask 返回指定任务的详情。 @Summary 详情 @Description 获取任务详情;实时订阅走 /api/v1/ws 的 task 主题 @Tags 任务 @Produce application/json,application/yaml @Param task path string true "任务名称" @Success 200 {object} api.Response[iproto.STaskRes] @Router /api/v1/task/{task} [get]

func (*Handler) ListSteps

func (h *Handler) ListSteps(w http.ResponseWriter, r *http.Request)

ListSteps 返回任务的步骤列表。 @Summary 列表 @Description 获取指定任务的步骤列表;实时列表订阅走 /api/v1/ws 的 steps 主题 @Tags 步骤 @Produce application/json,application/yaml @Param task path string true "任务名称" @Success 200 {object} api.Response[iproto.SStepsRes] @Router /api/v1/task/{task}/step [get]

func (*Handler) ListTasks

func (h *Handler) ListTasks(w http.ResponseWriter, r *http.Request)

ListTasks 分页列出任务。 @Summary 列表 @Description 获取任务列表;实时列表订阅走 /api/v1/ws 的 tasks 主题 @Tags 任务 @Produce application/json,application/yaml @Param page query int false "页码,-1 为不分页" default(1) @Param size query int false "每页任务数" default(15) @Param prefix query string false "任务名前缀" @Success 200 {object} api.Response[iproto.STaskListDetailRes] @Router /api/v1/task [get]

func (*Handler) ManageStep

func (h *Handler) ManageStep(w http.ResponseWriter, r *http.Request)

ManageStep 向运行中的任务发送步骤控制指令。 @Summary 管理 @Description 管理指定任务的指定步骤, 支持暂停、恢复、终止、超时暂停自动恢复 @Tags 步骤 @Produce application/json,application/yaml @Param task path string true "任务名称" @Param step path string true "步骤名称" @Param action query string true "操作" Enums(kill,pause,resume) @Param duration query string false "pause 时的 Go 时长(如 30s),-1 表示手动恢复" default(-1) @Success 200 {object} api.Response[any] @Router /api/v1/task/{task}/step/{step} [put]

func (*Handler) ManageTask

func (h *Handler) ManageTask(w http.ResponseWriter, r *http.Request)

ManageTask 向指定任务发送控制指令。 @Summary 管理 @Description 管理任务, 支持暂停、恢复、终止、超时暂停自动恢复 @Tags 任务 @Produce application/json,application/yaml @Param task path string true "任务名称" @Param action query string true "操作" Enums(kill,pause,resume) @Param duration query string false "pause 时的 Go 时长(如 30s),-1 表示手动恢复" default(-1) @Success 200 {object} api.Response[any] @Router /api/v1/task/{task} [put]

func (*Handler) RegisterStream

func (h *Handler) RegisterStream(reg *httpx.StreamRegistry)

RegisterStream wires the task topics and calls into the shared WebSocket connection.

Jump to

Keyboard shortcuts

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