hub

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteInternalMetrics

func WriteInternalMetrics() (string, error)

Types

type MetricHub

type MetricHub struct {
	sync.Mutex
	// contains filtered or unexported fields
}

MetricHub serves as a replacement for the prometheus pushgateway. Accepts timestamps with metrics, and stores them in a queue to allow multiple datapoints per metric series to be scraped

func NewMetricHub

func NewMetricHub(limit int, scrapeTimeout int) *MetricHub

func (*MetricHub) Debug

func (c *MetricHub) Debug(ctx echo.Context) error

Debug is a handler function to show the current state of the hub without consuming any datapoints

func (*MetricHub) Receive

func (c *MetricHub) Receive(ctx echo.Context) error

Receive is a handler function to receive metric pushes

func (*MetricHub) ReceiveGRPC added in v1.1.0

func (c *MetricHub) ReceiveGRPC(families []*dto.MetricFamily)

func (*MetricHub) Scrape

func (c *MetricHub) Scrape(ctx echo.Context) error

Scrape is a handler function for prometheus scrape requests. Formats the metrics for scraping.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL