predicate

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Copyright 2025 HAProxy Technologies LLC

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.

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

This section is empty.

Types

type AnnotationPredicate

type AnnotationPredicate struct {
	predicate.Funcs
	Annotation string
}

AnnotationPredicate implements a predicate function based on the Annotation.

This predicate will skip the following events: 1. Create events that do not contain the Annotation. 2. Update events where the Annotation value has not changed.

func (AnnotationPredicate) Create

Create filters CreateEvents based on the Annotation.

func (AnnotationPredicate) Update

Update filters UpdateEvents based on the Annotation.

type ControllerConfPredicate

type ControllerConfPredicate struct {
	predicate.Funcs
	ControllerConfName types.NamespacedName
}

ControllerConfPredicate implements a predicate function based on the controller conf CRD ns/name This predicate will skip events for GatewayClasses that don't reference this controller.

func (ControllerConfPredicate) Create

Create implements default CreateEvent filter for validating a controller conf CRD ns/name.

func (ControllerConfPredicate) Delete

Delete implements default DeleteEvent filter for validating a controller conf CRD ns/name.

func (ControllerConfPredicate) Update

Update implements default UpdateEvent filter for validating a controller conf CRD ns/name.

type GatewayClassPredicate

type GatewayClassPredicate struct {
	predicate.Funcs
	ControllerName string
}

GatewayClassPredicate implements a predicate function based on the controllerName of a GatewayClass. This predicate will skip events for GatewayClasses that don't reference this controller.

func (GatewayClassPredicate) Create

Create implements default CreateEvent filter for validating a GatewayClass controllerName.

func (GatewayClassPredicate) Delete

Delete implements default DeleteEvent filter for validating a GatewayClass controllerName.

func (GatewayClassPredicate) Update

Update implements default UpdateEvent filter for validating a GatewayClass controllerName.

type GatewayPredicate

type GatewayPredicate struct {
	predicate.Funcs
	GatewayClassNames map[string]struct{}
}

GatewayPredicate implements a predicate function based on the gatewayClassName: of a Gateway. This predicate will skip events for Gateways that don't reference this gatewayClass.

func (GatewayPredicate) Create

func (gp GatewayPredicate) Create(e event.CreateEvent) bool

Create implements default CreateEvent filter for validating a Gateway gatewayClassName.

func (GatewayPredicate) Delete

func (gp GatewayPredicate) Delete(e event.DeleteEvent) bool

Delete implements default DeleteEvent filter for validating a Gateway gatewayClassName.

func (GatewayPredicate) Update

func (gp GatewayPredicate) Update(e event.UpdateEvent) bool

Update implements default UpdateEvent filter for validating a Gateway gatewayClassName.

type NamespacePredicate

type NamespacePredicate struct {
	predicate.Funcs
	// contains filtered or unexported fields
}

func NewNamespacePredicate

func NewNamespacePredicate(ns []string) NamespacePredicate

func (NamespacePredicate) Create

Create implements default CreateEvent filter for validating a namespace among a list.

func (NamespacePredicate) Delete

Delete implements default DeleteEvent filter for validating a namespace among a list.

func (NamespacePredicate) Update

Update implements default UpdateEvent filter for validating a namespace among a list.

Jump to

Keyboard shortcuts

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