common

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CRStatus = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: metricNamespace,
			Name:      "resource_status",
			Help:      "Rollup CR statistics, partitioned by name.",
		},
		[]string{

			"resource_name",
		},
	)
)

Functions

func AddStepDuration

func AddStepDuration(groupName string, stepName string, duration time.Duration)

Add rolling update step duration when the step is completed

func ContainsEqualFold

func ContainsEqualFold(slice []string, s string) bool

ContainsEqualFold returns true if a given slice 'slice' contains string 's' under unicode case-folding

func GetChunks

func GetChunks(items []string, chunkSize int) [][]string

func GetSyncMapLen

func GetSyncMapLen(m *sync.Map) int

GetSyncMapLen returns the length of a sync.Map

func InitMetrics

func InitMetrics()

func IntMax

func IntMax(a, b int) int

func IntMin

func IntMin(a, b int) int

func SetMetricRollupCompleted

func SetMetricRollupCompleted(ruName string)

func SetMetricRollupFailed

func SetMetricRollupFailed(ruName string)

func SetMetricRollupInitOrRunning

func SetMetricRollupInitOrRunning(ruName string)

func SetNodesProcessedMetric

func SetNodesProcessedMetric(groupName string, nodesProcessed int)

func SetTotalNodesMetric

func SetTotalNodesMetric(groupName string, nodes int)

func TotalProcessingTime

func TotalProcessingTime(groupName string, duration time.Duration)

observe total processing time

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL