handler

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOrUpdateFunc

type CreateOrUpdateFunc[T types.Object] func(ctx context.Context, object T) error

type CustomHandler

type CustomHandler[T types.Object] struct {
	// contains filtered or unexported fields
}

func NewCustomHandler

func NewCustomHandler[T types.Object](createOrUpdate CreateOrUpdateFunc[T], delete DeleteFunc[T]) *CustomHandler[T]

func (*CustomHandler[T]) CreateOrUpdate

func (h *CustomHandler[T]) CreateOrUpdate(ctx context.Context, object T) error

func (*CustomHandler[T]) Delete

func (h *CustomHandler[T]) Delete(ctx context.Context, obj T) error

type DeleteFunc

type DeleteFunc[T types.Object] func(ctx context.Context, obj T) error

type Handler

type Handler[T client.Object] interface {
	CreateOrUpdate(ctx context.Context, obj T) error
	Delete(ctx context.Context, obj T) error
}

type NopHandler

type NopHandler[T types.Object] struct{}

func NewNopHandler

func NewNopHandler[T types.Object]() *NopHandler[T]

func (*NopHandler[T]) CreateOrUpdate

func (h *NopHandler[T]) CreateOrUpdate(ctx context.Context, object T) error

func (*NopHandler[T]) Delete

func (h *NopHandler[T]) Delete(ctx context.Context, obj T) error

Jump to

Keyboard shortcuts

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