Use cache for http.client in tsdb package. (#6833)

* datasource: move caching closer to datasource struct

* tsdb: use cached version of datasource http transport

closes #6825
This commit is contained in:
Carl Bergquist
2016-12-07 11:10:42 +01:00
committed by Torkel Ödegaard
parent 24172fca01
commit 2c7adccf12
20 changed files with 385 additions and 363 deletions
+2 -15
View File
@@ -2,6 +2,7 @@ package tsdb
import (
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/models"
"gopkg.in/guregu/null.v3"
)
@@ -9,7 +10,7 @@ type Query struct {
RefId string
Model *simplejson.Json
Depends []string
DataSource *DataSourceInfo
DataSource *models.DataSource
Results []*TimeSeries
Exclude bool
MaxDataPoints int64
@@ -28,20 +29,6 @@ type Response struct {
Results map[string]*QueryResult `json:"results"`
}
type DataSourceInfo struct {
Id int64
Name string
PluginId string
Url string
Password string
User string
Database string
BasicAuth bool
BasicAuthUser string
BasicAuthPassword string
JsonData *simplejson.Json
}
type BatchTiming struct {
TimeElapsed int64
}