http

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildHTTPClient

func BuildHTTPClient(cpw *CertPoolWatcher) (*http.Client, error)

func LogCertificateVerificationError

func LogCertificateVerificationError(err error, log logr.Logger) bool

This function unwraps the given error to find an CertificateVerificationError. It then logs the list of certificates found in the unwrapped error Returns: * true if a CertificateVerificationError is found * false if no CertificateVerificationError is found

func LogDockerCertificates

func LogDockerCertificates(path string, log logr.Logger)

Log the certificates that would be used for docker pull operations Assumes a /etc/docker/certs.d like path, where the directory contains <hostname>:<port> directories in which a CA certificate (generally named "ca.crt") is located.

func NewCertPool

func NewCertPool(caDir string, log logr.Logger) (*x509.CertPool, error)

Types

type CertPoolWatcher

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

func NewCertPoolWatcher

func NewCertPoolWatcher(caDir string, log logr.Logger) (*CertPoolWatcher, error)

func (*CertPoolWatcher) Done

func (cpw *CertPoolWatcher) Done()

func (*CertPoolWatcher) Get

func (cpw *CertPoolWatcher) Get() (*x509.CertPool, int, error)

Returns the current CertPool and the generation number

Jump to

Keyboard shortcuts

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