reconcilerutil

package
v2.11.14 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package reconcilerutil holds utility functions for Kf reconcilers similar to go's ioutil and httputil packages.

Index

Constants

This section is empty.

Variables

AddFinalizer adds a finalizer to the given object.

RemoveFinalizer removes a finalizer from the given object.

Functions

func HasFinalizer

func HasFinalizer(obj metav1.Object, finalizer string) bool

HasFinalizer checks if an object has a finalizer.

func HealthCheckerMain

func HealthCheckerMain(ctx context.Context, addr, component string, ctors ...injection.ControllerConstructor)

HealthCheckerMain wraps sharedmain.Main and therefore blocks until the controller is shutdown. The main difference is it starts a health endpoint on addr. Any constructor that implements HealthChecker will be used to determine if the endpoint returns a 204 or a 503.

func IsConflictOSBError

func IsConflictOSBError(err error) bool

Types

type HealthChecker

type HealthChecker interface {
	Healthy(ctx context.Context) error
}

HealthChecker has a Healthy method that gets invoked periodically to determine the health of the controller.

Jump to

Keyboard shortcuts

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