Documentation
¶
Overview ¶
* 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.
* 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.
* 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.
* 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.
Index ¶
- func GetAgentStatus(s *http.State) (http.AgentStatus, error)
- func GetAllAgentStatus(s *http.State) gin.HandlerFunc
- func GitInfoHandler(c *gin.Context)
- func InfoHandler(s *http.State) gin.HandlerFunc
- func InitBackupRoutes(v1 *gin.RouterGroup, isLocalRoute bool)
- func InitOcsAgentRoutes(s *http2.State, r *gin.Engine, isLocalRoute bool)
- func InitRestoreRoutes(r *gin.RouterGroup, isLocalRoute bool)
- func InitTaskRoutes(r *gin.RouterGroup, isLocalRoute bool)
- func InitTenantRoutes(v1 *gin.RouterGroup, isLocalRoute bool)
- func StatusHandler(s *http.State) gin.HandlerFunc
- func TimeHandler(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAgentStatus ¶
func GetAgentStatus(s *http.State) (http.AgentStatus, error)
func GetAllAgentStatus ¶
func GetAllAgentStatus(s *http.State) gin.HandlerFunc
StatusHandler returns the agent status
@ID getAllAgentsStatus @Summary get all agent status @Description get all agent status @Tags v1 @Accept application/json @Produce application/json @Success 200 object http.OcsAgentResponse{dat=map[string]http.AgentStatus} @Router /api/v1/agents/status [get]
func GitInfoHandler ¶
GitInfoHandler returns the agent git info
@ID getGitInfo @Summary get git info @Description get git info @Tags v1 @Accept application/json @Produce application/json @Success 200 object http.OcsAgentResponse{data=config.GitInfo} @Router /api/v1/git-info [get]
func InfoHandler ¶
func InfoHandler(s *http.State) gin.HandlerFunc
InfoHandler returns the agent info
@ID getAgentInfo @Summary get agent info @Description get agent info @Tags v1 @Accept application/json @Produce application/json @Success 200 object http.OcsAgentResponse{data=meta.AgentStatus} @Router /api/v1/info [get]
func InitBackupRoutes ¶
func InitBackupRoutes(v1 *gin.RouterGroup, isLocalRoute bool)
func InitOcsAgentRoutes ¶
@title obshell API @version 1.0 @description This is a set of operation and maintenance management API interfaces developed based on observer. @BasePath / @contact.name obshell API Support @contact.url https://open.oceanbase.com @license.name Apache - 2.0 @license.url http://www.apache.org/licenses/
func InitRestoreRoutes ¶
func InitRestoreRoutes(r *gin.RouterGroup, isLocalRoute bool)
func InitTaskRoutes ¶
func InitTaskRoutes(r *gin.RouterGroup, isLocalRoute bool)
func InitTenantRoutes ¶
func InitTenantRoutes(v1 *gin.RouterGroup, isLocalRoute bool)
func StatusHandler ¶
func StatusHandler(s *http.State) gin.HandlerFunc
StatusHandler returns the agent status
@ID getStatus @Summary get agent status @Description get agent status @Tags v1 @Accept application/json @Produce application/json @Success 200 object http.OcsAgentResponse{data=http.AgentStatus} @Router /api/v1/status [get]
func TimeHandler ¶
TimeHandler returns the current time
@ID getTime @Summary get current time @Description get current time @Tags v1 @Accept application/json @Produce application/json @Success 200 object http.OcsAgentResponse{data=time.Time} @Router /api/v1/time [get]
Types ¶
This section is empty.