Documentation
¶
Overview ¶
Package server provides HTTP server functionality for exposing Prometheus metrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionProvider ¶ added in v0.11.0
CollectionProvider exposes collected crash artifact data.
type Config ¶
type Config struct {
ListenAddr string
DiagnosisListenAddr string
ReadHeaderTimeout time.Duration
ShutdownTimeout time.Duration
}
Config holds configuration for the Prometheus metrics server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a Prometheus metrics HTTP server.
func (*Server) GetDiagnosisListenAddr ¶ added in v0.11.0
GetDiagnosisListenAddr returns the configured diagnosis endpoint listen address.
func (*Server) GetListenAddr ¶
GetListenAddr returns the configured listen address.
func (*Server) Start ¶
func (s *Server) Start( registry *prometheus.Registry, datasourceCollector *exporter.DatasourceCollector, collectionProvider CollectionProvider, ) (<-chan error, error)
Start starts the Prometheus metrics server with the provided registry. It registers the DatasourceCollector and starts serving metrics on the configured address.