prysm-pulse/shared/clientstats/interfaces.go
kasey dace0f9b10
cli to push metrics to aggregator service (#8835)
* new prometheus metrics for client-stats metrics

* adds client-stats types beacause they are
  used by some of the prometheus collection code.
* new prometheus collector for db disk size
* new prometheus collector for web3 client
  connection status

* adds client-stats api push cli in cmd/client-stats

* adds api metadata to client-stats collector posts

* appease deepsource

* mop up copypasta

* use prysm assert package for testing
2021-05-03 09:57:26 -05:00

20 lines
582 B
Go

package clientstats
import "io"
// A Scraper polls the data source it has been configured with
// and interprets the content to produce a client-stats process
// metric. Scrapers currently exist to produce 'validator' and
// 'beaconnode' metric types.
type Scraper interface {
Scrape() (io.Reader, error)
}
// An Updater can take the io.Reader created by Scraper and
// send it to a data sink for consumption. An Updater is used
// for instance ot send the scraped data for a beacon-node to
// a remote client-stats endpoint.
type Updater interface {
Update(io.Reader) error
}