Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpenweatherCollector ¶
type OpenweatherCollector struct { ApiKey string DegreesUnit string Language string Locations []Location // contains filtered or unexported fields }
OpenweatherCollector Define a struct for your collector that contains pointers to prometheus descriptors for each metric you wish to expose. Note you can also include fields of other types if they provide utility, but we just won't be exposing them as metrics.
func NewOpenweatherCollector ¶
func NewOpenweatherCollector(degreesUnit string, language string, apikey string, locations string) *OpenweatherCollector
NewOpenweatherCollector You must create a constructor for your collector that initializes every descriptor and returns a pointer to the collector
func (*OpenweatherCollector) Collect ¶
func (collector *OpenweatherCollector) Collect(ch chan<- prometheus.Metric)
Collect implements required collect function for all prometheus collectors
func (*OpenweatherCollector) Describe ¶
func (collector *OpenweatherCollector) Describe(ch chan<- *prometheus.Desc)
Describe Each and every collector must implement the Describe function. It essentially writes all descriptors to the prometheus desc channel.
Click to show internal directories.
Click to hide internal directories.