Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Jun 7, 2022
1 parent 4894766 commit 973a89f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/exporter/consensus/api/types/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (p *Peers) ByDirection(direction string) Peers {
return peers
}

func (p *Peers) ByStateAndDirection(state string, direction string) Peers {
func (p *Peers) ByStateAndDirection(state, direction string) Peers {
var peers []Peer

for _, peer := range *p {
Expand Down
14 changes: 7 additions & 7 deletions pkg/exporter/consensus/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ type metrics struct {
}

// NewMetrics returns a new metrics object.
func NewMetrics(client eth2client.Service, api api.ConsensusClient, log logrus.FieldLogger, nodeName, namespace string) Metrics {
func NewMetrics(client eth2client.Service, ap api.ConsensusClient, log logrus.FieldLogger, nodeName, namespace string) Metrics {
constLabels := make(prometheus.Labels)
constLabels["ethereum_role"] = "consensus"
constLabels["node_name"] = nodeName

m := &metrics{
log: log,
client: client,
generalMetrics: jobs.NewGeneralJob(client, api, log, namespace, constLabels),
specMetrics: jobs.NewSpecJob(client, api, log, namespace, constLabels),
syncMetrics: jobs.NewSyncJob(client, api, log, namespace, constLabels),
forkMetrics: jobs.NewForksJob(client, api, log, namespace, constLabels),
beaconMetrics: jobs.NewBeaconJob(client, api, log, namespace, constLabels),
eventMetrics: jobs.NewEventJob(client, api, log, namespace, constLabels),
generalMetrics: jobs.NewGeneralJob(client, ap, log, namespace, constLabels),
specMetrics: jobs.NewSpecJob(client, ap, log, namespace, constLabels),
syncMetrics: jobs.NewSyncJob(client, ap, log, namespace, constLabels),
forkMetrics: jobs.NewForksJob(client, ap, log, namespace, constLabels),
beaconMetrics: jobs.NewBeaconJob(client, ap, log, namespace, constLabels),
eventMetrics: jobs.NewEventJob(client, ap, log, namespace, constLabels),
}

prometheus.MustRegister(m.generalMetrics.Slots)
Expand Down

0 comments on commit 973a89f

Please sign in to comment.