Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MergedDeviceOption ¶ added in v1.14.0
type MergedDeviceOption func(*mergedDevice)
MergedDeviceOption is a function that configures a merged device
func WithName ¶ added in v1.14.0
func WithName(name string) MergedDeviceOption
WithName sets the name of the merged device
func WithSkipIfExists ¶ added in v1.14.0
func WithSkipIfExists(skipIfExists bool) MergedDeviceOption
WithSkipIfExists sets whether to skip adding the merged device if it already exists
type Transformer ¶
type Transformer interface {
Transform(*specs.Spec) error
}
Transformer defines the API for applying arbitrary transforms to a spec in-place
func Merge ¶ added in v1.14.0
func Merge(transformers ...Transformer) Transformer
Merge creates a merged transofrmer from the specified transformers.
func NewDedupe ¶
func NewDedupe() (Transformer, error)
NewDedupe creates a transformer that deduplicates container edits.
func NewMergedDevice ¶ added in v1.14.0
func NewMergedDevice(opts ...MergedDeviceOption) (Transformer, error)
NewMergedDevice creates a transformer with the specified options
func NewSimplifier ¶
func NewSimplifier() Transformer
NewSimplifier creates a simplifier transformer. This transoformer ensures that entities in the spec are deduplicated and that common edits are removed from device-specific edits.
func NewSorter ¶ added in v1.14.0
func NewSorter() Transformer
NewSorter creates a transformer that sorts container edits.