@@ -27,7 +27,7 @@ import (
2727 "github.com/prometheus-community/yet-another-cloudwatch-exporter/pkg/model"
2828)
2929
30- type scraper struct {
30+ type Scraper struct {
3131 registry atomic.Pointer [prometheus.Registry ]
3232 featureFlags []string
3333}
@@ -38,16 +38,16 @@ type cachingFactory interface {
3838 Clear ()
3939}
4040
41- func NewScraper (featureFlags []string ) * scraper { //nolint:revive
42- s := & scraper {
41+ func NewScraper (featureFlags []string ) * Scraper {
42+ s := & Scraper {
4343 registry : atomic.Pointer [prometheus.Registry ]{},
4444 featureFlags : featureFlags ,
4545 }
4646 s .registry .Store (prometheus .NewRegistry ())
4747 return s
4848}
4949
50- func (s * scraper ) makeHandler () func (http.ResponseWriter , * http.Request ) {
50+ func (s * Scraper ) makeHandler () func (http.ResponseWriter , * http.Request ) {
5151 return func (w http.ResponseWriter , r * http.Request ) {
5252 handler := promhttp .HandlerFor (s .registry .Load (), promhttp.HandlerOpts {
5353 DisableCompression : false ,
@@ -56,7 +56,7 @@ func (s *scraper) makeHandler() func(http.ResponseWriter, *http.Request) {
5656 }
5757}
5858
59- func (s * scraper ) decoupled (ctx context.Context , logger * slog.Logger , jobsCfg model.JobsConfig , cache cachingFactory ) {
59+ func (s * Scraper ) decoupled (ctx context.Context , logger * slog.Logger , jobsCfg model.JobsConfig , cache cachingFactory ) {
6060 logger .Debug ("Starting scraping async" )
6161 s .scrape (ctx , logger , jobsCfg , cache )
6262
@@ -75,7 +75,7 @@ func (s *scraper) decoupled(ctx context.Context, logger *slog.Logger, jobsCfg mo
7575 }
7676}
7777
78- func (s * scraper ) scrape (ctx context.Context , logger * slog.Logger , jobsCfg model.JobsConfig , cache cachingFactory ) {
78+ func (s * Scraper ) scrape (ctx context.Context , logger * slog.Logger , jobsCfg model.JobsConfig , cache cachingFactory ) {
7979 if ! sem .TryAcquire (1 ) {
8080 // This shouldn't happen under normal use, users should adjust their configuration when this occurs.
8181 // Let them know by logging a warning.
0 commit comments