mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-21 01:53:14 +08:00
20 lines
436 B
Go
20 lines
436 B
Go
package taskman
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/yunionio/jsonutils"
|
|
"github.com/yunionio/mcclient"
|
|
)
|
|
|
|
type ITask interface {
|
|
ScheduleRun(data jsonutils.JSONObject)
|
|
GetParams() *jsonutils.JSONDict
|
|
GetUserCred() mcclient.TokenCredential
|
|
GetTaskId() string
|
|
SetStage(stageName string, data *jsonutils.JSONDict)
|
|
|
|
SetStageComplete(ctx context.Context, data *jsonutils.JSONDict)
|
|
SetStageFailed(ctx context.Context, reason string)
|
|
}
|