finalizer

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finalizer

type Finalizer interface {
	Finalize(context.Context, client.Object) (Result, error)
}

Finalizer holds Finalize that will add/remove a finalizer based on the deletion timestamp being set and return an indication of whether the obj needs an update or not.

type Finalizers

type Finalizers interface {
	Registerer
	Finalizer
}

Finalizers implements Registerer and Finalizer to finalize all registered finalizers if the provided object has a deletion timestamp or set all registered finalizers if it does not.

func NewFinalizers

func NewFinalizers() Finalizers

NewFinalizers returns the Finalizers interface.

type Registerer

type Registerer interface {
	Register(key string, f Finalizer) error
}

Registerer holds Register that will check if a key is already registered and error out and it does; and if not registered, it will add the finalizer to the finalizers map as the value for the provided key.

type Result

type Result struct {
	// Updated will be true if at least one of the object's non-status field
	// was updated by some registered finalizer.
	Updated bool
	// StatusUpdated will be true if at least one of the object's status' fields
	// was updated by some registered finalizer.
	StatusUpdated bool
}

Result struct holds information about what parts of an object were updated by finalizer(s).

Jump to

Keyboard shortcuts

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