mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 10:50:37 -06:00
22 lines
470 B
Go
22 lines
470 B
Go
package tsdb
|
|
|
|
import "sync"
|
|
|
|
type QueryContext struct {
|
|
TimeRange TimeRange
|
|
Queries QuerySlice
|
|
Results map[string]*QueryResult
|
|
ResultsChan chan *BatchResult
|
|
Lock sync.RWMutex
|
|
BatchWaits sync.WaitGroup
|
|
}
|
|
|
|
func NewQueryContext(queries QuerySlice, timeRange TimeRange) *QueryContext {
|
|
return &QueryContext{
|
|
TimeRange: timeRange,
|
|
Queries: queries,
|
|
ResultsChan: make(chan *BatchResult),
|
|
Results: make(map[string]*QueryResult),
|
|
}
|
|
}
|