github.com/MetalBlockchain/metalgo@v1.11.9/api/metrics/gatherer_test.go (about) 1 // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package metrics 5 6 import ( 7 "github.com/prometheus/client_golang/prometheus" 8 9 dto "github.com/prometheus/client_model/go" 10 ) 11 12 var counterOpts = prometheus.CounterOpts{ 13 Name: "counter", 14 Help: "help", 15 } 16 17 type testGatherer struct { 18 mfs []*dto.MetricFamily 19 err error 20 } 21 22 func (g *testGatherer) Gather() ([]*dto.MetricFamily, error) { 23 return g.mfs, g.err 24 }