mtreefilter

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterDeltas

func FilterDeltas(deltas []mtree.InodeDelta, filters ...FilterFunc) []mtree.InodeDelta

FilterDeltas is a helper function to easily filter []mtree.InodeDelta with a filter function. Only entries which have `filter(delta.Path()) == true` will be included in the returned slice.

Types

type FilterFunc

type FilterFunc func(path string) bool

FilterFunc is a function used when filtering deltas with FilterDeltas.

func MaskFilter

func MaskFilter(masks []string) FilterFunc

MaskFilter is a factory for FilterFuncs that will mask all InodeDelta paths that are lexical children of any path in the mask slice. All paths are considered to be relative to '/'.

func SimplifyFilter added in v0.4.2

func SimplifyFilter(deltas []mtree.InodeDelta) FilterFunc

SimplifyFilter is a factory that takes a list of InodeDelta and creates a filter to filter out all deletion entries that have a parent which also has a deletion entry. This is necessary to both reduce our image sizes and remain compatible with Docker's now-incompatible image format (the OCI spec doesn't require this behaviour but it's now needed because of course Docker won't fix their own bugs).

Jump to

Keyboard shortcuts

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