scrapers

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScraperRegistry

type ScraperRegistry struct {
	Scrapers []*types.Scraper
}

ScraperRegistry is a struct which which contains a collection of Scrapers. This collection can then be filtered/iterated over to retrieve only the scrapers that should be active for the exporter.

var (
	// Registry is where all scrapers will be registered to.
	Registry ScraperRegistry
)

func (*ScraperRegistry) Add

func (sr *ScraperRegistry) Add(s *types.Scraper)

Add appends a Scraper to the Scrapers slice on the registry.

func (*ScraperRegistry) GetActiveScrapers

func (sr *ScraperRegistry) GetActiveScrapers(config *config.Config) []*types.Scraper

GetActiveScrapers iterates through the Scrapers slice and returns only those which are not disabled by the config passed to the exporter at initialization.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL