Add basic import and export handlers

Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
Derek McGowan
2022-08-17 15:32:01 -07:00
parent adfaeeff0d
commit d1627e3c71
6 changed files with 457 additions and 0 deletions

View File

@@ -50,6 +50,17 @@ type ImageStorer interface {
Store(context.Context, ocispec.Descriptor) (images.Image, error)
}
// ImageImportStreamer returns an import streamer based on OCI or
// Docker image tar archives. The stream should be a raw tar stream
// and without compression.
type ImageImportStreamer interface {
ImportStream(context.Context) (io.Reader, error)
}
type ImageExportStreamer interface {
ExportStream(context.Context) (io.WriteCloser, error)
}
type ImageUnpacker interface {
// TODO: Or unpack options?
UnpackPlatforms() []unpack.Platform