registry

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package registry provides OCI registry operations using ORAS.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRangeNotSupported is an alias to core.ErrRangeNotSupported for use within this package.
	ErrRangeNotSupported = core.ErrRangeNotSupported

	// ErrMultipleLayers indicates the manifest has multiple layers, which is unexpected for blobber images.
	ErrMultipleLayers = errors.New("manifest has multiple layers; blobber expects exactly one layer")
)

Sentinel errors for registry operations.

Functions

func DefaultCredentialStore

func DefaultCredentialStore() (credentials.Store, error)

DefaultCredentialStore returns a credential store that reads from Docker config (~/.docker/config.json) and credential helpers.

func New

func New(opts ...Option) *orasRegistry

New creates a new Registry backed by ORAS.

func StaticCredentials

func StaticCredentials(registry, username, password string) credentials.Store

StaticCredentials returns a credential store with a single static credential for the specified registry.

Types

type Option

type Option func(*orasRegistry)

Option configures an orasRegistry.

func WithCredentialStore

func WithCredentialStore(store credentials.Store) Option

WithCredentialStore sets the credential store.

func WithDescriptorCache

func WithDescriptorCache(enabled bool) Option

WithDescriptorCache enables in-memory caching for layer resolution. This can serve stale data for mutable tags; prefer digest references when possible.

func WithPlainHTTP

func WithPlainHTTP(plainHTTP bool) Option

WithPlainHTTP enables insecure HTTP connections.

func WithUserAgent

func WithUserAgent(ua string) Option

WithUserAgent sets the User-Agent header.

Jump to

Keyboard shortcuts

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