rename client struct
This commit is contained in:
parent
640075da94
commit
e88f889baa
|
|
@ -5,7 +5,7 @@ import (
|
|||
"golift.io/unifi"
|
||||
)
|
||||
|
||||
type client struct {
|
||||
type uclient struct {
|
||||
Anomalies *prometheus.Desc
|
||||
BytesR *prometheus.Desc
|
||||
CCQ *prometheus.Desc
|
||||
|
|
@ -38,7 +38,7 @@ type client struct {
|
|||
DpiStatsTxPackets *prometheus.Desc
|
||||
}
|
||||
|
||||
func descClient(ns string) *client {
|
||||
func descClient(ns string) *uclient {
|
||||
if ns += "_client_"; ns == "_client_" {
|
||||
ns = "client_"
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ func descClient(ns string) *client {
|
|||
"sw_name", "radio_name", "radio", "radio_proto", "name", "channel",
|
||||
"vlan", "ip", "essid", "bssid", "radio_desc"}
|
||||
|
||||
return &client{
|
||||
return &uclient{
|
||||
Anomalies: prometheus.NewDesc(ns+"anomalies_total", "Client Anomalies", labels, nil),
|
||||
BytesR: prometheus.NewDesc(ns+"bytes_rate", "Client Data Rate", labels, nil),
|
||||
CCQ: prometheus.NewDesc(ns+"ccq", "Client Connection Quality", labels, nil),
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ type UnifiCollectorCnfg struct {
|
|||
// and the collected metrics will be incomplete. Possibly, no metrics
|
||||
// will be collected at all.
|
||||
ReportErrors bool
|
||||
// This function is passed to the Collect() method. The Collect method runs This
|
||||
// function to retreive the latest UniFi
|
||||
// This function is passed to the Collect() method. The Collect method runs
|
||||
// this function to retreive the latest UniFi measurements and export them.
|
||||
CollectFn func() (*metrics.Metrics, error)
|
||||
// Provide a logger function if you want to run a routine *after* prometheus checks in.
|
||||
LoggingFn func(*Report)
|
||||
|
|
@ -29,7 +29,7 @@ type UnifiCollectorCnfg struct {
|
|||
|
||||
type unifiCollector struct {
|
||||
Config UnifiCollectorCnfg
|
||||
Client *client
|
||||
Client *uclient
|
||||
UAP *uap
|
||||
USG *usg
|
||||
USW *usw
|
||||
|
|
|
|||
Loading…
Reference in New Issue