Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics binds the registry as well as the metrics collection.
func (*Metrics) BuiltinWebserver ¶ added in v0.1.6
BuiltinWebserver runs the metrics webserver when nothing else does.
func (*Metrics) DeleteZombieRobot ¶
DeleteZombieRobot removes metrics associated with a zombie robot that is no longer connected.
func (*Metrics) ParseReport ¶ added in v0.1.7
ParseReport directly parses a report from a buffer.
func (*Metrics) Registry ¶
func (m *Metrics) Registry() *prometheus.Registry
Registry provides access to the registry that this instance manages.
func (*Metrics) Shutdown ¶
func (m *Metrics) Shutdown()
Shutdown signals the flusher that we wish to cease operations.
func (*Metrics) StartFlusher ¶
func (m *Metrics) StartFlusher()
StartFlusher clears the stats for robots every 10 seconds ensuring that robots don't stick around as zombies in the system if they've disconnected.
type Option ¶
type Option func(m *Metrics)
Option provides a configuration framework to setup the metrics package.
func WithBroker ¶
WithBroker points the metrics exporter at the mqtt broker that the robots will be talking to.
func WithLogger ¶
WithLogger provides a non-nil logger for the metrics instance to interact with.