transform

package
v1.14.5 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

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 NewNoopTransformer

func NewNoopTransformer() Transformer

NewNoopTransformer returns a no-op transformer

func NewRootTransformer

func NewRootTransformer(root string, targetRoot string) Transformer

NewRootTransformer creates a new transformer for modifying the root for paths in a CDI spec. If both roots are identical, this tranformer is a no-op.

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.

Jump to

Keyboard shortcuts

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