scraper

package
v0.121.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scraper

type Scraper interface {
	// ScrapeStatusPageHistorical scrapes the status page at the given URL and returns a list of incidents
	// The incidents are historical, meaning they are not just the current incidents, this can be expected to return a large number of incidents
	// And take a long time to run, so we should only run this infrequently, maybe once per week per page
	ScrapeStatusPageHistorical(ctx context.Context, url string) ([]api.Incident, error)

	// ScrapeStatusPageCurrent scrapes the status page at the given URL and returns a list of incidents
	// The incidents are current, meaning they are only the recent incidents, this can be expected to return a small number of incidents
	// And take a short time to run, so we should run this frequently, maybe once per 5 minutes per page
	ScrapeStatusPageCurrent(ctx context.Context, url string) ([]api.Incident, error)
}

func NewScraper

func NewScraper(logger *zap.Logger, httpClient *http.Client, providers []providers.Provider) Scraper

Directories

Path Synopsis
rss

Jump to

Keyboard shortcuts

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