layout

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: 18 Imported by: 0

Documentation

Index

Constants

View Source
const OSWindows = "windows"

Variables

This section is empty.

Functions

func DirectoryDiskUsage

func DirectoryDiskUsage(path string) (string, error)

DirectoryDiskUsage returns the disk usage of the specified directory.

func IsDirWithOnlyFiles

func IsDirWithOnlyFiles(path string) (bool, error)

IsDirWithOnlyFiles checks if the given path is a directory that contains only files (no subdirectories).

Types

type ImmutableStatistics

type ImmutableStatistics struct {
	SourceBytesCount     int64
	BytesWrittenCount    int64
	BytesSkippedCount    int64
	BytesReadCount       int64
	BytesClonedCount     int64
	CompressedBytesCount int64
	MatchedSegmentsCount int64
}

ImmutableStatistics holds the immutable copy of statistics

type Layout

type Layout struct {
	Filenames []string
	Digests   map[string][]v1.Hash
	Sizes     []int64
}

type Mapper

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

func NewMapper

func NewMapper(rootDir string, opts ...dirimage.Option) *Mapper

func (*Mapper) Adopt

func (lm *Mapper) Adopt(src string, ref name.Reference, failIfContainsSubdirectories bool) error

func (*Mapper) Clone

func (lm *Mapper) Clone(src name.Reference, dst name.Reference) error

func (*Mapper) List

func (lm *Mapper) List() ([]Properties, error)

func (*Mapper) Read

func (lm *Mapper) Read(ctx context.Context, ref name.Reference) (v1.Image, error)

func (*Mapper) Rehash added in v0.7.0

func (lm *Mapper) Rehash(ctx context.Context, ref name.Reference) error

func (*Mapper) Remove

func (lm *Mapper) Remove(src name.Reference) error

func (*Mapper) Stats

func (lm *Mapper) Stats() ImmutableStatistics

func (*Mapper) Write

func (lm *Mapper) Write(ctx context.Context, img v1.Image, ref name.Reference) error

func (*Mapper) WriteIfNotPresent

func (lm *Mapper) WriteIfNotPresent(ctx context.Context, img v1.Image, ref name.Reference) error

type MountableImage

type MountableImage struct {
	v1.Image

	Reference name.Reference
}

func NewMountableImage

func NewMountableImage(image v1.Image, ref name.Reference) *MountableImage

func (*MountableImage) ConfigLayer

func (mi *MountableImage) ConfigLayer() (v1.Layer, error)

func (*MountableImage) LayerByDiffID

func (mi *MountableImage) LayerByDiffID(d v1.Hash) (v1.Layer, error)

func (*MountableImage) LayerByDigest

func (mi *MountableImage) LayerByDigest(d v1.Hash) (v1.Layer, error)

func (*MountableImage) Layers

func (mi *MountableImage) Layers() ([]v1.Layer, error)

type Properties

type Properties struct {
	Ref         name.Reference
	DiskUsage   string
	Size        int64
	HasManifest bool
}

type Statistics

type Statistics struct {
	SourceBytesCount     atomic.Int64
	BytesWrittenCount    atomic.Int64
	BytesSkippedCount    atomic.Int64
	BytesReadCount       atomic.Int64
	BytesClonedCount     atomic.Int64
	CompressedBytesCount atomic.Int64
	MatchedSegmentsCount atomic.Int64
}

func (*Statistics) Add

func (s *Statistics) Add(other *Statistics)

func (*Statistics) Clear

func (s *Statistics) Clear()

func (*Statistics) String

func (s *Statistics) String() string

String formats the Statistics struct for human-readable output

Jump to

Keyboard shortcuts

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