imagestore

package
v0.25.6 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constructor

type Constructor func(...Option) (Store, error)

Constructor is a function which creates an images store based on parameters represented as options

type Option

type Option func(Parameters) Parameters

Options is a function which returns updated parameters.

func WithArchiveDir

func WithArchiveDir(archiveDir string) Option

WithArchiveDir return an option to set the archive directory parameter.

func WithLogs

func WithLogs(logs io.Writer) Option

WithLogs return an option to set the logs parameter.

func WithTransport

func WithTransport(transport *http.Transport) Option

WithTransport returns an option with the Transport parameter set.

type Parameters

type Parameters struct {
	ArchiveDir string
	Logs       io.Writer

	// Transport is http.Transport to use when communicating with an OCI registry.
	Transport *http.Transport
}

Parameters is used to create image stores.

func Create

func Create(options ...Option) Parameters

func (Parameters) BuildRegistryOptions

func (p Parameters) BuildRegistryOptions() []ggcr.Option

BuildRegistryOptions returns a list of applicable ggcr.Option values to use when calling ggcr.NewRegistryClient().

type Store

type Store interface {
	// Add copies the image with the given name to the image store.
	Add(img string) (contentDigest string, err error)

	// Push copies the image with the given digest from an image with the given name in the image store to a repository
	// with the given name.
	Push(dig image.Digest, src image.Name, dst image.Name) error
}

Store is an abstract image store.

Directories

Path Synopsis
Package tests is a set of test helpers that other tests in the imagestore package tree may use for common test setup
Package tests is a set of test helpers that other tests in the imagestore package tree may use for common test setup

Jump to

Keyboard shortcuts

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