patcher

package
v0.21.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option interface {
	Apply(p *Patcher)
}

func Direction

func Direction(direction string) Option

func NoStatusSubResource

func NoStatusSubResource() Option

func TranslatePatches

func TranslatePatches(translate []config.TranslatePatch) Option

type Patcher

type Patcher struct {
	NoStatusSubResource bool
	// contains filtered or unexported fields
}

Patcher is a utility for ensuring the proper patching of objects.

func NewPatcher

func NewPatcher(obj client.Object, crClient client.Client, options ...Option) (*Patcher, error)

NewPatcher returns an initialized Patcher.

func (*Patcher) Patch

func (h *Patcher) Patch(ctx *synccontext.SyncContext, obj client.Object) error

Patch will attempt to patch the given object, including its status.

type SyncerPatcher

type SyncerPatcher struct {
	// contains filtered or unexported fields
}

func NewSyncerPatcher

func NewSyncerPatcher(ctx *synccontext.SyncContext, pObj, vObj client.Object, options ...Option) (*SyncerPatcher, error)

func (*SyncerPatcher) Patch

func (h *SyncerPatcher) Patch(ctx *synccontext.SyncContext, pObj, vObj client.Object) error

Patch will attempt to patch the given object, including its status.

Jump to

Keyboard shortcuts

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