diff --git a/internal/raft/config.go b/internal/raft/config.go index 2dbd5e6..0785883 100644 --- a/internal/raft/config.go +++ b/internal/raft/config.go @@ -31,7 +31,7 @@ type Config struct { // If we are a member of a cluster, and RemovePeer is invoked for the // local node, then we forget all peers and transition into the follower state. - // If ShutdownOnRemove is is set, we additional shutdown Raft. Otherwise, + // If ShutdownOnRemove is set, we additionally shutdown Raft. Otherwise, // we can become a leader of a cluster containing only this node. ShutdownOnRemove bool diff --git a/internal/raft/inmem_transport.go b/internal/raft/inmem_transport.go index 2d5f319..5f87781 100644 --- a/internal/raft/inmem_transport.go +++ b/internal/raft/inmem_transport.go @@ -8,7 +8,7 @@ import ( ) // NewInmemAddr returns a new in-memory addr with -// a randomly generate UUID as the ID. +// a randomly generated UUID as the ID. func NewInmemAddr() string { return generateUUID() } diff --git a/pkg/config/config.go b/pkg/config/config.go index 8a54fff..140c18c 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -47,7 +47,7 @@ func newConfiguration() *Configuration { // Read reads configuration from all given files, in order of input. // Each file can override the properties of the previous files -// Initially, the settings are the defult ones defined by newConfigurationSettings +// Initially, the settings are the default ones defined by newConfigurationSettings func (config *Configuration) Read(fileNames ...string) error { settings := newConfigurationSettings() @@ -89,7 +89,7 @@ func (config *Configuration) Reload() error { // ConfigurationSettings models a set of configurable values, that can be // provided by the user via one or several JSON formatted files. // -// Some of the settinges have reasonable default values, and some other +// Some of the settings have reasonable default values, and some other // (like database credentials) are strictly expected from user. type ConfigurationSettings struct { ListenPort int diff --git a/pkg/config/mysql_config.go b/pkg/config/mysql_config.go index 8e5a7bf..89f6fb3 100644 --- a/pkg/config/mysql_config.go +++ b/pkg/config/mysql_config.go @@ -18,7 +18,7 @@ type MySQLClusterConfigurationSettings struct { CacheMillis int // override MySQLConfigurationSettings's, or leave empty to inherit those settings ThrottleThreshold float64 // override MySQLConfigurationSettings's, or leave empty to inherit those settings Port int // Specify if different than 3306 or if different than specified by MySQLConfigurationSettings - IgnoreHostsCount int // Number of hosts that can be skipped/ignored even on error or on exceeding theesholds + IgnoreHostsCount int // Number of hosts that can be skipped/ignored even on error or on exceeding thresholds IgnoreHostsThreshold float64 // Threshold beyond which IgnoreHostsCount applies (default: 0) HttpCheckPort int // Specify if different than specified by MySQLConfigurationSettings. -1 to disable HTTP check HttpCheckPath string // Specify if different than specified by MySQLConfigurationSettings @@ -55,7 +55,7 @@ type MySQLConfigurationSettings struct { ThrottleThreshold float64 Port int // Specify if different than 3306; applies to all clusters IgnoreDialTcpErrors bool // Skip hosts where a metric cannot be retrieved due to TCP dial errors - IgnoreHostsCount int // Number of hosts that can be skipped/ignored even on error or on exceeding theesholds + IgnoreHostsCount int // Number of hosts that can be skipped/ignored even on error or on exceeding thresholds IgnoreHostsThreshold float64 // Threshold beyond which IgnoreHostsCount applies (default: 0) HttpCheckPort int // port for HTTP check. -1 to disable. HttpCheckPath string // If non-empty, requires HttpCheckPort diff --git a/pkg/group/store.go b/pkg/group/store.go index 9011699..acd2598 100644 --- a/pkg/group/store.go +++ b/pkg/group/store.go @@ -134,7 +134,7 @@ func (store *Store) genericCommand(c *command) error { return f.Error() } -// ThrottleApp, as implied by consensusService, is a raft oepration request which +// ThrottleApp, as implied by consensusService, is a raft operation request which // will ask for consensus. func (store *Store) ThrottleApp(appName string, ttlMinutes int64, expireAt time.Time, ratio float64) error { c := &command{ @@ -146,7 +146,7 @@ func (store *Store) ThrottleApp(appName string, ttlMinutes int64, expireAt time. return store.genericCommand(c) } -// UnthrottleApp, as implied by consensusService, is a raft oepration request which +// UnthrottleApp, as implied by consensusService, is a raft operation request which // will ask for consensus. func (store *Store) UnthrottleApp(appName string) error { c := &command{ diff --git a/pkg/throttle/check.go b/pkg/throttle/check.go index 0c1cc7b..8017ce1 100644 --- a/pkg/throttle/check.go +++ b/pkg/throttle/check.go @@ -25,7 +25,7 @@ type CheckFlags struct { var StandardCheckFlags = &CheckFlags{} -// ThrottlerCheck provides methdos for an app checking on metrics +// ThrottlerCheck provides methods for an app checking on metrics type ThrottlerCheck struct { throttler *Throttler } @@ -84,10 +84,10 @@ func (check *ThrottlerCheck) checkAppMetricResult(appName string, storeType stri } else if appName != frenoAppName && check.throttler.getShareDomainSecondsSinceHealth(metricName) >= 1 { // throttling based on shared domain metric. // we exclude the "freno" app itself, or else this could turn into a snowball: this service ("a") seeing - // another service ("b") as unhealthy, itself becoming unhealthy, makind b's read into a's state as unheathly, + // another service ("b") as unhealthy, itself becoming unhealthy, making b's read into a's state as unhealthy, // b reporting unhealthy, ad infinitum. - // The "freno" app is the one to generate those health metrics. It therefore must not participate the - // shared-domain dependency check., + // The "freno" app is the one to generate those health metrics. It therefore must not participate in the + // shared-domain dependency check. statusCode = http.StatusTooManyRequests // 429 err = base.ThresholdExceededError @@ -199,12 +199,12 @@ func (check *ThrottlerCheck) reportAggregated(metricName string, metricResult ba } } -// AggregatedMetrics is a convenience acces method into throttler's `aggregatedMetricsSnapshot` +// AggregatedMetrics is a convenience access method into throttler's `aggregatedMetricsSnapshot` func (check *ThrottlerCheck) AggregatedMetrics() map[string]base.MetricResult { return check.throttler.aggregatedMetricsSnapshot() } -// MetricsHealth is a convenience acces method into throttler's `metricsHealthSnapshot` +// MetricsHealth is a convenience access method into throttler's `metricsHealthSnapshot` func (check *ThrottlerCheck) MetricsHealth() map[string](*base.MetricHealth) { return check.throttler.metricsHealthSnapshot() }