/
zhendosina
/
obshell
Обзор
Документация
Войти
/
zhendosina
/
obshell
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ob/agent/api/task_handler.go
49 строк
2 KB
Junkrat77
PullRequest: 614 feat: support seekdb
31 окт 2025, 11:06
31 окт 2025, 11:06
55d9f3e
Код
Авторство
О чём код?
/* * Copyright (c) 2024 OceanBase. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package api import ( "github.com/gin-gonic/gin" "github.com/oceanbase/obshell/ob/agent/api/common" "github.com/oceanbase/obshell/ob/agent/constant" "github.com/oceanbase/obshell/ob/agent/executor/task" "github.com/oceanbase/obshell/ob/agent/secure" ) func InitTaskRoutes(r *gin.RouterGroup, isLocalRoute bool) { group := r.Group(constant.URI_TASK_GROUP) if !isLocalRoute { group.Use(common.Verify(secure.ROUTE_TASK)) } group.GET(constant.URI_SUB_TASK+"/:id", task.GetSubTaskDetail) group.GET(constant.URI_NODE+"/:id", task.GetNodeDetail) group.GET(constant.URI_DAG+"/:id", task.GetDagDetail) group.POST(constant.URI_DAG+"/:id", task.DagHandler) group.POST(constant.URI_NODE+"/:id", task.NodeHandler) group.GET(constant.URI_DAGS+constant.URI_OB_GROUP, task.GetAllClusterDags) group.GET(constant.URI_DAGS+constant.URI_AGENT_GROUP, task.GetAllAgentDags) group.GET(constant.URI_SUB_TASK+"/:id"+constant.URI_LOGS, task.GetFullSubTaskLogs) group.GET(constant.URI_DAG+constant.URI_MAINTAIN+constant.URI_OB_GROUP, task.GetObLastMaintenanceDag) group.GET(constant.URI_DAG+constant.URI_MAINTAIN+constant.URI_AGENT_GROUP, task.GetAgentLastMaintenanceDag) group.GET(constant.URI_DAG+constant.URI_MAINTAIN+constant.URI_AGENTS_GROUP, task.GetAllAgentLastMaintenanceDag) group.GET(constant.URI_DAG+constant.URI_UNFINISH, task.GetUnfinishedDags) group.GET(constant.URI_DAG+constant.URI_OB_GROUP+constant.URI_UNFINISH, task.GetClusterUnfinishDags) group.GET(constant.URI_DAG+constant.URI_AGENT_GROUP+constant.URI_UNFINISH, task.GetAgentUnfinishDags) group.GET(constant.URI_DAG+constant.URI_AGENT_GROUP+constant.URI_MAIN_DAGS, task.GetAgentMainDags) }