Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
// ExecutePath represents lin language executor's path.
ExecutePath = "/exec"
)
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API represents root http api.
func (*API) RegisterRouter ¶
func (api *API) RegisterRouter(router *gin.RouterGroup)
RegisterRouter registers http api router.
type ExecuteAPI ¶
type ExecuteAPI struct {
// contains filtered or unexported fields
}
func NewExecuteAPI ¶
func NewExecuteAPI(deps *depspkg.HTTPDeps) *ExecuteAPI
func (*ExecuteAPI) Execute ¶
func (e *ExecuteAPI) Execute(c *gin.Context)
Execute executes lin query language with rate limit. 1. metric data/metadata query statement; 2. cluster metadata/state query statement; 3. database/broker management statement;
@Summary execute lin query language @Description Execute lin query language with rate limit, then return different response based on execution statement. @Description 1. metric data/metadata query statement; @Description 2. cluster metadata/state query statement; @Description 3. database/broker management statement; @Tags LinQL @Accept json @Param param body models.ExecuteParam ture "param data" @Produce json @Success 200 {object} models.ResultSet @Success 200 {object} models.Metadata @Failure 404 {string} string "not found" @Failure 500 {string} string "can't parse lin query language" @Failure 500 {string} string "internal error" @Router /exec [get] @Router /exec [put] @Router /exec [post]
func (*ExecuteAPI) Register ¶
func (e *ExecuteAPI) Register(route gin.IRoutes)
Register adds lin language executor's path.