finalizer

package
v0.0.0-...-9b96d08 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finalizer

type Finalizer struct {
	Name    string
	Execute func() error
}

Finalizer can be attached to a resource and executed upon resource deletion

type Handler

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

Handler handles registration and execution of finalizers Note that it is not thread-safe.

func NewHandler

func NewHandler(client client.Client) Handler

NewHandler creates a Handler

func (*Handler) Handle

func (h *Handler) Handle(resource runtime.Object, finalizers ...Finalizer) error

Handle the configured finalizers for the given resource. The given objectMeta must be a sub-part of the given resource: updates for the resource will be issued against the apiserver based on objectMeta content if needed. If the resource is marked for deletion, finalizers will be executed then removed from the resource. Else, the function is making sure all finalizers are correctly registered for the resource.

Jump to

Keyboard shortcuts

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