Documentation ¶
Index ¶
- func Decode(bs []byte, out any) error
- func DecodeAny(bs []byte, scheme *runtime.Scheme) (client.Object, error)
- func DecodeAnyRuntime(bs []byte, scheme *runtime.Scheme) (runtime.Object, error)
- func DecodeInto(bs []byte, into runtime.Object, scheme *runtime.Scheme) error
- func DecodeIntoT[T runtime.Object](bs []byte, into T, scheme *runtime.Scheme) (T, error)
- func Dump(obj client.Object, scheme *runtime.Scheme)
- func Encode(obj runtime.Object, scheme *runtime.Scheme) ([]byte, error)
- func EncodeAny(obj any) ([]byte, error)
- func Merge[T runtime.Object](patch runtime.Object, object runtime.Object, result T, ...) (T, error)
- func New(gvk schema.GroupVersionKind, scheme *runtime.Scheme) client.Object
- func NewRuntime(gvk schema.GroupVersionKind, scheme *runtime.Scheme) runtime.Object
- func NewSerializer(scheme *runtime.Scheme) runtime.Serializer
- type Comparison
- type Diff
- type FilterFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeAnyRuntime ¶ added in v1.10.5
func DecodeInto ¶ added in v1.7.0
Deprecaaated: use DecodeIntoT instead
func DecodeIntoT ¶ added in v1.7.0
func Merge ¶ added in v1.7.0
func Merge[T runtime.Object](patch runtime.Object, object runtime.Object, result T, serializer runtime.Serializer, ) (T, error)
Merge applies 'source' as a patch to 'dest', returning a new object containing the merge result. It requires that 'dest' has APIVersion and Kind set. This function is dangerous to use with objects derived from yaml/json when fields don't have omitEmpty Consider a field with no omitEmpty JSON tag. If this field is not set in 'source', if will be present as an empty value in the JSON of 'source' and then overwrite whatever the field had in 'dest'.
func NewRuntime ¶ added in v1.10.5
func NewSerializer ¶ added in v1.7.0
func NewSerializer(scheme *runtime.Scheme) runtime.Serializer
Types ¶
type Comparison ¶ added in v1.7.0
type Comparison struct { From client.Object To client.Object // contains filtered or unexported fields }
func NewComparison ¶ added in v1.7.0
func NewComparison(from, to client.Object, scheme *runtime.Scheme) *Comparison
func (*Comparison) AddFilter ¶ added in v1.7.0
func (c *Comparison) AddFilter(f FilterFunc)
func (*Comparison) AddRemoveDiffs ¶ added in v1.7.0
func (c *Comparison) AddRemoveDiffs(keys ...string)
func (*Comparison) ComputeDiff ¶ added in v1.7.0
func (c *Comparison) ComputeDiff() (*Diff, error)
type FilterFunc ¶ added in v1.7.0
func RemoveAnnotationsFilter ¶ added in v1.7.0
func RemoveAnnotationsFilter(names ...string) FilterFunc
Click to show internal directories.
Click to hide internal directories.