imageexport

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitOpts

type CommitOpts struct {
	RefCfg           cacheconfig.RefConfig
	OCITypes         bool
	Epoch            *time.Time
	RewriteTimestamp bool
}

type Deps

type Deps struct {
	Images       images.Store
	ContentStore content.Store
	LeaseManager leases.Manager
	Writer       *Writer
	Pusher       RegistryPusher
}

type ExportOpts

type ExportOpts struct {
	Names          []string
	NameCanonical  bool
	DanglingPrefix string

	Push         bool
	PushByDigest bool
	Store        bool
	Insecure     bool

	Commit CommitOpts
}

type ExportRequest

type ExportRequest struct {
	Platforms []PlatformExportInput

	IndexAnnotations           map[string]string
	IndexDescriptorAnnotations map[string]string
	InlineCache                map[string][]byte
}

type ExportResponse

type ExportResponse struct {
	RootDesc   ocispecs.Descriptor
	Platforms  []ExportedPlatform
	ImageNames []string
}

func Export

func Export(
	ctx context.Context,
	deps Deps,
	req *ExportRequest,
	opts ExportOpts,
) (*ExportResponse, error)

type ExportedImage

type ExportedImage struct {
	RootDesc ocispecs.Descriptor

	Platforms []ExportedPlatform
	Provider  content.InfoReaderProvider

	SourceAnnotations map[digest.Digest]map[string]string
}

type ExportedPlatform

type ExportedPlatform struct {
	Key          string
	Platform     ocispecs.Platform
	ManifestDesc ocispecs.Descriptor
	ConfigDesc   ocispecs.Descriptor
}

type PlatformExportInput

type PlatformExportInput struct {
	Key      string
	Platform ocispecs.Platform
	Ref      cache.ImmutableRef

	Config    dockerspec.DockerOCIImage
	BaseImage *dockerspec.DockerOCIImage

	ManifestAnnotations           map[string]string
	ManifestDescriptorAnnotations map[string]string
}

type PushOpts

type PushOpts struct {
	PushByDigest bool
	Insecure     bool
}

type RegistryPusher

type RegistryPusher interface {
	PushImage(
		ctx context.Context,
		img *ExportedImage,
		ref string,
		opts PushOpts,
	) error
}

type Writer

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

func NewWriter

func NewWriter(opt WriterOpt) (*Writer, error)

func (*Writer) Assemble

func (w *Writer) Assemble(
	ctx context.Context,
	req *ExportRequest,
	opts CommitOpts,
) (*ExportedImage, error)

type WriterOpt

type WriterOpt struct {
	Snapshotter  cache.Snapshotter
	ContentStore content.Store
	Applier      diff.Applier
	Differ       diff.Comparer
}

Jump to

Keyboard shortcuts

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