fix(http): separate InfluxQL and Flux services

Previously the APIBackend understood only a ProxyQueryService,
but it needs to understand that there are two implementations of the
ProxyQueryService one for handling InfluxQL queries and one for handling
Flux queries. The names of the fields have been updated to make this
clear. As well as the FluxBackend is now initialized using the
FluxService explicitly.
pull/12096/head
Nathaniel Cook 2019-02-22 10:11:41 -07:00
parent 12a604172f
commit a75adf6c4b
3 changed files with 5 additions and 3 deletions

View File

@ -535,7 +535,8 @@ func (m *Launcher) run(ctx context.Context) (err error) {
VariableService: variableSvc,
PasswordsService: passwdsSvc,
OnboardingService: onboardingSvc,
ProxyQueryService: storageQueryService,
InfluxQLService: nil, // No InfluxQL support
FluxService: storageQueryService,
TaskService: taskSvc,
TelegrafService: telegrafSvc,
ScraperTargetStoreService: scraperTargetSvc,

View File

@ -61,7 +61,8 @@ type APIBackend struct {
VariableService influxdb.VariableService
PasswordsService influxdb.PasswordsService
OnboardingService influxdb.OnboardingService
ProxyQueryService query.ProxyQueryService
InfluxQLService query.ProxyQueryService
FluxService query.ProxyQueryService
TaskService influxdb.TaskService
TelegrafService influxdb.TelegrafConfigStore
ScraperTargetStoreService influxdb.ScraperTargetStoreService

View File

@ -42,7 +42,7 @@ func NewFluxBackend(b *APIBackend) *FluxBackend {
return &FluxBackend{
Logger: b.Logger.With(zap.String("handler", "query")),
ProxyQueryService: b.ProxyQueryService,
ProxyQueryService: b.FluxService,
OrganizationService: b.OrganizationService,
}
}