Documentation ¶
Overview ¶
Package metrics contains controller metrics generation functions.
Index ¶
- func AddMetrics(gvk schema.GroupVersionKind, mgr manager.Manager, h Handler, ...) error
- func DeleteERSMetrics(ersName, ersNamespace string)
- func RegisterEndpoint(mgr ctrl.Manager, register func(string, http.Handler) error) error
- func RegisterHandlerFunc(h func(manager.Manager, Handler) error)
- func SetLeader(leaderValue bool)
- func SetRollingUpdateStuckMetric(ersName, ersNamespace string, isStuck bool)
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMetrics ¶
func AddMetrics(gvk schema.GroupVersionKind, mgr manager.Manager, h Handler, metricFamilies []ksmetric.FamilyGenerator) error
AddMetrics add given metricFamilies for type given in gvk.
func DeleteERSMetrics ¶ added in v0.6.0
func DeleteERSMetrics(ersName, ersNamespace string)
DeleteERSMetrics removes metrics related to a specific ERS To be called by the EDS controller when removing ERS objects.
func RegisterEndpoint ¶
RegisterEndpoint add custom metrics endpoint to existing HTTP Listener.
func RegisterHandlerFunc ¶
RegisterHandlerFunc register a function to be added to endpoint when its registered.
func SetLeader ¶ added in v0.4.0
func SetLeader(leaderValue bool)
SetLeader sets the edsLeader gauge.
func SetRollingUpdateStuckMetric ¶ added in v0.6.0
SetRollingUpdateStuckMetric updates the ers_rolling_update_stuck metric value To be called by the ERS rolling update logic.
Types ¶
type Handler ¶
type Handler interface {
RegisterStore(generators []ksmetric.FamilyGenerator, expectedType interface{}, lw cache.ListerWatcher) error
}
Handler use to registry controller metrics.
Click to show internal directories.
Click to hide internal directories.