Use flags instead of config and remove attributes
This commit is contained in:
parent
5b20dad9ad
commit
665b05eedc
23 changed files with 87 additions and 162 deletions
|
|
@ -17,7 +17,7 @@ import (
|
|||
const lastLoginSubsystem = "last_login"
|
||||
|
||||
type lastLoginCollector struct {
|
||||
config Config
|
||||
|
||||
metric prometheus.Gauge
|
||||
}
|
||||
|
||||
|
|
@ -25,11 +25,11 @@ func init() {
|
|||
Factories["lastlogin"] = NewLastLoginCollector
|
||||
}
|
||||
|
||||
// Takes a config struct and prometheus registry and returns a new Collector exposing
|
||||
// Takes a prometheus registry and returns a new Collector exposing
|
||||
// load, seconds since last login and a list of tags as specified by config.
|
||||
func NewLastLoginCollector(config Config) (Collector, error) {
|
||||
func NewLastLoginCollector() (Collector, error) {
|
||||
return &lastLoginCollector{
|
||||
config: config,
|
||||
|
||||
metric: prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
Namespace: Namespace,
|
||||
Subsystem: lastLoginSubsystem,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue