config

package
v1.6.0-beta.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 17 Imported by: 50

Documentation

Overview

Package config contains utilities for helping configure the Docker resolver

Index

Constants

This section is empty.

Variables

This section is empty.

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

func HostDirFromRoot(root string) func(string) (string, error)

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
}

HostOptions is used to configure registry hosts

type UpdateClientFunc added in v1.5.0

type UpdateClientFunc func(client *http.Client) error

UpdateClientFunc is a function that lets you to amend http Client behavior used by registry clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL