task

package
v0.0.0-...-fee78ac Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// for local scale out dag
	PARAM_COORDINATE_DAG_ID = "coordinateDagId"
	PARAM_COORDINATE_AGENT  = "coordinateAgent"
)

Functions

func DagHandler

func DagHandler(c *gin.Context)

dag handler

@ID				dagHandler
@Summary		operate dag
@Description	operate dag
@Tags			task
@Accept			application/json
@Produce		application/json
@Param			X-OCS-Header	header	string	true	"Authorization"
@Param			id				path	string	true	"dag id"
@Param			operator		body	string	true	"operator(rollback/retry/cancel/pass)"	example({"operator": "rollback"})
@Success		200				object	http.OcsAgentResponse
@Failure		400				object	http.OcsAgentResponse
@Failure		404				object	http.OcsAgentResponse
@Failure		500				object	http.OcsAgentResponse
@Router			/api/v1/task/dag/{id} [post]

func GetAgentLastMaintenanceDag

func GetAgentLastMaintenanceDag(c *gin.Context)

@ID GetAgentLastMaintenanceDag @Summary get agent last maintenance dag @Description get agent last maintenance dag @Tags task @Accept application/json @Produce application/json @Param X-OCS-Header header string true "Authorization" @Success 200 object http.OcsAgentResponse{data=task.DagDetailDTO} @Failure 404 object http.OcsAgentResponse @Failure 500 object http.OcsAgentResponse @Router /api/v1/task/dag/maintain/agent [get]

func GetAgentUnfinishDags

func GetAgentUnfinishDags(c *gin.Context)

@ID GetAgentUnfinishDags @Summary get agent unfinished dags @Description get agent unfinished dags @Tags task @Accept application/json @Produce application/json @Param X-OCS-Header header string true "Authorization" @Param showDetails query param.TaskQueryParams true "show details" @Success 200 object http.OcsAgentResponse{data=[]task.DagDetailDTO} @Failure 500 object http.OcsAgentResponse @Router /api/v1/task/dag/agent/unfinish [get]

func GetAllAgentLastMaintenanceDag

func GetAllAgentLastMaintenanceDag(c *gin.Context)

@ID GetAllAgentsLastMaintenanceDag @Summary get agent last maintenance dag @Description get agent last maintenance dag @Tags task @Accept application/json @Produce application/json @Param X-OCS-Header header string true "Authorization" @Success 200 object http.OcsAgentResponse{data=[]task.DagDetailDTO} @Failure 404 object http.OcsAgentResponse @Failure 500 object http.OcsAgentResponse @Router /api/v1/task/dag/maintain/agents [get]

func GetClusterUnfinishDags

func GetClusterUnfinishDags(c *gin.Context)

@ID GetClusterUnfinishDags @Summary get cluster unfinished dags @Description get cluster unfinished dags @Tags task @Accept application/json @Produce application/json @Param X-OCS-Header header string true "Authorization" @Param showDetails query param.TaskQueryParams true "show details" @Success 200 object http.OcsAgentResponse{data=[]task.DagDetailDTO} @Failure 400 object http.OcsAgentResponse @Failure 500 object http.OcsAgentResponse @Router /api/v1/task/dag/ob/unfinish [get]

func GetDagDetail

func GetDagDetail(c *gin.Context)

get dag detail by id

@ID				getDagDetail
@Summary		get dag detail by id
@Description	get dag detail by id
@Tags			task
@Accept			application/json
@Produce		application/json
@Param			X-OCS-Header	header	string					true	"Authorization"
@Param			id				path	string					true	"id"
@Param			showDetails		query	param.TaskQueryParams	true	"show details"
@Success		200				object	http.OcsAgentResponse{data=task.DagDetailDTO}
@Failure		400				object	http.OcsAgentResponse
@Failure		404				object	http.OcsAgentResponse
@Failure		500				object	http.OcsAgentResponse
@Router			/api/v1/task/dag/{id} [get]

func GetNodeDetail

func GetNodeDetail(c *gin.Context)

get node detail by node_id

@ID				getNodeDetail
@Summary		get node detail by node_id
@Description	get node detail by node_id
@Tags			task
@Accept			application/json
@Produce		application/json
@Param			X-OCS-Header	header	string					true	"Authorization"
@Param			id				path	string					true	"id"
@Param			showDetails		query	param.TaskQueryParams	true	"show details"

@Success		200				object	http.OcsAgentResponse{data=task.NodeDetailDTO}
@Failure		400				object	http.OcsAgentResponse
@Failure		404				object	http.OcsAgentResponse
@Failure		500				object	http.OcsAgentResponse
@Router			/api/v1/task/node/{id} [get]

func GetObLastMaintenanceDag

func GetObLastMaintenanceDag(c *gin.Context)

@ID GetObLastMaintenanceDag @Summary get ob last maintenance dag @Description get ob last maintenance dag @Tags task @Accept application/json @Produce application/json @Param X-OCS-Header header string true "Authorization" @Success 200 object http.OcsAgentResponse{data=task.DagDetailDTO} @Failure 404 object http.OcsAgentResponse @Failure 500 object http.OcsAgentResponse @Router /api/v1/task/dag/maintain/ob [get]

func GetSubTaskDetail

func GetSubTaskDetail(c *gin.Context)

get sub_task detail by id

@ID				getSubTaskDetail
@Summary		get sub_task detail by sub_task_id
@Description	get sub_task detail by sub_task_id
@Tags			task
@Accept			application/json
@Produce		application/json
@Param			X-OCS-Header	header	string					true	"Authorization"
@Param			id				path	string					true	"id"
@Param			showDetails		query	param.TaskQueryParams	true	"show details"
@Success		200				object	http.OcsAgentResponse{data=task.TaskDetailDTO}
@Failure		400				object	http.OcsAgentResponse
@Failure		404				object	http.OcsAgentResponse
@Failure		500				object	http.OcsAgentResponse
@Router			/api/v1/task/sub_task/{id} [get]

func GetUnfinishedDags

func GetUnfinishedDags(c *gin.Context)

@ID GetUnfinishedDags @Summary get unfinished dags @Description get unfinished dags @Tags task @Accept application/json @Produce application/json @Param X-OCS-Header header string true "Authorization" @Param showDetails query param.TaskQueryParams true "show details" @Success 200 object http.OcsAgentResponse{data=[]task.DagDetailDTO} @Failure 400 object http.OcsAgentResponse @Router /api/v1/task/dag/unfinish [get]

Types

This section is empty.

Jump to

Keyboard shortcuts

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