Documentation
¶
Overview ¶
Package apicrawlcmd provides support for building command line tools that implement API crawls.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Crawl ¶
type Crawl[T any] struct { RateControl crawlcmd.RateControl `yaml:",inline"` Cache crawlcmd.CrawlCacheConfig `yaml:"cache"` KeyID string `yaml:"key_id" cmd:"identifier of the API key to use for this crawl"` Service T `yaml:"service_config" cmd:"service specific configuration"` }
Crawl is a generic type that defines common crawl configuration options as well as allowing for service specific ones. The type of the service specific configuration is generally determined by the API being crawled.
type Resources ¶
type Resources struct {
NewOperationsFS func(ctx context.Context, cfg crawlcmd.CrawlCacheConfig) (operations.FS, error)
NewCheckpointOp func(ctx context.Context, cfg crawlcmd.CrawlCacheConfig) (checkpoint.Operation, error)
}
Resources represents the resources typically required to perform an API crawl.
func (Resources) CreateResources ¶
func (r Resources) CreateResources(ctx context.Context, cfg crawlcmd.CrawlCacheConfig) (store operations.FS, chkpt checkpoint.Operation, err error)
Click to show internal directories.
Click to hide internal directories.