task

package
v0.0.0-...-61ee147 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 17 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 body body task.DagOperator true "dag operator, supported values are (rollback/retry/cancel/pass)" @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 GetAgentMainDags

func GetAgentMainDags(c *gin.Context)

@ID GetAgentMainDags @Summary get agent main dags @Description get agent main dags @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 400 object http.OcsAgentResponse @Failure 404 object http.OcsAgentResponse @Failure 500 object http.OcsAgentResponse @Router /api/v1/task/dag/agent/main_dags [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 GetAllAgentDags

func GetAllAgentDags(c *gin.Context)

get all dags in agent

@ID getAllAgentDags @Summary get all dags in the agent @Description get all dags in the agent @Tags task @Accept application/json @Produce application/json @Param X-OCS-Header header string true "Authorization" @Param show_details 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/dags/agent [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 GetAllClusterDags

func GetAllClusterDags(c *gin.Context)

get all dags in cluster

@ID getAllClusterDags @Summary get all dags in cluster @Description get all dags in cluster @Tags task @Accept application/json @Produce application/json @Param X-OCS-Header header string true "Authorization" @Param show_details 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/dags/ob [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 GetFullSubTaskLogs

func GetFullSubTaskLogs(c *gin.Context)

get full sub_task logs by id

@ID				getFullSubTaskLogs
@Summary		get full sub_task logs by sub_task_id
@Description	get full sub_task logs 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"
@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}/logs [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]

func NodeHandler

func NodeHandler(c *gin.Context)

node handler

@ID nodeHandler @Summary operate node @Description operate node @Tags task @Accept application/json @Produce application/json @Param X-OCS-Header header string true "Authorization" @Param id path string true "node id" @Param body body task.NodeOperator true "node operator, supported values is (pass) only" @Success 200 object http.OcsAgentResponse @Failure 400 object http.OcsAgentResponse @Failure 404 object http.OcsAgentResponse @Failure 500 object http.OcsAgentResponse @Router /api/v1/task/node/{id} [post]

Types

This section is empty.

Jump to

Keyboard shortcuts

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