helper

package
v0.0.0-...-ed0ccfb Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DatabaseResourcePrefix = "k8s_"
)

Variables

This section is empty.

Functions

func EnqueueRequestsFromMapFunc

func EnqueueRequestsFromMapFunc(fn MapFunc) handler.EventHandler

EnqueueRequestsFromMapFunc enqueues Requests by running a transformation function that outputs a collection of reconcile.Requests on each Event. The reconcile.Requests may be for an arbitrary set of objects defined by some user specified transformation of the source Event. (e.g. trigger Reconciler for a set of objects in response to a cluster resize event caused by adding or deleting a Node)

EnqueueRequestsFromMapFunc is frequently used to fan-out updates from one object to one or more other objects of a differing type.

For UpdateEvents which contain both a new and old object, the transformation function is run on both objects and both sets of Requests are enqueue.

func GeneratePassword

func GeneratePassword(ctx context.Context) string

TODO actually generate password

func LoadConfigFile

func LoadConfigFile(configFile string, options ctrl.Options) (
	ctrl.Options, *dbov1.DatabaseAccountControllerConfig, error,
)

Types

type MapFunc

type MapFunc func(context.Context, client.Object) []reconcile.Request

MapFunc is the signature required for enqueueing requests from a generic function. This type is usually used with EnqueueRequestsFromMapFunc when registering an event handler.

Jump to

Keyboard shortcuts

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