handler

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package handler is a more flexible EventHandler builder in a chain fashion.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	AddFinder(Finder) Builder
	Build() handler.EventHandler
}

Builder defines an EventHandler builder

func NewBuilder

func NewBuilder(ctx *FinderContext) Builder

type Finder

type Finder interface {
	Find(*FinderContext, client.Object) *model.GVKNObjKey
}

Finder finds a new object by an old object

func NewDelegatorFinder

func NewDelegatorFinder(delegatorType runtime.Object, nameLabels []string) Finder

func NewInvolvedObjectFinder

func NewInvolvedObjectFinder(objectType runtime.Object) Finder

func NewLabelFinder added in v0.9.0

func NewLabelFinder(ownerType runtime.Object, managedByKey, managedByValue, parentNameKey string) Finder

NewLabelFinder return a finder which finds the owner of an object

func NewOwnerFinder

func NewOwnerFinder(ownerType runtime.Object) Finder

NewOwnerFinder return a finder which finds the owner of an object

type FinderContext

type FinderContext struct {
	context.Context
	client.Reader
	Scheme runtime.Scheme
}

Jump to

Keyboard shortcuts

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