Allow using a custom livebox address

This commit is contained in:
Tomy Guichard 2023-06-02 00:42:35 +02:00
parent 5abe206e27
commit 8215e950e9
11 changed files with 79 additions and 21 deletions

View file

@ -14,7 +14,7 @@ var _ prometheus.Collector = &DeviceInfo{}
// DeviceInfo implements a prometheus Collector that returns Livebox specific metrics.
type DeviceInfo struct {
client livebox.Client
client *livebox.Client
numberOfRebootsMetric *prometheus.Desc
uptimeMetric *prometheus.Desc
memoryTotalMetric *prometheus.Desc
@ -22,7 +22,7 @@ type DeviceInfo struct {
}
// NewDeviceInfo returns a new DeviceInfo collector using the specified client.
func NewDeviceInfo(client livebox.Client) *DeviceInfo {
func NewDeviceInfo(client *livebox.Client) *DeviceInfo {
return &DeviceInfo{
client: client,
numberOfRebootsMetric: prometheus.NewDesc(