Allow using a custom livebox address (#7)

This commit is contained in:
Tomy Guichard 2023-06-03 11:30:01 +02:00 committed by GitHub
parent 5abe206e27
commit 4a5496d239
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 141 additions and 38 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(