Return error at Init for skip collectors early

This commit is contained in:
Thomas Roehl
2021-05-14 19:21:16 +02:00
parent 9b59429a93
commit 6b6e28d4c7
9 changed files with 19 additions and 9 deletions

View File

@@ -14,9 +14,10 @@ type TopProcsCollector struct {
MetricCollector
}
func (m *TopProcsCollector) Init() {
func (m *TopProcsCollector) Init() error {
m.name = "TopProcsCollector"
m.setup()
return nil
}
func (m *TopProcsCollector) Read(interval time.Duration) {