Documentation ¶
Index ¶
- func Available(image string, opt ...crane.Option) bool
- func CreateTar(srctar, dstimageTar, imagename, architecture, OS string) error
- func Extract(ctx types.Context, img v1.Image, filter func(h *tar.Header) (bool, error), ...) (int64, string, error)
- func ExtractDeltaAdditionsFiles(ctx types.Context, srcimg v1.Image, includes []string, excludes []string) (func(h *tar.Header) (bool, error), error)
- func ExtractFiles(ctx types.Context, prefixPath string, includes []string, excludes []string) func(h *tar.Header) (bool, error)
- func ExtractReader(ctx types.Context, reader io.ReadCloser, output string, ...) (int64, string, error)
- func ExtractTo(ctx types.Context, img v1.Image, output string, ...) (int64, string, error)
- type Cache
- type CacheResult
- type ImageDiff
- type ImageDiffNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶
func Extract(ctx types.Context, img v1.Image, filter func(h *tar.Header) (bool, error), opts ...containerdarchive.ApplyOpt) (int64, string, error)
Extract is just syntax sugar around ExtractReader. It extracts an image into a dir
func ExtractDeltaAdditionsFiles ¶
func ExtractDeltaAdditionsFiles( ctx types.Context, srcimg v1.Image, includes []string, excludes []string, ) (func(h *tar.Header) (bool, error), error)
ExtractDeltaAdditionsFromImages is a filter that takes two images an includes and an excludes list. It computes the delta between the images considering the added files only, and applies a filter on them based on the regexes in the lists.
func ExtractFiles ¶
func ExtractFiles( ctx types.Context, prefixPath string, includes []string, excludes []string, ) func(h *tar.Header) (bool, error)
ExtractFiles returns a filter that extracts files from the given path (if not empty) It then filters files by an include and exclude list. The list can be regexes
func ExtractReader ¶
func ExtractReader(ctx types.Context, reader io.ReadCloser, output string, filter func(h *tar.Header) (bool, error), opts ...containerdarchive.ApplyOpt) (int64, string, error)
ExtractReader perform the extracting action over the io.ReadCloser it extracts the files over output. Accepts a filter as an option and additional containerd Options
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache represents a key-value store which is capable to upgrade to disk when it reaches a pre-defined threshold.
func NewCache ¶
New creates a new key-value cache the cache acts in memory as long as the maxItemsize is not reached. Once the threshold is met the cache is offloaded to disk automatically, with a buffer of maxmemorySize into memory.
func (*Cache) Count ¶
Count returns the items in the cache. If it's a disk cache might be an expensive call.
type CacheResult ¶
type CacheResult struct {
// contains filtered or unexported fields
}
CacheResult represent the key value result when iterating over the cache
func (CacheResult) Unmarshal ¶
func (c CacheResult) Unmarshal(i interface{}) error
Unmarshal the result into the interface. Use it to retrieve data set with SetValue
type ImageDiff ¶
type ImageDiff struct { Additions []ImageDiffNode `json:"Adds"` Deletions []ImageDiffNode `json:"Dels"` Changes []ImageDiffNode `json:"Mods"` }