Documentation
¶
Index ¶
- Variables
- func InitMetrics(config types.Config, rmgr resource.Manager, ...) error
- type Metrics
- func (m *Metrics) RemoveInvalidNodes(invalidNode string)
- func (m *Metrics) ResourceMiddleware(cluster cluster.Cluster) func(http.Handler) http.Handler
- func (m *Metrics) SendDeployCount(ctx context.Context, n int)
- func (m *Metrics) SendMetrics(ctx context.Context, metrics ...*plugintypes.Metrics)
- func (m *Metrics) SendPodNodeStatus(ctx context.Context, node *types.Node)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Client = Metrics{}
)
Functions ¶
func InitMetrics ¶
func InitMetrics(config types.Config, rmgr resource.Manager, metricsDescriptions []*plugintypes.MetricsDescription) error
InitMetrics builds the global metrics client and registers its collectors.
Types ¶
type Metrics ¶
type Metrics struct {
Config types.Config
StatsdAddr string
Hostname string
Collectors map[string]prometheus.Collector
// contains filtered or unexported fields
}
Metrics ships core metrics to Prometheus and statsd.
func (*Metrics) RemoveInvalidNodes ¶
RemoveInvalidNodes drops Prometheus label sets for a node that no longer exists.
func (*Metrics) ResourceMiddleware ¶
ResourceMiddleware refreshes node metrics before the wrapped handler runs.
func (*Metrics) SendMetrics ¶
func (m *Metrics) SendMetrics(ctx context.Context, metrics ...*plugintypes.Metrics)
Click to show internal directories.
Click to hide internal directories.