mirror of https://github.com/certusone/vouch.git
Linting.
Fix lint warnings given by revive (successor to golint).
This commit is contained in:
parent
4598f9f639
commit
919a519b32
|
@ -24,11 +24,7 @@ func (s *Service) setupAccountManagerMetrics() error {
|
|||
Name: "accounts_total",
|
||||
Help: "The number of accounts managed by Vouch.",
|
||||
}, []string{"state"})
|
||||
if err := prometheus.Register(s.accountManagerAccounts); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return prometheus.Register(s.accountManagerAccounts)
|
||||
}
|
||||
|
||||
// Accounts sets the number of accounts in a given state.
|
||||
|
|
|
@ -41,11 +41,7 @@ func (s *Service) setupAttestationMetrics() error {
|
|||
Name: "requests_total",
|
||||
Help: "The number of attestation processes.",
|
||||
}, []string{"result"})
|
||||
if err := prometheus.Register(s.attestationProcessRequests); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return prometheus.Register(s.attestationProcessRequests)
|
||||
}
|
||||
|
||||
// AttestationsCompleted is called when an attestation process has completed.
|
||||
|
|
|
@ -53,11 +53,7 @@ func (s *Service) setupAttestationAggregationMetrics() error {
|
|||
Help: "The ratio of included to possible attestations in the aggregate.",
|
||||
Buckets: []float64{0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0},
|
||||
})
|
||||
if err := prometheus.Register(s.attestationAggregationCoverageRatio); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return prometheus.Register(s.attestationAggregationCoverageRatio)
|
||||
}
|
||||
|
||||
// AttestationAggregationCompleted is called when an attestation aggregationprocess has completed.
|
||||
|
|
|
@ -41,11 +41,7 @@ func (s *Service) setupBeaconBlockProposalMetrics() error {
|
|||
Name: "requests_total",
|
||||
Help: "The number of beacon block proposal processes.",
|
||||
}, []string{"result"})
|
||||
if err := prometheus.Register(s.beaconBlockProposalProcessRequests); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return prometheus.Register(s.beaconBlockProposalProcessRequests)
|
||||
}
|
||||
|
||||
// BeaconBlockProposalCompleted is called when a block proposal process has completed.
|
||||
|
|
|
@ -61,11 +61,7 @@ func (s *Service) setupBeaconCommitteeSubscriptionMetrics() error {
|
|||
Name: "aggregators_total",
|
||||
Help: "The number of beacon committee aggregated.",
|
||||
})
|
||||
if err := prometheus.Register(s.beaconCommitteeAggregators); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return prometheus.Register(s.beaconCommitteeAggregators)
|
||||
}
|
||||
|
||||
// BeaconCommitteeSubscriptionCompleted is called when an beacon committee subscription process has completed.
|
||||
|
|
|
@ -64,11 +64,7 @@ func (s *Service) setupClientMetrics() error {
|
|||
3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0,
|
||||
},
|
||||
}, []string{"strategy", "provider", "operation"})
|
||||
if err := prometheus.Register(s.strategyOperationTimer); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return prometheus.Register(s.strategyOperationTimer)
|
||||
}
|
||||
|
||||
// ClientOperation registers an operation.
|
||||
|
|
|
@ -50,11 +50,7 @@ func (s *Service) setupControllerMetrics() error {
|
|||
11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 11.9, 12.0,
|
||||
},
|
||||
}, []string{"epoch_slot"})
|
||||
if err := prometheus.Register(s.blockReceiptDelay); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return prometheus.Register(s.blockReceiptDelay)
|
||||
}
|
||||
|
||||
// NewEpoch is called when vouch starts processing a new epoch.
|
||||
|
|
|
@ -44,11 +44,7 @@ func (s *Service) setupSchedulerMetrics() error {
|
|||
Name: "jobs_started_total",
|
||||
Help: "The total number of scheduled jobs started.",
|
||||
}, []string{"trigger"})
|
||||
if err := prometheus.Register(s.schedulerJobsStarted); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return prometheus.Register(s.schedulerJobsStarted)
|
||||
}
|
||||
|
||||
// JobScheduled is called when a job is scheduled.
|
||||
|
|
|
@ -574,9 +574,5 @@ func SetupCerts(base string) error {
|
|||
if err := ioutil.WriteFile(filepath.Join(base, "client-test03.crt"), []byte(ClientTest03Crt), 0600); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := ioutil.WriteFile(filepath.Join(base, "client-test03.key"), []byte(ClientTest03Key), 0600); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return ioutil.WriteFile(filepath.Join(base, "client-test03.key"), []byte(ClientTest03Key), 0600)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue