Documentation
¶
Overview ¶
Package modfetch reads the modules a site release bundles at publish (#2774): by URL, through the egress guard, kept in the replica's memory by URL. It is the network half of a site build; internal/site/sitebuild reads the tree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPFetcher ¶
type HTTPFetcher struct {
// contains filtered or unexported fields
}
HTTPFetcher reads modules by URL through a client the caller builds (with the egress guard under it), keeping what it read by URL: a URL a release may import names an exact version, so what it serves does not change.
func NewGuardedFetcher ¶
func NewGuardedFetcher() (*HTTPFetcher, error)
NewGuardedFetcher is the fetcher a deployment publishes with: a client whose every dial passes the egress guard, so a URL a release names cannot reach a private, loopback, link-local or metadata address, and which follows no redirect.
func NewHTTPFetcher ¶
func NewHTTPFetcher(client *http.Client) *HTTPFetcher
NewHTTPFetcher is a fetcher over client.