scraper

package
v0.0.0-...-4b3986e Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorsFetcher

type ErrorsFetcher func(string) (responsePayload, error)

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

func NewProcessor

func NewProcessor(numWorkers int) Processor

func (Processor) Enqueue

func (p Processor) Enqueue(r Request)

func (Processor) Run

func (p Processor) Run()

type Request

type Request struct {
	Target        string
	ResultChannel chan<- responsePayload
	WaitGroup     *sync.WaitGroup
}

type Scraper

type Scraper struct {
	Resolver      servicediscovery.Resolver
	Repository    *repository.ErrorsRepository
	ServiceConfig config.Service
	// contains filtered or unexported fields
}

func NewScraper

func NewScraper(resolver servicediscovery.Resolver, r *repository.ErrorsRepository,
	serviceConfig config.Service, processor Processor) Scraper

NewScraper create a new scraper for a given service name

func (Scraper) Scrape

func (scraper Scraper) Scrape()

Scrape runs go routines scrapping the list of targets of this service, processes the errors and stores them into the repository.

Jump to

Keyboard shortcuts

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