Documentation
¶
Overview ¶
The hardware package provides an in memory database that contains all of the hardware info.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hardware ¶
type Hardware struct {
// contains filtered or unexported fields
}
Hardware is the interface to the in memory DB of hardware objects.
func (*Hardware) Add ¶
Add inserts a new hardware object into the database, overriding any pre-existing values. If state == deleted Add will delete the the object from the db. API currently has a bug where it sends invalid ip_address objects where the address (and others) is missing, we log this case (if logger is configured) and continue processing.
type Option ¶
type Option func(*Hardware)
The Option type describes functions that operate on Hardeare during New. It is a convenience type to make it easier for callers to configure options for Hardware.
func Gauge ¶
func Gauge(g prometheus.Gauge) Option
Gauge will set the gauge used to track db size metric.