Skip to content

Commit

Permalink
camelCase
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Lewin <[email protected]>
  • Loading branch information
lewinkedrs committed Dec 16, 2022
1 parent fc331b8 commit b183d17
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions metricproviders/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ func NewPrometheusAPI(metric v1alpha1.Metric) (v1.API, error) {
}

//Check if using Amazon Managed Prometheus if true build sigv4 client
prom_url := metric.Provider.Prometheus.Address
amzn_url_substring := "aps-workspaces"
promUrl := metric.Provider.Prometheus.Address
amznUrlSubstring := "aps-workspaces"

if strings.Contains(prom_url, amzn_url_substring) {
client, err := CreateSigV4Client(prom_url)
if strings.Contains(promUrl, amznUrlSubstring) {
client, err := CreateSigV4Client(promUrl)
if err != nil {
log.Errorf("Error in getting prometheus client: %v", err)
return nil, err
Expand Down Expand Up @@ -202,10 +202,10 @@ func IsUrl (str string) bool {
func CreateSigV4Client (address string) (api.Client, error) {
var cfg *sigv4.SigV4Config
var next http.RoundTripper
sigv4_RoundTripper, err := sigv4.NewSigV4RoundTripper(cfg,next)
sigv4RoundTripper, err := sigv4.NewSigV4RoundTripper(cfg,next)
client, err := api.NewClient(api.Config{
Address: address,
RoundTripper: sigv4_RoundTripper,
RoundTripper: sigv4RoundTripper,
})
return client, err
}

0 comments on commit b183d17

Please sign in to comment.