Documentation
¶
Index ¶
- Variables
- func DeleteArtifactEvent(ctx *logger.RequestContext, username, fsname, runID, artifactPath string) error
- func DeleteRun(ctx *logger.RequestContext, id string, request *DeleteRunRequest) error
- func DeleteRunCache(ctx *logger.RequestContext, id string) error
- func GetJobByRun(runID string, stepName string) (schema.JobView, error)
- func GetRunByID(ctx *logger.RequestContext, runID string) (models.Run, error)
- func GetRunCache(ctx *logger.RequestContext, id string) (models.RunCache, error)
- func InitAndResumeRuns() (*handler.ImageHandler, error)
- func ListCacheByFirstFp(firstFp, fsID, step, source string) ([]models.RunCache, error)
- func LogArtifactEvent(req schema.LogRunArtifactRequest) error
- func LogCache(req schema.LogRunCacheRequest) (string, error)
- func RetryRun(ctx *logger.RequestContext, runID string) error
- func StopRun(ctx *logger.RequestContext, runID string, request UpdateRunRequest) error
- func UpdateRunByWfEvent(id string, event interface{}) bool
- type ArtifactsJson
- type CreateRunByJsonRequest
- type CreateRunRequest
- type CreateRunResponse
- type DeleteRunRequest
- type ListArtifactEventResponse
- type ListRunCacheResponse
- type ListRunResponse
- type RunBrief
- type RunStep
- type UpdateRunRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GetJobFunc func(runID string, stepName string) (schema.JobView, error) = GetJobByRun UpdateRunFunc func(id string, event interface{}) bool = UpdateRunByWfEvent LogCacheFunc func(req schema.LogRunCacheRequest) (string, error) = LogCache ListCacheFunc func(firstFp, fsID, step, source string) ([]models.RunCache, error) = ListCacheByFirstFp LogArtifactFunc func(req schema.LogRunArtifactRequest) error = LogArtifactEvent )
Functions ¶
func DeleteArtifactEvent ¶
func DeleteArtifactEvent(ctx *logger.RequestContext, username, fsname, runID, artifactPath string) error
---------------------artifact_event---------------------//
func DeleteRun ¶
func DeleteRun(ctx *logger.RequestContext, id string, request *DeleteRunRequest) error
func DeleteRunCache ¶
func DeleteRunCache(ctx *logger.RequestContext, id string) error
func GetRunByID ¶
func GetRunCache ¶
-------------CRUD-----------------//
func InitAndResumeRuns ¶
func InitAndResumeRuns() (*handler.ImageHandler, error)
func ListCacheByFirstFp ¶
func LogArtifactEvent ¶
func LogArtifactEvent(req schema.LogRunArtifactRequest) error
func StopRun ¶
func StopRun(ctx *logger.RequestContext, runID string, request UpdateRunRequest) error
func UpdateRunByWfEvent ¶
Types ¶
type ArtifactsJson ¶
type ArtifactsJson struct {
Input map[string]string `json:"input"`
Output []string `json:"output"`
}
used for API CreateRunJson to unmarshal artifacts
type CreateRunByJsonRequest ¶
type CreateRunByJsonRequest struct {
FsName string `json:"fsName"`
UserName string `json:"userName,omitempty"` // optional, only for root user
Description string `json:"desc,omitempty"` // optional
Disabled string `json:"disabled,omitempty"` // optional
Name string `json:"name"`
DockerEnv string `json:"dockerEnv,omitempty"` // optional
Parallelism int `json:"parallelism,omitempty"` // optional
EntryPoints map[string]*RunStep `json:"entryPoints"`
PostProcess map[string]*RunStep `json:"postProcess,omitempty"` // optional
Cache schema.Cache `json:"cache,omitempty"` // optional
Queue string `json:"queue,omitempty"` // optional
Flavour string `json:"flavour,omitempty"` // optional
JobType string `json:"jobType,omitempty"` // optional
FailureOptions schema.FailureOptions `json:"failureOptions,omitempty"` // optional
Env map[string]string `json:"env,omitempty"` // optional
}
type CreateRunRequest ¶
type CreateRunRequest struct {
FsName string `json:"fsname"`
UserName string `json:"username,omitempty"` // optional, only for root user
Name string `json:"name,omitempty"` // optional
Description string `json:"desc,omitempty"` // optional
Entry string `json:"entry,omitempty"` // optional
Parameters map[string]interface{} `json:"parameters,omitempty"` // optional
DockerEnv string `json:"dockerEnv,omitempty"` // optional
// run workflow source. priority: RunYamlRaw > PipelineID > RunYamlPath
// 为了防止字符串或者不同的http客户端对run.yaml
// 格式中的特殊字符串做特殊过滤处理导致yaml文件不正确,因此采用runYamlRaw采用base64编码传输
Disabled string `json:"disabled,omitempty"` // optional
RunYamlRaw string `json:"runYamlRaw,omitempty"` // optional. one of 3 sources of run. high priority
PipelineID string `json:"pipelineID,omitempty"` // optional. one of 3 sources of run. medium priority
RunYamlPath string `json:"runYamlPath,omitempty"` // optional. one of 3 sources of run. low priority
}
type CreateRunResponse ¶
type CreateRunResponse struct {
RunID string `json:"runID"`
}
func CreateRun ¶
func CreateRun(userName string, request *CreateRunRequest) (CreateRunResponse, error)
func CreateRunByJson ¶
func CreateRunByJson(userName string, request *CreateRunByJsonRequest, bodyMap map[string]interface{}) (CreateRunResponse, error)
func ValidateAndStartRun ¶
func ValidateAndStartRun(run models.Run, req interface{}) (CreateRunResponse, error)
type DeleteRunRequest ¶
type DeleteRunRequest struct {
CheckCache bool `json:"checkCache"`
}
type ListArtifactEventResponse ¶
type ListArtifactEventResponse struct {
common.MarkerInfo
ArtifactEventList []models.ArtifactEvent `json:"artifactEventList"`
}
func ListArtifactEvent ¶
func ListArtifactEvent(ctx *logger.RequestContext, marker string, maxKeys int, userFilter, fsFilter, runFilter, typeFilter, pathFilter []string) (ListArtifactEventResponse, error)
type ListRunCacheResponse ¶
type ListRunCacheResponse struct {
common.MarkerInfo
RunCacheList []models.RunCache `json:"runCacheList"`
}
func ListRunCache ¶
func ListRunCache(ctx *logger.RequestContext, marker string, maxKeys int, userFilter, fsFilter, runFilter []string) (ListRunCacheResponse, error)
type ListRunResponse ¶
type ListRunResponse struct {
common.MarkerInfo
RunList []RunBrief `json:"runList"`
}
func ListRun ¶
func ListRun(ctx *logger.RequestContext, marker string, maxKeys int, userFilter, fsFilter, runFilter, nameFilter []string) (ListRunResponse, error)
type RunBrief ¶
type RunBrief struct {
ID string `json:"runID"`
Name string `json:"name"`
Source string `json:"source"` // pipelineID or yamlPath
UserName string `json:"username"`
FsName string `json:"fsname"`
Message string `json:"runMsg"`
Status string `json:"status"`
CreateTime string `json:"createTime"`
ActivateTime string `json:"activateTime"`
}
type RunStep ¶
type RunStep struct {
Parameters map[string]interface{} `json:"parameters"`
Command string `json:"command"`
Deps string `json:"deps"`
Artifacts ArtifactsJson `json:"artifacts"`
Env map[string]string `json:"env"`
Queue string `json:"queue"`
Flavour string `json:"flavour"`
JobType string `json:"jobType"`
Cache schema.Cache `json:"cache"`
DockerEnv string `json:"dockerEnv"`
}
used for API CreateRunJson to unmarshal steps in entryPoints and postProcess
type UpdateRunRequest ¶
type UpdateRunRequest struct {
StopForce bool `json:"stopForce"`
}
Click to show internal directories.
Click to hide internal directories.