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 Config ¶
type Config struct {
ListenAddr 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) GetListenAddr ¶
GetListenAddr returns the configured listen address.
func (*Server) Start ¶
func (s *Server) Start(registry *prometheus.Registry, datasourceCollector *exporter.DatasourceCollector) (<-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.
Click to show internal directories.
Click to hide internal directories.