patches

package
v1.8.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package patches implement the patch engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Apply(ctx context.Context, blueprint *scope.ClusterBlueprint, desired *scope.ClusterState) error
}

Engine is a patch engine which applies patches defined in a ClusterBlueprint to a ClusterState.

func NewEngine

func NewEngine(runtimeClient runtimeclient.Client) Engine

NewEngine creates a new patch engine.

type PatchOption

type PatchOption interface {
	// ApplyToHelper applies configuration to the given options.
	ApplyToHelper(*PatchOptions)
}

PatchOption represents an option for the patchObject and patchTemplate funcs.

type PatchOptions

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

PatchOptions contains options for patchObject and patchTemplate.

func (*PatchOptions) ApplyOptions

func (o *PatchOptions) ApplyOptions(opts []PatchOption)

ApplyOptions applies the given patch options.

type PreserveFields

type PreserveFields []contract.Path

PreserveFields instructs the patch func to preserve fields.

func (PreserveFields) ApplyToHelper

func (i PreserveFields) ApplyToHelper(opts *PatchOptions)

ApplyToHelper applies this configuration to the given patch options.

Directories

Path Synopsis
Package api contains the API definition for the patch engine.
Package api contains the API definition for the patch engine.
Package external implements the external patch generator.
Package external implements the external patch generator.
Package inline implements the inline JSON patch generator.
Package inline implements the inline JSON patch generator.
Package variables calculates variables for patching.
Package variables calculates variables for patching.

Jump to

Keyboard shortcuts

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