Documentation
¶
Overview ¶
Package crawler implements a STAC resource crawler.
Index ¶
Constants ¶
View Source
const ( Item = ResourceType("item") Catalog = ResourceType("catalog") Collection = ResourceType("collection") )
Variables ¶
View Source
var DefaultOptions = &Options{ Recursion: Children, Concurrency: runtime.GOMAXPROCS(0), }
DefaultOptions used when creating a new crawler.
Functions ¶
This section is empty.
Types ¶
type Crawler ¶
type Crawler struct {
// contains filtered or unexported fields
}
Crawler crawls STAC resources.
func New ¶
New creates a crawler with the default options.
The visitor will be called for each resource resolved.
func NewWithOptions ¶
NewWithOptions creates a crawler with the given options.
type Options ¶
type Options struct { // Limit to the number of resources to fetch and visit concurrently. Concurrency int // Strategy to use when crawling linked resources. Use None to visit // a single resource. Use Children to only visit linked item/child resources. // Use All to visit parent and child resources. Recursion RecursionType }
Options for creating a crawler.
type RecursionType ¶
type RecursionType string
const ( All RecursionType = "all" None RecursionType = "none" Children RecursionType = "children" )
type Resource ¶
type Resource map[string]interface{}
Resource represents a STAC catalog, collection, or item.
func (Resource) Extensions ¶
Extensions returns the resource extension URLs.
func (Resource) Type ¶
func (r Resource) Type() ResourceType
Type returns the specific resource type.
type ResourceType ¶
type ResourceType string
Click to show internal directories.
Click to hide internal directories.