layers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Path                 string
	LayerDigest          string
	DeletedByLayerDigest string
	Type                 ArtifactType
	Linkname             string
	Content              []byte
	Size                 int64
	ContentClass         ContentClass
	Scannable            bool
}

type ArtifactType

type ArtifactType string
const (
	ArtifactTypeRegularFile ArtifactType = "regular"
	ArtifactTypeHardlink    ArtifactType = "hardlink"
	ArtifactTypeSymlink     ArtifactType = "symlink"
)

type BlobOpener

type BlobOpener interface {
	OpenLayer(ctx context.Context, descriptor manifest.Descriptor) (io.ReadCloser, error)
}

type ContentClass

type ContentClass string
const (
	ContentClassText               ContentClass = "text"
	ContentClassOversize           ContentClass = "oversize"
	ContentClassBinaryELF          ContentClass = "binary_elf"
	ContentClassBinarySharedObject ContentClass = "binary_shared_object"
	ContentClassBinaryNUL          ContentClass = "binary_nul"
	ContentClassBinaryLowPrintable ContentClass = "binary_low_printable"
)

type OpenFunc

type OpenFunc func(ctx context.Context, descriptor manifest.Descriptor) (io.ReadCloser, error)

func (OpenFunc) OpenLayer

func (f OpenFunc) OpenLayer(ctx context.Context, descriptor manifest.Descriptor) (io.ReadCloser, error)

type ReplayOptions

type ReplayOptions struct {
	MaxFileBytes    int64
	MaxLayerBytes   int64
	MaxLayerEntries int
}

type ReplayResult

type ReplayResult struct {
	FinalFiles       []Artifact
	DeletedArtifacts []Artifact
}

func Replay

func Replay(ctx context.Context, descriptors []manifest.Descriptor, options ReplayOptions, opener BlobOpener) (ReplayResult, error)

type State

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

func NewState

func NewState() *State

func (*State) DeletedArtifacts

func (s *State) DeletedArtifacts() []Artifact

func (*State) FinalFiles

func (s *State) FinalFiles() []Artifact

func (*State) Result

func (s *State) Result() ReplayResult

Jump to

Keyboard shortcuts

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