Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetricSet ¶
func NewMetricSet(name, help string) *metricSet
Types ¶
type Config ¶
type Config struct { // `yaml:"targets"` Targets []Target }
func ReadConfig ¶
func ReadConfig(mapper meta.RESTMapper, path string) (Config, error)
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
func NewExporter ¶
func NewExporter(updatesChan <-chan TargetsStatusUpdate, server Server, metricName, metricDescription string) *Exporter
type MetricSet ¶
MetricSet is an expasion of prom.Collector interface that allows batch updates of metrics. Useful when processing a set of metrics that are later exposed to Prometheus via different metric.
type MonitorPoller ¶
type MonitorPoller struct {
// contains filtered or unexported fields
}
StatusPoller polls the status of a set of objects at a regular interval.
func NewMonitorPoller ¶
func (*MonitorPoller) Start ¶
func (s *MonitorPoller) Start(ctx context.Context) <-chan TargetsStatusUpdate
Start starts the poller and returns a channel that will receive status updates. The poller will run until the context is canceled. The channel will be closed when the context is canceled.
type Server ¶
type Server interface { // Handle registers a handler for the given pattern, similar to http.Handle. Handle(pattern string, handler http.Handler) // Start starts the server and blocks until the server is stopped. Start(ctx context.Context) error }
Server is the interface for serving the metrics.
type SimpleServer ¶
type SimpleServer struct {
// contains filtered or unexported fields
}
func NewSimpleServer ¶
func NewSimpleServer(host string, port int) *SimpleServer
type TargetStatuses ¶
type TargetStatuses struct { Target Target Statuses []status.ObjectStatus }
type TargetsStatusUpdate ¶
type TargetsStatusUpdate struct {
Statuses []TargetStatuses
}
func (TargetsStatusUpdate) ToStatusUpdate ¶
func (t TargetsStatusUpdate) ToStatusUpdate() eval.StatusUpdate
type YAMLConfig ¶
Click to show internal directories.
Click to hide internal directories.