cacerts

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

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 containerfs.ExecuteContainerFunc,
) (Installer, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳