コード例 #1
0
func ExampleCollector_clustermanager() {
	workerDB := NewClusterManager("db")
	workerCA := NewClusterManager("ca")
	prometheus.MustRegister(workerDB)
	prometheus.MustRegister(workerCA)

	// Since we are dealing with custom Collector implementations, it might
	// be a good idea to enable the collect checks in the registry.
	prometheus.EnableCollectChecks(true)
}
コード例 #2
0
ファイル: example_memstats_test.go プロジェクト: algoadv/etcd
func ExampleCollector_memstats() {
	prometheus.MustRegister(&MemStatsCollector{})
	// Since we are dealing with custom Collector implementations, it might
	// be a good idea to enable the collect checks in the registry.
	prometheus.EnableCollectChecks(true)
}