@@ -47,13 +47,15 @@ type TypedPredicate[object any] interface {
47
47
Generic (event.TypedGenericEvent [object ]) bool
48
48
}
49
49
50
- var _ Predicate = Funcs {}
51
- var _ Predicate = ResourceVersionChangedPredicate {}
52
- var _ Predicate = GenerationChangedPredicate {}
53
- var _ Predicate = AnnotationChangedPredicate {}
54
- var _ Predicate = or [client.Object ]{}
55
- var _ Predicate = and [client.Object ]{}
56
- var _ Predicate = not [client.Object ]{}
50
+ var (
51
+ _ Predicate = Funcs {}
52
+ _ Predicate = ResourceVersionChangedPredicate {}
53
+ _ Predicate = GenerationChangedPredicate {}
54
+ _ Predicate = AnnotationChangedPredicate {}
55
+ _ Predicate = or [client.Object ]{}
56
+ _ Predicate = and [client.Object ]{}
57
+ _ Predicate = not [client.Object ]{}
58
+ )
57
59
58
60
// Funcs is a function that implements Predicate.
59
61
type Funcs = TypedFuncs [client.Object ]
@@ -259,11 +261,10 @@ func (TypedAnnotationChangedPredicate[object]) Update(e event.TypedUpdateEvent[o
259
261
// This predicate will skip update events that have no change in the object's label.
260
262
// It is intended to be used in conjunction with the GenerationChangedPredicate, as in the following example:
261
263
//
262
- // Controller.Watch(
263
- //
264
- // &source.Kind{Type: v1.MyCustomKind},
265
- // &handler.EnqueueRequestForObject{},
266
- // predicate.Or(predicate.GenerationChangedPredicate{}, predicate.LabelChangedPredicate{}))
264
+ // Controller.Watch(
265
+ // &source.Kind{Type: v1.MyCustomKind},
266
+ // &handler.EnqueueRequestForObject{},
267
+ // predicate.Or(predicate.GenerationChangedPredicate{}, predicate.LabelChangedPredicate{}))
267
268
//
268
269
// This will be helpful when object's labels is carrying some extra specification information beyond object's spec,
269
270
// and the controller will be triggered if any valid spec change (not only in spec, but also in labels) happens.
0 commit comments