crawler

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrawlerDatabase

type CrawlerDatabase interface {
	// Insert is a method to insert new page crawled on database.
	Insert(ctx context.Context, uri string, depth uint, uris []string) error

	// Find is a method to fetch links crawled from database.
	Find(ctx context.Context, uri string, depth uint) ([]string, error)
}

CrawlerDatabase is a repository to handle with persistence layer.

type CrawlerService

type CrawlerService interface {
	// Craw execute the call to craw pages concurrently and will respect depth param.
	Craw(ctx context.Context, uri string, depth uint) ([]string, error)
}

CrawlerService is a abstraction to handle with web crawler.

Jump to

Keyboard shortcuts

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