Skip to content

Commit

Permalink
adding lint fix update
Browse files Browse the repository at this point in the history
  • Loading branch information
miledxz committed Aug 29, 2024
1 parent 7be17ee commit 1a56441
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion internal/mode/static/metrics/collectors/nginx.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package collectors

import (
"fmt"

"github.com/go-kit/log"
"github.com/nginxinc/nginx-plus-go-client/client"
prometheusClient "github.com/nginxinc/nginx-prometheus-exporter/client"
nginxCollector "github.com/nginxinc/nginx-prometheus-exporter/collector"
"github.com/prometheus/client_golang/prometheus"
Expand Down Expand Up @@ -29,8 +32,12 @@ func NewNginxPlusMetricsCollector(
constLabels map[string]string,
logger log.Logger,
) (prometheus.Collector, error) {
nc, ok := plusClient.(*client.NginxClient)
if !ok {
panic(fmt.Sprintf("expected *client.NginxClient, got %T", plusClient))
}
collector := nginxCollector.NewNginxPlusCollector(
plusClient,
nc,
metrics.Namespace,
nginxCollector.VariableLabelNames{},
constLabels,
Expand Down
2 changes: 1 addition & 1 deletion internal/mode/static/nginx/runtime/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type (

var childProcPathFmt = "/proc/%[1]v/task/%[1]v/children"

//counterfeiter:generate . nginxPlusClient
//counterfeiter:generate . NginxPlusClient

type NginxPlusClient interface {
UpdateHTTPServers(
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1a56441

Please sign in to comment.