Documentation
¶
Overview ¶
Package network currently provides sane defaults http and ssh transport config to be used across all network operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // RetryStatusCodes contains HTTP status codes that indicate retryable errors. // Derived from retryReasons. Can be passed to libraries like go-containerregistry // via remote.WithRetryStatusCodes(). RetryStatusCodes []int )
defaultTransport holds the configured transport before any wrapping. This allows NewTransport to clone from it.
Functions ¶
func SetDefaults ¶
func SetDefaults()
SetDefaults configures http.DefaultTransport with our TLS and connection settings, and wraps it with logging. Must be called once at startup before any HTTP requests.
Types ¶
type ClientConfig ¶ added in v0.4.0
type ClientConfig struct {
ssh.ClientConfig
KeepAliveTimeout time.Duration
IdentityFiles []string
}
ClientConfig extends ssh.ClientConfig with keepalive and identity file settings.
func GetClientConfig ¶ added in v0.4.0
func GetClientConfig() *ClientConfig
GetClientConfig returns a new SSH client configuration with hardened defaults.
type RoundTripper ¶
RoundTripper wraps *http.Transport with auth header injection and logging for retryable responses. Callers can modify TLSClientConfig directly via the embedded transport (e.g., custom CAs, client certs).
func NewTransport ¶
func NewTransport() *RoundTripper
NewTransport returns a new RoundTripper cloned from the default configuration. The returned RoundTripper can be modified (e.g., adding client certificates) without affecting http.DefaultTransport. Panics if SetDefaults has not been called.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package transporter provides a retry-backoff transport client.
|
Package transporter provides a retry-backoff transport client. |