distribution

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchDigest

func FetchDigest(ctx context.Context, registryHost, repository, tag string, credential *Credentials) (string, error)

func FetchDigestWithHTTPClient

func FetchDigestWithHTTPClient(ctx context.Context, registryHost, repository, tag string, credential *Credentials, httpClient *http.Client) (string, error)

func IsFallbackEligibleDaemonError

func IsFallbackEligibleDaemonError(err error) bool

func NewRegistryHTTPClient

func NewRegistryHTTPClient() *http.Client

NewRegistryHTTPClient returns the shared transport configuration used for direct registry digest lookups.

Types

type Credentials

type Credentials struct {
	Username string
	Token    string
}

type RateLimitInfo added in v1.19.0

type RateLimitInfo struct {
	Limit         *int   `json:"limit,omitempty"`
	Remaining     *int   `json:"remaining,omitempty"`
	Used          *int   `json:"used,omitempty"`
	WindowSeconds *int   `json:"windowSeconds,omitempty"`
	Source        string `json:"source,omitempty"`
}

RateLimitInfo contains pull quota information returned by registry headers.

func FetchDockerHubRateLimit added in v1.19.0

func FetchDockerHubRateLimit(ctx context.Context, credential *Credentials) (*RateLimitInfo, error)

FetchDockerHubRateLimit fetches Docker Hub pull rate limit information.

func FetchDockerHubRateLimitWithHTTPClient added in v1.19.0

func FetchDockerHubRateLimitWithHTTPClient(ctx context.Context, credential *Credentials, httpClient *http.Client) (*RateLimitInfo, error)

FetchDockerHubRateLimitWithHTTPClient fetches Docker Hub pull rate limit information using the provided HTTP client.

func FetchRegistryRateLimitWithHTTPClient added in v1.19.0

func FetchRegistryRateLimitWithHTTPClient(ctx context.Context, registryHost, repository, tag string, credential *Credentials, httpClient *http.Client) (*RateLimitInfo, error)

FetchRegistryRateLimitWithHTTPClient fetches pull rate limit information from an OCI registry manifest response.

type Reference

type Reference struct {
	NormalizedRef string
	RegistryHost  string
	Repository    string
	Tag           string
}

func NormalizeReference

func NormalizeReference(imageRef string) (*Reference, error)

Jump to

Keyboard shortcuts

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