Documentation
¶
Overview ¶
Package httputils holds helpers shared by the HTTP clients Fleet uses to reach remote content: Helm repositories, OCI registries and git servers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UserAgentTransport ¶
type UserAgentTransport struct {
Next http.RoundTripper
}
UserAgentTransport stamps UserAgent on the requests passing through it before handing them over to the transport it wraps. It leaves a request which already carries a User-Agent alone, so that a caller spelling out its own keeps it.
Setting it as the Transport of a client covers every request that client sends, including the ones libraries such as Helm and ORAS build out of Fleet's reach.
func (UserAgentTransport) CloseIdleConnections ¶
func (t UserAgentTransport) CloseIdleConnections()
CloseIdleConnections forwards to the wrapped transport, so that http.Client.CloseIdleConnections keeps working on a client using it.