cacerts

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EngineCustomCACertsDir = "/usr/local/share/ca-certificates"
)

Variables

This section is empty.

Functions

func ReadHostCustomCADir

func ReadHostCustomCADir(path string) (
	certsToFileName map[string]string,
	symlinks map[string]string,
	rerr error,
)

Types

type CleanupErr

type CleanupErr struct {
	// contains filtered or unexported fields
}

Want identifiable separate type for cleanup errors since if those are hit specifically we need to fail to the whole exec (whereas other errors but successful cleanup can be non-fatal)

func (CleanupErr) Error

func (c CleanupErr) Error() string

func (CleanupErr) Unwrap

func (c CleanupErr) Unwrap() error

type Installer

type Installer interface {
	// Install installs the custom CA certs into the container. In case of an error part way through,
	// it should attempt to cleanup after itself and return the error. If cleanup itself errors, it should
	// be returned wrapped in a CleanupErr type.
	Install(ctx context.Context) error
	// Uninstall removes the custom CA certs from the container.
	Uninstall(context.Context) error
	// contains filtered or unexported methods
}

Installer is an implementation of installing+uninstalling custom CA certs for a container, usually based on the distro.

func NewInstaller

func NewInstaller(
	ctx context.Context,
	spec *specs.Spec,
	executeContainer executeContainerFunc,
) (Installer, error)

Jump to

Keyboard shortcuts

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