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

@@ -71,7 +71,7 @@ func getSocketCpus() map[C.int]int {
return outmap
}
func (m *LikwidCollector) Init() {
func (m *LikwidCollector) Init() error {
m.name = "LikwidCollector"
m.setup()
cpulist := CpuList()
@@ -111,6 +111,7 @@ func (m *LikwidCollector) Init() {
}
C.free(unsafe.Pointer(cstr))
}
return nil
}
func (m *LikwidCollector) Read(interval time.Duration) {