Documentation ¶
Overview ¶
Package conversion implements conversion utilities.
Index ¶
- Constants
- func FuzzTestFunc(input FuzzTestFuncInput) func(*testing.T)
- func GetFuzzer(scheme *runtime.Scheme, funcs ...fuzzer.FuzzerFuncs) *fuzz.Fuzzer
- func MarshalData(src metav1.Object, dst metav1.Object) error
- func UnmarshalData(from metav1.Object, to interface{}) (bool, error)
- type FuzzTestFuncInput
Constants ¶
View Source
const ( // DataAnnotation is the annotation that conversion webhooks // use to retain the data in case of down-conversion from the hub. DataAnnotation = "nearnodeflash.github.io/conversion-data" )
Variables ¶
This section is empty.
Functions ¶
func FuzzTestFunc ¶
func FuzzTestFunc(input FuzzTestFuncInput) func(*testing.T)
FuzzTestFunc returns a new testing function to be used in tests to make sure conversions between the Hub version of an object and an older version aren't lossy.
func MarshalData ¶
MarshalData stores the source object as json data in the destination object annotations map. It ignores the metadata of the source object.
Types ¶
type FuzzTestFuncInput ¶
type FuzzTestFuncInput struct { Scheme *runtime.Scheme Hub conversion.Hub HubAfterMutation func(conversion.Hub) Spoke conversion.Convertible SpokeAfterMutation func(convertible conversion.Convertible) SkipSpokeAnnotationCleanup bool FuzzerFuncs []fuzzer.FuzzerFuncs }
FuzzTestFuncInput contains input parameters for the FuzzTestFunc function.
Click to show internal directories.
Click to hide internal directories.