Documentation
¶
Overview ¶
Package source fetches, unpacks and detects install media referenced by a local path or an http(s) URL, presenting each as a read-only io/fs.FS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Credential ¶
type Credential struct {
Host, Username, Password string
}
Credential is HTTP Basic auth for one host, scoped to https requests only.
type Credentials ¶
type Credentials []Credential
Credentials is a set of host-matched credentials, tried in order.
type Options ¶
type Options struct {
CacheDir string
Credentials Credentials
Client *http.Client
}
Options configures a Resolver: where fetched archives are cached, the credentials offered to https hosts, and the HTTP client to fetch with (http.DefaultClient when nil).
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver turns a source reference - a local path or an http(s) URL - into a vfs.Resolved: the read-only filesystem it serves, whether that is an EFS image or an extracted directory, and the closer that frees it. It satisfies vfs.Resolver.
func New ¶
New returns a Resolver. The range reader and grab share one derived client that adds a CheckRedirect stripping credentials on unsafe redirects and, when the caller gave no transport, a response-header timeout.