mirror

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseExtractor

type DatabaseExtractor interface {
	Extract(from string) (string, error)
}

DatabaseExtractor knows how to pull an index image and extract its database

type DatabaseExtractorFunc

type DatabaseExtractorFunc func(from string) (string, error)

func (DatabaseExtractorFunc) Extract

func (f DatabaseExtractorFunc) Extract(from string) (string, error)

type ImageIndexMirrorOption

type ImageIndexMirrorOption func(*IndexImageMirrorerOptions)

func WithDest

func WithDest(d string) ImageIndexMirrorOption

func WithManifestDir

func WithManifestDir(d string) ImageIndexMirrorOption

func WithSource

func WithSource(s string) ImageIndexMirrorOption

type ImageMirrorer

type ImageMirrorer interface {
	Mirror(mapping map[string]string) error
}

ImageMirrorer knows how to mirror an image from one registry to another

type ImageMirrorerFunc

type ImageMirrorerFunc func(mapping map[string]string) error

func (ImageMirrorerFunc) Mirror

func (f ImageMirrorerFunc) Mirror(mapping map[string]string) error

type IndexImageMirrorer

type IndexImageMirrorer struct {
	ImageMirrorer     ImageMirrorer
	DatabaseExtractor DatabaseExtractor

	// options
	Source, Dest string
}

func NewIndexImageMirror

func NewIndexImageMirror(options ...ImageIndexMirrorOption) (*IndexImageMirrorer, error)

func (*IndexImageMirrorer) Mirror

func (b *IndexImageMirrorer) Mirror() (map[string]string, error)

type IndexImageMirrorerOptions

type IndexImageMirrorerOptions struct {
	ImageMirrorer     ImageMirrorer
	DatabaseExtractor DatabaseExtractor

	Source, Dest string
	ManifestDir  string
}

func DefaultImageIndexMirrorerOptions

func DefaultImageIndexMirrorerOptions() *IndexImageMirrorerOptions

func (*IndexImageMirrorerOptions) Apply

Apply sequentially applies the given options to the config.

func (*IndexImageMirrorerOptions) Complete

func (o *IndexImageMirrorerOptions) Complete() error

func (*IndexImageMirrorerOptions) ToOption

ToOption converts an IndexImageMirrorerOptions object into a function that applies its current configuration to another IndexImageMirrorerOptions instance

func (*IndexImageMirrorerOptions) Validate

func (o *IndexImageMirrorerOptions) Validate() error

type Mirrorer

type Mirrorer interface {
	Mirror() (map[string]string, error)
}

Jump to

Keyboard shortcuts

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