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 ¶
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).