Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( BundleCollector = CollectorCollection{ // contains filtered or unexported fields } )
var ( BundleDeploymentCollector = CollectorCollection{ // contains filtered or unexported fields } )
var (
ClusterCollector = CollectorCollection{
clusterSubsystem,
clusterMetrics,
collectClusterMetrics,
}
)
var (
ClusterGroupCollector = CollectorCollection{
clusterGroupSubsystem,
clusterGroupMetrics,
collectClusterGroupMetrics,
}
)
var (
GitRepoCollector = CollectorCollection{
gitRepoSubsystem,
gitRepoMetrics,
collectGitRepoMetrics,
}
)
Functions ¶
func RegisterGitOptsMetrics ¶
func RegisterGitOptsMetrics()
func RegisterMetrics ¶
func RegisterMetrics()
Types ¶
type CollectorCollection ¶
type CollectorCollection struct {
// contains filtered or unexported fields
}
CollectorCollection implements the generic methods `Delete` and `Register` for a collection of Prometheus collectors. It is used to manage the lifecycle of a collection of Prometheus collectors.
func (*CollectorCollection) Collect ¶
func (c *CollectorCollection) Collect(ctx context.Context, obj metav1.ObjectMetaAccessor)
Collect collects the metrics for the given object. It deletes the metrics for the object if they already exist and then collects the metrics for the object.
The metrics need to be deleted because the values of the metrics may have changed and this would create a new instance of those metrics, keeping the old one around. Metrics are deleted by their name and namespace label values.
func (*CollectorCollection) Delete ¶
func (c *CollectorCollection) Delete(name, namespace string) (deleted int)
Delete deletes the metric with the given name and namespace labels. It returns the number of metrics deleted. It does a DeletePartialMatch on the metric with the given name and namespace labels.
func (*CollectorCollection) Register ¶
func (c *CollectorCollection) Register()