Documentation ¶
Index ¶
- func CalculateInterval(timerange *TimeRange) string
- func RegisterExecutor(pluginId string, fn GetExecutorFn)
- type Batch
- type BatchResult
- type BatchSlice
- type BatchTiming
- type Executor
- type GetExecutorFn
- type HandleRequestFunc
- type Query
- type QueryContext
- type QueryResult
- type QuerySlice
- type Request
- type Response
- type TimePoint
- type TimeRange
- type TimeSeries
- type TimeSeriesPoints
- type TimeSeriesSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateInterval ¶
func RegisterExecutor ¶
func RegisterExecutor(pluginId string, fn GetExecutorFn)
Types ¶
type BatchResult ¶
type BatchResult struct { Error error QueryResults map[string]*QueryResult Timings *BatchTiming }
func (*BatchResult) WithError ¶
func (br *BatchResult) WithError(err error) *BatchResult
type BatchSlice ¶
type BatchSlice []*Batch
type BatchTiming ¶
type BatchTiming struct {
TimeElapsed int64
}
type Executor ¶
type Executor interface {
Execute(ctx context.Context, queries QuerySlice, query *QueryContext) *BatchResult
}
type GetExecutorFn ¶
type GetExecutorFn func(dsInfo *models.DataSource) (Executor, error)
type HandleRequestFunc ¶
type Query ¶
type Query struct { RefId string Model *simplejson.Json Depends []string DataSource *models.DataSource Results []*TimeSeries Exclude bool MaxDataPoints int64 IntervalMs int64 }
type QueryContext ¶
type QueryContext struct { TimeRange *TimeRange Queries QuerySlice Results map[string]*QueryResult ResultsChan chan *BatchResult Lock sync.RWMutex BatchWaits sync.WaitGroup }
func NewQueryContext ¶
func NewQueryContext(queries QuerySlice, timeRange *TimeRange) *QueryContext
type QueryResult ¶
type QueryResult struct { Error error `json:"error"` RefId string `json:"refId"` Series TimeSeriesSlice `json:"series"` }
func NewQueryResult ¶
func NewQueryResult() *QueryResult
type QuerySlice ¶
type QuerySlice []*Query
type Request ¶
type Request struct { TimeRange *TimeRange Queries QuerySlice }
type Response ¶
type Response struct { BatchTimings []*BatchTiming `json:"timings"` Results map[string]*QueryResult `json:"results"` }
type TimeRange ¶
func NewTimeRange ¶
func (*TimeRange) GetFromAsMsEpoch ¶
func (*TimeRange) GetToAsMsEpoch ¶
func (*TimeRange) MustGetFrom ¶
type TimeSeries ¶
type TimeSeries struct { Name string `json:"name"` Points TimeSeriesPoints `json:"points"` }
func NewTimeSeries ¶
func NewTimeSeries(name string, points TimeSeriesPoints) *TimeSeries
type TimeSeriesPoints ¶
type TimeSeriesPoints []TimePoint
func NewTimeSeriesPointsFromArgs ¶
func NewTimeSeriesPointsFromArgs(values ...float64) TimeSeriesPoints
type TimeSeriesSlice ¶
type TimeSeriesSlice []*TimeSeries
Source Files ¶
Click to show internal directories.
Click to hide internal directories.