wakeful/pve_exporter

Explain about Describe function

baohuy1204 opened this issue · 0 comments

Can you explain me why we need to call "e.up.Describe(ch)" and "ch <- clusterNodeUpTime" in this function:
func (e Exporter) Describe(ch chan<- *prometheus.Desc) {
e.up.Describe(ch)
ch <- clusterNodeUpTime
}

I've tested with these lines commented but it still works:
func (e Exporter) Describe(ch chan<- *prometheus.Desc) {
// e.up.Describe(ch)
// ch <- clusterNodeUpTime
}

the same for:
func (e Exporter) Describe(ch chan<- *prometheus.Desc) {
e.up.Describe(ch)
// ch <- clusterNodeUpTime
}

Thanks,