Documentation
¶
Index ¶
- func CancelMission(mission *model.Task) error
- func CancelMissionRecord(ID string) error
- func GetValueByName(name string) (string, error)
- func PreviewTask(missionID string) (*types.PreviewResponse, error)
- func ReplaceVariables(data *types.TaskData) (*types.TaskData, error)
- func RunMissionManual(missionID string) error
- func RunTask(mission model.Task, runBy string) (err error)
- func ScheduleMission(mission *model.Task) error
- func SetMissions()
- type RunState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CancelMission ¶
func CancelMissionRecord ¶
func GetValueByName ¶
func PreviewTask ¶ added in v0.2.5
func PreviewTask(missionID string) (*types.PreviewResponse, error)
PreviewTask 用任务的当前配置跑一次预览:
- SQL source:自动在查询外层包 LIMIT,避免全表扫描
- 所有 sink 替换为内存 PreviewSink,不向任何外部系统写入
- 返回前 N 行数据及列结构,供前端展示
func ReplaceVariables ¶ added in v0.2.0
ReplaceVariables 对 TaskData 中所有组件的 Params.Value 执行变量替换。 只替换 Value 字段中的 ${...} 占位符,不修改 Key 和其他结构字段。 返回深拷贝后的 TaskData,不修改原始数据。
func RunMissionManual ¶
func ScheduleMission ¶
func SetMissions ¶
func SetMissions()
Types ¶
type RunState ¶ added in v0.2.0
type RunState struct {
// contains filtered or unexported fields
}
RunState provides thread-safe access to task execution state, protecting the cancel function map and manual cancel map from concurrent access.
func NewRunState ¶ added in v0.2.0
func NewRunState() *RunState
func (*RunState) CancelRecord ¶ added in v0.2.0
CancelRecord cancels a running task record by its ID. Returns an error if the record is not found or not cancellable.
func (*RunState) IsManualCancelled ¶ added in v0.2.0
IsManualCancelled checks if a task record was manually cancelled and clears the flag.
func (*RunState) RemoveCancel ¶ added in v0.2.0
RemoveCancel removes the cancel function for a task record.
Click to show internal directories.
Click to hide internal directories.