fetcher

package
v2.0.0-...-9d856c1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultFetcher

type DefaultFetcher struct {
	// contains filtered or unexported fields
}

DefaultFetcher implements Fetcher

func (*DefaultFetcher) DownloadFile

func (d *DefaultFetcher) DownloadFile(urlPath string, maxLength int64, timeout time.Duration) ([]byte, error)

DownloadFile downloads a file from urlPath, errors out if it failed, its length is larger than maxLength or the timeout is reached.

type Fetcher

type Fetcher interface {
	DownloadFile(urlPath string, maxLength int64, timeout time.Duration) ([]byte, error)
}

Fetcher interface

Jump to

Keyboard shortcuts

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