Documentation ¶
Overview ¶
Package metricobserver provides an implementation of apiserver/observer.ObserverFactory that maintains Prometheus metrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewObserverFactory ¶
func NewObserverFactory(config Config) (observer.ObserverFactory, error)
NewObserverFactory returns a function that, when called, returns a new Observer. NewObserverFactory registers the API request metrics, and each Observer updates those metrics.
Types ¶
type Config ¶
type Config struct { // Clock is the clock to use for all time-related operations. Clock clock.Clock // PrometheusRegisterer is the prometheus.Registerer in which metric // collectors will be registered. PrometheusRegisterer prometheus.Registerer }
Config contains the configuration for an Observer.
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
Observer is an API server request observer that collects Prometheus metrics.
func (*Observer) RPCObserver ¶
RPCObserver is part of the observer.Observer interface.
Click to show internal directories.
Click to hide internal directories.