package
0.0.0-20250307132128-f14afd9d6f4b
Repository: https://github.com/codeready-toolchain/host-operator.git
Documentation: pkg.go.dev

# Functions

DecrementMasterUserRecordCount decreases the number of MasterUserRecord in the cached counter.
DecrementSpaceCount decreases the number of Spaces for the given member cluster in the cached counter.
GetCountsSnapshot() returns Counts struct containing number of MURs and number of UserAccounts per member cluster as they were at the moment of the call.
GetSpaceCountPerClusterSnapshot is a specialization of the GetCountsSnapshot function that retrieves just the map of the space counts per cluster.
IncrementMasterUserRecordCount increments the number of MasterUserRecord in the cached counter.
IncrementSpaceCount increments the number of Space's for the given member cluster in the cached counter.
Reset resets the cached counter - is supposed to be used only in tests.
Synchronize synchronizes the content of the ToolchainStatus with the cached counter If the counter hasn't been initialized yet, then it adds the actual cached count to the one taken from ToolchainStatus and marks the cached as initialized If the ToolchainStatus doesn't contain any MUR counts, then it lists all existing MURs, counts them and stores in both cache and ToolchainStatus object If the cached counter is initialized and ToolchainStatus contains already some numbers then it updates the ToolchainStatus numbers with the one taken from the cached counter.
UpdateUsersPerActivationCounters updates the activation counters and metrics When a user signs up for the 1st time, her `activations` number is `1`, on the second time, it's `2`, etc.

# Structs

Counts is type that contains number of MURs and number of UserAccounts per member cluster.