Documentation ¶
Index ¶
- Variables
- func NewApiClient(httpClient *http.Client, datasource *models.DataSource) *apiClient
- func NewMQEExecutor(dsInfo *models.DataSource) (tsdb.Executor, error)
- type Function
- type MQEExecutor
- type MQEResponse
- type MQEResponseSerie
- type MQESerie
- type Metric
- type Query
- type QueryParser
- type QueryToSend
- type ResponseParser
- type ResponseTimeRange
- type TokenBody
- type TokenClient
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MaxWorker int = 4
)
Functions ¶
func NewApiClient ¶
func NewApiClient(httpClient *http.Client, datasource *models.DataSource) *apiClient
func NewMQEExecutor ¶
func NewMQEExecutor(dsInfo *models.DataSource) (tsdb.Executor, error)
Types ¶
type MQEExecutor ¶
type MQEExecutor struct { *models.DataSource // contains filtered or unexported fields }
func (*MQEExecutor) Execute ¶
func (e *MQEExecutor) Execute(ctx context.Context, queries tsdb.QuerySlice, queryContext *tsdb.QueryContext) *tsdb.BatchResult
type MQEResponse ¶
type MQEResponse struct { Success bool `json:"success"` Name string `json:"name"` Body []MQEResponseSerie `json:"body"` }
type MQEResponseSerie ¶
type MQEResponseSerie struct { Query string `json:"query"` Name string `json:"name"` Type string `json:"type"` Series []MQESerie `json:"series"` TimeRange ResponseTimeRange `json:"timerange"` }
type Query ¶
type QueryParser ¶
type QueryParser struct{}
func NewQueryParser ¶
func NewQueryParser() *QueryParser
func (*QueryParser) Parse ¶
func (qp *QueryParser) Parse(model *simplejson.Json, dsInfo *models.DataSource, queryContext *tsdb.QueryContext) (*Query, error)
type QueryToSend ¶
type ResponseParser ¶
type ResponseParser struct {
// contains filtered or unexported fields
}
func NewResponseParser ¶
func NewResponseParser() *ResponseParser
func (*ResponseParser) Parse ¶
func (parser *ResponseParser) Parse(res *http.Response, queryRef QueryToSend) ([]*tsdb.TimeSeries, error)
type ResponseTimeRange ¶
type TokenClient ¶
type TokenClient struct { Datasource *models.DataSource HttpClient *http.Client // contains filtered or unexported fields }
func NewTokenClient ¶
func NewTokenClient(datasource *models.DataSource) *TokenClient
func (*TokenClient) GetTokenData ¶
func (client *TokenClient) GetTokenData(ctx context.Context) (*TokenBody, error)
func (*TokenClient) RequestTokenData ¶
func (client *TokenClient) RequestTokenData(ctx context.Context) (*TokenBody, error)
type TokenResponse ¶
Click to show internal directories.
Click to hide internal directories.