registry

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package registry defines the RegistryProvider interface and global registry.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = fmt.Errorf("not implemented")

ErrNotImplemented is returned by stub providers.

Functions

func Register

func Register(p RegistryProvider)

Register adds p to the global registry. Safe to call from init().

Types

type Context

type Context struct {
	context.Context
	// contains filtered or unexported fields
}

Context carries request-scoped values for registry operations.

func NewContext

func NewContext(parent context.Context, out io.Writer, dryRun bool) Context

NewContext creates a Context with an output writer and dry-run flag.

func (Context) DryRun

func (c Context) DryRun() bool

DryRun returns whether this is a dry-run invocation.

func (Context) Out

func (c Context) Out() io.Writer

Out returns the output writer.

type ProviderConfig

type ProviderConfig struct {
	Registry config.CIRegistry
}

ProviderConfig carries the registry config for a single operation.

type RegistryProvider

type RegistryProvider interface {
	Name() string
	Login(ctx Context, cfg ProviderConfig) error
	Logout(ctx Context, cfg ProviderConfig) error
	Push(ctx Context, cfg ProviderConfig, imageRef string) error
	Prune(ctx Context, cfg ProviderConfig) error
}

RegistryProvider is implemented by each container registry backend.

func Get

func Get(name string) (RegistryProvider, bool)

Get returns the provider registered under name.

func List

func List() []RegistryProvider

List returns all registered providers.

Jump to

Keyboard shortcuts

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