Documentation
¶
Overview ¶
Package server implements an http server to export metrics in Prometheus format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
BindAddr string // Address to bind the server to.
BindCert, BindKey string // Paths to Certificate and Key.
CaCert string // Path to the Root CA.
Endpoint string // Endpoint for metrics
RewriteHistograms bool // Enable histogram rewriting
Insecure bool // Sanity check to ensure that the operator really means it.
Prometheus string // URL for the node prometheus endpoint
Refresh time.Duration // how often to refresh the configuration.
URL string // URL to connect to the database
ProcMetrics bool // Enable collections of process metrics.
VisusMetrics bool // Enable collection of visus metrics.
}
Config encapsulates the command-line configurations and the logic necessary to make those values usable.
type Server ¶
type Server interface {
// Refresh the server configuration
Refresh(ctx context.Context) error
// Start the server
Start(ctx context.Context) error
// Shutdown the server, releasing all the resources associated with it.
Shutdown(ctx context.Context) error
}
A Server is a process that can be started and shutdown.
Click to show internal directories.
Click to hide internal directories.