Fix some comments

Signed-off-by: eveneast <qcqs@foxmail.com>
pull/7678/head
eveneast 2024-04-15 14:47:25 +08:00
parent 74e355f3c8
commit d0350960b6
4 changed files with 5 additions and 5 deletions

View File

@ -587,7 +587,7 @@ func (m *ServerMetrics) RemoveSchedule(scheduleName string) {
}
}
// InitSchedule initializes counter metrics for a node.
// InitMetricsForNode initializes counter metrics for a node.
func (m *ServerMetrics) InitMetricsForNode(node string) {
if c, ok := m.metrics[podVolumeBackupEnqueueTotal].(*prometheus.CounterVec); ok {
c.WithLabelValues(node).Add(0)

View File

@ -442,7 +442,7 @@ func generateIncludesExcludes(includes, excludes []string, mapFunc func(string)
return res
}
// generateScopedIncludesExcludes's function is similar with generateIncludesExcludes,
// generateScopedIncludesExcludes function is similar with generateIncludesExcludes,
// but it's used for scoped Includes/Excludes.
func generateScopedIncludesExcludes(namespacedIncludes, namespacedExcludes, clusterIncludes, clusterExcludes []string, mapFunc func(string, bool) string, nsIncludesExcludes IncludesExcludes, helper discovery.Helper, logger logrus.FieldLogger) *ScopeIncludesExcludes {
res := newScopeIncludesExcludes(nsIncludesExcludes, helper, logger)
@ -508,7 +508,7 @@ func GetGlobalResourceIncludesExcludes(helper discovery.Helper, logger logrus.Fi
return ret
}
// GetScopeResourceIncludesExcludes's function is similar with GetResourceIncludesExcludes,
// GetScopeResourceIncludesExcludes function is similar with GetResourceIncludesExcludes,
// but it's used for scoped Includes/Excludes, and can handle both cluster-scoped and namespace-scoped resources.
func GetScopeResourceIncludesExcludes(helper discovery.Helper, logger logrus.FieldLogger, namespaceIncludes, namespaceExcludes, clusterIncludes, clusterExcludes []string, nsIncludesExcludes IncludesExcludes) *ScopeIncludesExcludes {
ret := generateScopedIncludesExcludes(

View File

@ -83,7 +83,7 @@ func backup_deletion_test(useVolumeSnapshots bool) {
})
}
// runUpgradeTests runs upgrade test on the provider by kibishii.
// runBackupDeletionTests runs upgrade test on the provider by kibishii.
func runBackupDeletionTests(client TestClient, veleroCfg VeleroConfig, backupName, backupLocation string,
useVolumeSnapshots bool, kibishiiDirectory string) error {
if useVolumeSnapshots && veleroCfg.CloudProvider == "kind" {

View File

@ -70,7 +70,7 @@ func (m *MetricsCollector) UpdateMetrics() {
}
}
// UpdateMetrics periodically updates the one-time metrics for all metrics
// UpdateOneTimeMetrics periodically updates the one-time metrics for all metrics
func (m *MetricsCollector) UpdateOneTimeMetrics() {
// NotifyOneTimeMonitors notifies the one-time metrics about the metric
for _, metric := range m.OneTimeMetrics {