Exemplo n.º 1
0
func (c IpfsNodeCollector) Collect(ch chan<- prometheus.Metric) {
	ch <- prometheus.MustNewConstMetric(
		peersTotalMetric,
		prometheus.GaugeValue,
		c.PeersTotalValue(),
	)
}
Exemplo n.º 2
0
func (c IpfsNodeCollector) Collect(ch chan<- prometheus.Metric) {
	for tr, val := range c.PeersTotalValues() {
		ch <- prometheus.MustNewConstMetric(
			peersTotalMetric,
			prometheus.GaugeValue,
			val,
			tr,
		)
	}
}