Skip to content

Commit fa87ac2

Browse files
committed
Renamed AcsCustomMetrics per PR suggestion.
1 parent 1595bc5 commit fa87ac2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

pkg/cloud/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type client struct {
4444
cs *cloudstack.CloudStackClient
4545
csAsync *cloudstack.CloudStackClient
4646
config Config
47-
customMetrics metrics.AcsCustomMetrics
47+
customMetrics metrics.ACSCustomMetrics
4848
}
4949

5050
// cloud-config ini structure.

pkg/metrics/metrics.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ import (
2424
)
2525

2626
// AcsCustomMetrics encapsulates all CloudStack custom metrics defined for the controller.
27-
type AcsCustomMetrics struct {
27+
type ACSCustomMetrics struct {
2828
acsReconciliationErrorCount *prometheus.CounterVec
2929
errorCodeRegexp *regexp.Regexp
3030
}
3131

32-
// NewCustomMetrics constructs an AcsCustomMetrics with all desired CloudStack custom metrics and any supporting resources.
33-
func NewCustomMetrics() AcsCustomMetrics {
34-
customMetrics := AcsCustomMetrics{}
32+
// NewCustomMetrics constructs an ACSCustomMetrics with all desired CloudStack custom metrics and any supporting resources.
33+
func NewCustomMetrics() ACSCustomMetrics {
34+
customMetrics := ACSCustomMetrics{}
3535
customMetrics.acsReconciliationErrorCount = prometheus.NewCounterVec(
3636
prometheus.CounterOpts{
3737
Name: "acs_reconciliation_errors",
@@ -55,9 +55,9 @@ func NewCustomMetrics() AcsCustomMetrics {
5555
return customMetrics
5656
}
5757

58-
// IncrementAcsReconciliationErrors accepts a CloudStack error message and increments the custom
59-
// acs_reconciliation_errors counter, labeled with the error code if present in the error message.
60-
func (m *AcsCustomMetrics) EvaluateErrorAndIncrementAcsReconciliationErrorCounter(acsError error) {
58+
// EvaluateErrorAndIncrementAcsReconciliationErrorCounter accepts a CloudStack error message and increments
59+
// the custom acs_reconciliation_errors counter, labeled with the error code if present in the error message.
60+
func (m *ACSCustomMetrics) EvaluateErrorAndIncrementAcsReconciliationErrorCounter(acsError error) {
6161
if acsError != nil {
6262
matches := m.errorCodeRegexp.FindStringSubmatch(acsError.Error())
6363
if len(matches) > 1 {

0 commit comments

Comments
 (0)