dirimage

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const LocalConfigFilename = ".oci.config.json"
View Source
const LocalManifestFilename = ".oci.manifest.json"

Variables

View Source
var ConfigMediaType = types.OCIConfigJSON
View Source
var ManifestMediaType = types.OCIManifestSchema1

https://opencontainers.org/posts/blog/2024-03-13-image-and-distribution-1-1/

Functions

This section is empty.

Types

type DirImage

type DirImage struct {
	v1.Image
	BytesReadCount    atomic.Int64
	BytesWrittenCount atomic.Int64
	BytesSkippedCount atomic.Int64
	// contains filtered or unexported fields
}

func Convert

func Convert(img v1.Image) (*DirImage, error)

func New added in v0.7.1

func New(dir string, img v1.Image) *DirImage

func Read

func Read(ctx context.Context, dir string, opt ...Option) (*DirImage, error)

func (*DirImage) Length

func (di *DirImage) Length() int64

func (*DirImage) Write

func (di *DirImage) Write(ctx context.Context, destinationDir string, opt ...Option) error

func (*DirImage) WriteConfigAndManifest added in v0.7.0

func (di *DirImage) WriteConfigAndManifest(destinationDir string) error

type Option

type Option func(opts *options)

func WithChunkSize

func WithChunkSize(chunkSize int64) Option

func WithLogFunction

func WithLogFunction(log func(fmt string, args ...any)) Option

func WithOmitLayersContent added in v0.6.4

func WithOmitLayersContent() Option

func WithProgressChannel

func WithProgressChannel(progress chan<- ProgressUpdate) Option

func WithWorkersCount

func WithWorkersCount(workersCount int) Option

type ProgressUpdate

type ProgressUpdate struct {
	BytesProcessed int64
	BytesTotal     int64
}

Jump to

Keyboard shortcuts

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