builder

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder builds a Controller.

func ControllerManagedBy

func ControllerManagedBy(m manager.Manager) *Builder

ControllerManagedBy returns a new controller builder that will be started by the provided Manager.

func (*Builder) Build

Build builds the complete controller by validating the configuration, setting up the controller and starting the event source watcher.

func (*Builder) Complete

func (blder *Builder) Complete(r reconcile.Reconciler) error

Complete builds the Application ControllerManagedBy.

func (*Builder) Named

func (blder *Builder) Named(name string) *Builder

Named sets the name of the controller to the given name. The name shows up in metrics, among other things, and thus should be a prometheus compatible name (underscores and alphanumeric characters only).

By default, controllers are named using the lowercase version of their kind.

func (*Builder) WithEventHandler

func (blder *Builder) WithEventHandler(h handler.EventHandler) *Builder

WithEventHandler sets the source event handler.

func (*Builder) WithLogger

func (blder *Builder) WithLogger(log logr.Logger) *Builder

WithLogger overrides the controller options's logger used.

func (*Builder) WithOptions

func (blder *Builder) WithOptions(options controller.Options) *Builder

WithOptions overrides the controller options use in doController. Defaults to empty.

func (*Builder) WithSource

func (blder *Builder) WithSource(src <-chan event.GenericEvent) *Builder

WithSource sets the generic event source of the controller.

Jump to

Keyboard shortcuts

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