fetch

package
v0.0.0-...-82353ca Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocalExecutor

NewLocalExecutor creates a remote worker protocol executor that is capable of processing "fetch" actions. URLs listed in the action are fetched using a HTTP client, and the resulting file is uploaded to storage.

Types

type Fetcher

type Fetcher interface {
	Fetch(ctx context.Context, url string, headers []*model_fetch_pb.Target_Header) (io.ReadCloser, error)
}

Fetcher is called into by LocalExecutor to fetch files. Simple setups may only use a single instance of Fetcher. More complex ones can use multiple instances in case support for different network protocols is desired.

func NewHTTPFetcher

func NewHTTPFetcher(client *http.Client) Fetcher

NewHTTPFetcher creates a Fetcher that is capable of fetching files via HTTP and HTTPS.

func NewSchemeDemultiplexingFetcher

func NewSchemeDemultiplexingFetcher(fetchersByScheme map[string]Fetcher) Fetcher

NewSchemeDemultiplexingFetcher wraps a set of Fetchers, and forwards requests to them based on the URL scheme. This makes it possible to launch a single bonanza_fetcher process that supports various URL schemes.

Jump to

Keyboard shortcuts

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