Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Registry = map[string]Adapter{}
Registry maps source type strings to their adapter implementations.
Functions ¶
Types ¶
type Adapter ¶
type Adapter interface {
// Crawl fetches all pages from the source and sends them to the returned channel.
// The channel is closed when crawling is complete or ctx is cancelled.
// The first return value is the total number of URLs to be crawled (0 if unknown).
Crawl(ctx context.Context, source config.SourceConfig, sourceID int64) (int, <-chan db.Page, error)
// NeedsAuth returns true if the source requires authentication before crawling.
NeedsAuth(source config.SourceConfig) bool
}
Adapter is implemented by each documentation source type.
Click to show internal directories.
Click to hide internal directories.