image

package
v0.0.0-...-f499bdd Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LayerFormat = "%7s  %s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalysisResult

type AnalysisResult struct {
	Layers            []*Layer
	RefTrees          []*filetree.FileTree
	Efficiency        float64
	SizeBytes         uint64
	UserSizeByes      uint64  // this is all bytes except for the base image
	WastedUserPercent float64 // = wasted-bytes/user-size-bytes
	WastedBytes       uint64
	Inefficiencies    filetree.EfficiencySlice
}

type Analyzer

type Analyzer interface {
	Analyze() (*AnalysisResult, error)
}

type Image

type Image struct {
	Trees  []*filetree.FileTree
	Layers []*Layer
}

func (*Image) Analyze

func (img *Image) Analyze() (*AnalysisResult, error)

type Layer

type Layer struct {
	Id      string
	Index   int
	Command string
	Size    uint64
	Tree    *filetree.FileTree
	Names   []string
	Digest  string
}

func (*Layer) ShortId

func (l *Layer) ShortId() string

func (*Layer) String

func (l *Layer) String() string

type Resolver

type Resolver interface {
	Fetch(id string) (*Image, error)
	Build(options []string) (*Image, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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