Documentation
¶
Index ¶
- type Controller
- func (c *Controller) CollectMetrics() error
- func (c *Controller) ExportMetrics() ([]*io_prometheus_client.MetricFamily, error)
- func (c *Controller) Init(configFileLoader func() ([]byte, error)) error
- func (c *Controller) Log(level string, msg string, args ...any)
- func (c *Controller) PersistMetrics(timeSeries []prompb.TimeSeries) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
Logger types.Logger
Config types.Config
Collector types.MetricCollector
Persister types.MetricPersister
}
func (*Controller) CollectMetrics ¶
func (c *Controller) CollectMetrics() error
GetRegistry returns the prometheus registry from the Collector component
func (*Controller) ExportMetrics ¶ added in v1.0.0
func (c *Controller) ExportMetrics() ([]*io_prometheus_client.MetricFamily, error)
GetRegistry extracts the metrics from the prometheus registry in the Collector component
func (*Controller) Init ¶
func (c *Controller) Init(configFileLoader func() ([]byte, error)) error
Init initializes all components of the controller
func (*Controller) Log ¶
func (c *Controller) Log(level string, msg string, args ...any)
Log extends the logger interface
func (*Controller) PersistMetrics ¶
func (c *Controller) PersistMetrics(timeSeries []prompb.TimeSeries) error
PersistMetrics extends the underlying method and persists timeseries to the remote write endpoint
Click to show internal directories.
Click to hide internal directories.