mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
Elasticsearch: Remove GetMinInterval method that is not used anymore
This commit is contained in:
parent
bf687fff45
commit
a157003902
@ -16,7 +16,6 @@ import (
|
|||||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||||
|
|
||||||
"github.com/grafana/grafana/pkg/infra/log"
|
"github.com/grafana/grafana/pkg/infra/log"
|
||||||
"github.com/grafana/grafana/pkg/tsdb/intervalv2"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type DatasourceInfo struct {
|
type DatasourceInfo struct {
|
||||||
@ -44,7 +43,6 @@ const loggerName = "tsdb.elasticsearch.client"
|
|||||||
// Client represents a client which can interact with elasticsearch api
|
// Client represents a client which can interact with elasticsearch api
|
||||||
type Client interface {
|
type Client interface {
|
||||||
GetConfiguredFields() ConfiguredFields
|
GetConfiguredFields() ConfiguredFields
|
||||||
GetMinInterval(queryInterval string) (time.Duration, error)
|
|
||||||
ExecuteMultisearch(r *MultiSearchRequest) (*MultiSearchResponse, error)
|
ExecuteMultisearch(r *MultiSearchRequest) (*MultiSearchResponse, error)
|
||||||
MultiSearch() *MultiSearchRequestBuilder
|
MultiSearch() *MultiSearchRequestBuilder
|
||||||
}
|
}
|
||||||
@ -87,11 +85,6 @@ func (c *baseClientImpl) GetConfiguredFields() ConfiguredFields {
|
|||||||
return c.configuredFields
|
return c.configuredFields
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *baseClientImpl) GetMinInterval(queryInterval string) (time.Duration, error) {
|
|
||||||
timeInterval := c.ds.TimeInterval
|
|
||||||
return intervalv2.GetIntervalFrom(queryInterval, timeInterval, 0, 5*time.Second)
|
|
||||||
}
|
|
||||||
|
|
||||||
type multiRequest struct {
|
type multiRequest struct {
|
||||||
header map[string]interface{}
|
header map[string]interface{}
|
||||||
body interface{}
|
body interface{}
|
||||||
|
@ -1712,10 +1712,6 @@ func (c *fakeClient) GetConfiguredFields() es.ConfiguredFields {
|
|||||||
return c.configuredFields
|
return c.configuredFields
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *fakeClient) GetMinInterval(queryInterval string) (time.Duration, error) {
|
|
||||||
return 15 * time.Second, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *fakeClient) ExecuteMultisearch(r *es.MultiSearchRequest) (*es.MultiSearchResponse, error) {
|
func (c *fakeClient) ExecuteMultisearch(r *es.MultiSearchRequest) (*es.MultiSearchResponse, error) {
|
||||||
c.multisearchRequests = append(c.multisearchRequests, r)
|
c.multisearchRequests = append(c.multisearchRequests, r)
|
||||||
return c.multiSearchResponse, c.multiSearchError
|
return c.multiSearchResponse, c.multiSearchError
|
||||||
|
Loading…
Reference in New Issue
Block a user