docker

package
v0.20.4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcurrentImageProcessor

type ConcurrentImageProcessor struct {
	// contains filtered or unexported fields
}

func NewConcurrentImageProcessor

func NewConcurrentImageProcessor(maxRoutines int) *ConcurrentImageProcessor

func (*ConcurrentImageProcessor) Process

func (c *ConcurrentImageProcessor) Process(ctx context.Context, images []string, process ImageProcessor) error

type DockerClient

type DockerClient interface {
	ImageDiskLoader
	ImageDiskWriter
	ImagePuller
}

type ImageDestination

type ImageDestination interface {
	Write(ctx context.Context, images ...string) error
}

ImageDestination represents a generic destination for container images that can be written from the local docker cache.

type ImageDiskDestination

type ImageDiskDestination struct {
	// contains filtered or unexported fields
}

ImageDiskDestination implements the ImageDestination interface, writing images and tags from from the local docker cache into a tarbal.

func NewDiskDestination

func NewDiskDestination(client ImageDiskWriter, file string) *ImageDiskDestination

func (*ImageDiskDestination) Write

func (s *ImageDiskDestination) Write(ctx context.Context, images ...string) error

Write creates a tarball including images and tags from the the local docker cache.

type ImageDiskLoader

type ImageDiskLoader interface {
	LoadFromFile(ctx context.Context, filepath string) error
}

type ImageDiskSource

type ImageDiskSource struct {
	// contains filtered or unexported fields
}

ImageDiskSource implements the ImageSource interface, loading images and tags from a tarbal into the local docker cache.

func NewDiskSource

func NewDiskSource(client ImageDiskLoader, file string) *ImageDiskSource

func (*ImageDiskSource) Load

func (s *ImageDiskSource) Load(ctx context.Context, images ...string) error

Load reads images and tags from a tarbal into the local docker cache.

type ImageDiskWriter

type ImageDiskWriter interface {
	SaveToFile(ctx context.Context, filepath string, images ...string) error
}

type ImageMover

type ImageMover struct {
	// contains filtered or unexported fields
}

ImageMover orchestrates loading images from a source and writing them to a destination.

func NewImageMover

func NewImageMover(source ImageSource, destination ImageDestination) *ImageMover

func (*ImageMover) Move

func (m *ImageMover) Move(ctx context.Context, images ...string) error

Move loads images from source and writes them to the destination.

type ImageOriginalRegistrySource

type ImageOriginalRegistrySource struct {
	Retrier retrier.Retrier
	// contains filtered or unexported fields
}

ImageOriginalRegistrySource implements the ImageSource interface, pulling images and tags from their original registry into the local docker cache.

func NewOriginalRegistrySource

func NewOriginalRegistrySource(client ImagePuller) *ImageOriginalRegistrySource

func (*ImageOriginalRegistrySource) Load

func (s *ImageOriginalRegistrySource) Load(ctx context.Context, images ...string) error

Load pulls images and tags from their original registry into the local docker cache.

type ImageProcessor

type ImageProcessor func(ctx context.Context, image string) error

type ImagePuller

type ImagePuller interface {
	PullImage(ctx context.Context, image string) error
}

type ImageRegistryDestination

type ImageRegistryDestination struct {
	// contains filtered or unexported fields
}

ImageRegistryDestination implements the ImageDestination interface, writing images and tags from from the local docker cache to an external registry.

func NewRegistryDestination

func NewRegistryDestination(client ImageTaggerPusher, registryEndpoint string) *ImageRegistryDestination

func (*ImageRegistryDestination) Write

func (d *ImageRegistryDestination) Write(ctx context.Context, images ...string) error

Write pushes images and tags from from the local docker cache to an external registry.

type ImageSource

type ImageSource interface {
	Load(ctx context.Context, images ...string) error
}

ImageSource represents a generic source for container images that can be loaded into the local docker cache.

type ImageTaggerPusher

type ImageTaggerPusher interface {
	PushImage(ctx context.Context, image string, endpoint string) error
	TagImage(ctx context.Context, image string, endpoint string) error
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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