(ch chan<- prometheus.Metric)
| 91 | } |
| 92 | |
| 93 | func (lc *logindCollector) Update(ch chan<- prometheus.Metric) error { |
| 94 | c, err := newDbus() |
| 95 | if err != nil { |
| 96 | return fmt.Errorf("unable to connect to dbus: %w", err) |
| 97 | } |
| 98 | defer c.conn.Close() |
| 99 | |
| 100 | return collectMetrics(ch, c) |
| 101 | } |
| 102 | |
| 103 | func collectMetrics(ch chan<- prometheus.Metric, c logindInterface) error { |
| 104 | seats, err := c.listSeats() |
nothing calls this directly
no test coverage detected