Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownScheme = stderrors.New("unknown scheme")
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher is able to load file contents from http, https, file, and base64 locations.
func NewFetcher ¶
NewFetcher creates a new fetcher instance.
func (*Fetcher) FetchBytes ¶ added in v0.0.613
FetchBytes fetches the file contents from the source and allows to pass a context that is used for HTTP requests.
type Modifier ¶ added in v0.0.586
type Modifier func(*opts)
func WithClient ¶
func WithClient(hc *retryablehttp.Client) Modifier
WithClient sets the http.Client the fetcher uses.
func WithMaxHTTPMaxBytes ¶ added in v0.0.601
WithMaxHTTPMaxBytes reads at most limit bytes from the HTTP response body, returning bytes.ErrToLarge if the limit would be exceeded.
Click to show internal directories.
Click to hide internal directories.