github.com/prysmaticlabs/prysm@v1.4.4/shared/clientstats/interfaces.go (about) 1 package clientstats 2 3 import "io" 4 5 // A Scraper polls the data source it has been configured with 6 // and interprets the content to produce a client-stats process 7 // metric. Scrapers currently exist to produce 'validator' and 8 // 'beaconnode' metric types. 9 type Scraper interface { 10 Scrape() (io.Reader, error) 11 } 12 13 // An Updater can take the io.Reader created by Scraper and 14 // send it to a data sink for consumption. An Updater is used 15 // for instance ot send the scraped data for a beacon-node to 16 // a remote client-stats endpoint. 17 type Updater interface { 18 Update(io.Reader) error 19 }