registry

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: BSD-3-Clause Imports: 11 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, httpClient *http.Client) (string, error)

FetchDigest fetches the manifest digest for a registry image reference.

func IsFallbackEligibleDaemonError

func IsFallbackEligibleDaemonError(err error) bool

IsFallbackEligibleDaemonError reports whether a daemon registry error should use direct HTTP fallback.

func NewRegistryHTTPClient

func NewRegistryHTTPClient() *http.Client

NewRegistryHTTPClient creates the default registry HTTP client.

Types

type Credentials

type Credentials struct {
	Username string
	Token    string
}

Credentials contains registry credentials used for manifest requests.

type RateLimitInfo

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 FetchRegistryRateLimit

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

FetchRegistryRateLimit fetches registry pull rate-limit information.

Jump to

Keyboard shortcuts

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