Influx: Support PDC for Influx SQL (#103032)
* Support PDC for Influx SQL * Correctly set the gRPC transport creds dial option * Logging and refactor * Allow URLs with no scheme * Use passthrough resolver for socks proxy * Update comment * Extract url parsing and add test * Check err
This commit is contained in:
@@ -72,6 +72,12 @@ func newInstanceSettings(httpClientProvider httpclient.Provider) datasource.Inst
|
||||
database = settings.Database
|
||||
}
|
||||
|
||||
proxyClient, err := settings.ProxyClient(ctx)
|
||||
if err != nil {
|
||||
logger.Error("influx proxy creation failed", "error", err)
|
||||
return nil, fmt.Errorf("influx proxy creation failed")
|
||||
}
|
||||
|
||||
model := &models.DatasourceInfo{
|
||||
HTTPClient: client,
|
||||
URL: settings.URL,
|
||||
@@ -85,6 +91,7 @@ func newInstanceSettings(httpClientProvider httpclient.Provider) datasource.Inst
|
||||
InsecureGrpc: jsonData.InsecureGrpc,
|
||||
Token: settings.DecryptedSecureJSONData["token"],
|
||||
Timeout: opts.Timeouts.Timeout,
|
||||
ProxyClient: proxyClient,
|
||||
}
|
||||
return model, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user