handler

package
v1.34.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright 2021 The Operator-SDK Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnqueueRequestForOwnerWithLogging added in v1.33.0

func EnqueueRequestForOwnerWithLogging(scheme *runtime.Scheme, mapper meta.RESTMapper, ownerType client.Object, opts ...OwnerOption) handler.EventHandler

EnqueueRequestForOwnerWithLogging enqueues Requests for the Owners of an object. E.g. the object that created the object that was the source of the Event. It also logs the event with the owner of the object.

If a ReplicaSet creates Pods, users may reconcile the ReplicaSet in response to Pod Events using:

- a source.Kind Source with Type of Pod.

- a handler.enqueueRequestForOwner EventHandler with an OwnerType of ReplicaSet and OnlyControllerOwner set to true.

Types

type LoggingEnqueueRequestForAnnotation

type LoggingEnqueueRequestForAnnotation struct {
	handler.EnqueueRequestForAnnotation
}

LoggingEnqueueRequestForAnnotation wraps operator-lib handler for "InstrumentedEnqueueRequestForObject", and logs the events as they occur

&handler.LoggingEnqueueRequestForAnnotation{}

func (LoggingEnqueueRequestForAnnotation) Create

Create implements EventHandler, and emits a log message.

func (LoggingEnqueueRequestForAnnotation) Delete

Delete implements EventHandler, and emits a log message.

func (LoggingEnqueueRequestForAnnotation) Generic

Generic implements EventHandler, and emits a log message.

func (LoggingEnqueueRequestForAnnotation) Update

Update implements EventHandler, and emits a log message.

type LoggingEnqueueRequestForObject

type LoggingEnqueueRequestForObject struct {
	handler.InstrumentedEnqueueRequestForObject
}

LoggingEnqueueRequestForObject wraps operator-lib handler for "InstrumentedEnqueueRequestForObject", and logs the events as they occur

&handler.LoggingEnqueueRequestForObject{}

func (LoggingEnqueueRequestForObject) Create

Create implements EventHandler, and emits a log message.

func (LoggingEnqueueRequestForObject) Delete

Delete implements EventHandler, and emits a log message.

func (LoggingEnqueueRequestForObject) Generic

Generic implements EventHandler, and emits a log message.

func (LoggingEnqueueRequestForObject) Update

Update implements EventHandler, and emits a log message.

type OwnerOption added in v1.33.0

type OwnerOption func(e *enqueueRequestForOwner)

OwnerOption modifies an EnqueueRequestForOwner EventHandler.

func OnlyControllerOwner added in v1.33.0

func OnlyControllerOwner() OwnerOption

OnlyControllerOwner if provided will only look at the first OwnerReference with Controller: true.

Jump to

Keyboard shortcuts

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