Documentation ¶
Overview ¶
Package mergepatch implements merge patch support for managed topology.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper helps with a patch that yields the modified document when applied to the original document.
func NewHelper ¶
func NewHelper(original, modified client.Object, c client.Client, opts ...HelperOption) (*Helper, error)
NewHelper will return a patch that yields the modified document when applied to the original document. NOTE: In the case of ClusterTopologyReconciler, original is the current object, modified is the desired object, and the patch returns all the changes required to align current to what is defined in desired; fields not defined in desired are going to be preserved without changes.
func (*Helper) HasChanges ¶
HasChanges return true if the patch has changes.
type HelperOption ¶
type HelperOption interface { // ApplyToHelper applies this configuration to the given helper options. ApplyToHelper(*HelperOptions) }
HelperOption is some configuration that modifies options for Helper.
type HelperOptions ¶
type HelperOptions struct {
// contains filtered or unexported fields
}
HelperOptions contains options for Helper.
func (*HelperOptions) ApplyOptions ¶
func (o *HelperOptions) ApplyOptions(opts []HelperOption) *HelperOptions
ApplyOptions applies the given patch options on these options, and then returns itself (for convenient chaining).
type IgnorePaths ¶
IgnorePaths instruct the Helper to ignore given paths when computing a patch.
func (IgnorePaths) ApplyToHelper ¶
func (i IgnorePaths) ApplyToHelper(opts *HelperOptions)
ApplyToHelper applies this configuration to the given helper options.