loader

package
v0.37.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFileNotFound is an error type used to signal 404 HTTP status code responses.
	ErrFileNotFound = errors.New("file not found")
	// ErrIntegrity signals a chart loader failed to verify the integrity of
	// a chart, for example due to a digest mismatch.
	ErrIntegrity = errors.New("integrity failure")
)

Functions

func NewRetryableHTTPClient added in v0.37.1

func NewRetryableHTTPClient(ctx context.Context, retries int) *retryablehttp.Client

NewRetryableHTTPClient returns a new retrying HTTP client for loading artifacts. The client will retry up to the given number of times before giving up. The context is used to log errors.

func SecureLoadChartFromURL

func SecureLoadChartFromURL(client *retryablehttp.Client, URL, digest string) (*chart.Chart, error)

SecureLoadChartFromURL attempts to download a Helm chart from the given URL using the provided client. The retrieved data is verified against the given digest before loading the chart. It returns the loaded chart.Chart, or an error. The error may be of type ErrIntegrity if the integrity check fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

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