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
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 MQESerie ¶
type Query ¶
type Query struct { Metrics []Metric Hosts []string Cluster []string FunctionList []Function AddClusterToAlias bool AddHostToAlias bool TimeRange *tsdb.TimeRange UseRawQuery bool RawQuery string }
func (*Query) Build ¶
func (q *Query) Build(availableSeries []string) ([]QueryToSend, error)
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 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
Click to show internal directories.
Click to hide internal directories.