package config
import "github.com/containerd/nydus-snapshotter/pkg/remote/remotes/docker/config"
Package config contains utilities for helping configure the Docker resolver
Index ¶
- func ConfigureHosts(ctx context.Context, options HostOptions) docker.RegistryHosts
- func HostDirFromRoot(root string) func(string) (string, error)
- type HostOptions
- type UpdateClientFunc
Functions ¶
func ConfigureHosts ¶
func ConfigureHosts(ctx context.Context, options HostOptions) docker.RegistryHosts
ConfigureHosts creates a registry hosts function from the provided host creation options. The host directory can read hosts.toml or certificate files laid out in the Docker specific layout. If a `HostDir` function is not required, defaults are used.
func HostDirFromRoot ¶
HostDirFromRoot returns a function which finds a host directory based at the given root.
Types ¶
type HostOptions ¶
type HostOptions struct {
HostDir func(string) (string, error)
Credentials func(host string) (string, string, error)
DefaultTLS *tls.Config
DefaultScheme string
// UpdateClient will be called after creating http.Client object, so clients can provide extra configuration
UpdateClient UpdateClientFunc
AuthorizerOpts []docker.AuthorizerOpt
}
HostOptions is used to configure registry hosts
type UpdateClientFunc ¶
UpdateClientFunc is a function that lets you to amend http Client behavior used by registry clients.
Source Files ¶
- Version
- v0.15.15 (latest)
- Published
- Apr 17, 2026
- Platform
- linux/amd64
- Imports
- 18 packages
- Last checked
- 1 hour ago –
Tools for package owners.