mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-11-01 03:22:12 +08:00
./goimports -w -local yunion.io/x/onecloud/ -corp yunion.io/x/ $GOPATH/src/yunion.io/x/onecloud/{cmd,pkg}
27 lines
554 B
Go
27 lines
554 B
Go
package taskman
|
|
|
|
import (
|
|
"context"
|
|
"net/http"
|
|
|
|
"yunion.io/x/jsonutils"
|
|
|
|
"yunion.io/x/onecloud/pkg/cloudcommon"
|
|
"yunion.io/x/onecloud/pkg/mcclient"
|
|
)
|
|
|
|
type ITask interface {
|
|
cloudcommon.IStartable
|
|
|
|
ScheduleRun(data jsonutils.JSONObject)
|
|
GetParams() *jsonutils.JSONDict
|
|
GetUserCred() mcclient.TokenCredential
|
|
GetTaskId() string
|
|
SetStage(stageName string, data *jsonutils.JSONDict) error
|
|
|
|
GetTaskRequestHeader() http.Header
|
|
|
|
SetStageComplete(ctx context.Context, data *jsonutils.JSONDict)
|
|
SetStageFailed(ctx context.Context, reason string)
|
|
}
|