api

package
v0.0.0-...-94027f3 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

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

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

func GitInfoHandler(c *gin.Context)

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

func InitOcsAgentRoutes(s *http2.State, r *gin.Engine, isLocalRoute bool)

@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

func TimeHandler(c *gin.Context)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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