File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import (
22
22
"k8s.io/client-go/util/workqueue"
23
23
"sigs.k8s.io/controller-runtime/pkg/event"
24
24
"sigs.k8s.io/controller-runtime/pkg/reconcile"
25
+ "sigs.k8s.io/controller-runtime/pkg/runtime/inject"
25
26
)
26
27
27
28
var _ EventHandler = & EnqueueRequestsFromMapFunc {}
@@ -68,6 +69,16 @@ func (e *EnqueueRequestsFromMapFunc) mapAndEnqueue(q workqueue.RateLimitingInter
68
69
}
69
70
}
70
71
72
+ // EnqueueRequestsFromMapFunc can inject fields into the mapper.
73
+
74
+ // InjectFunc implements inject.Injector.
75
+ func (e * EnqueueRequestsFromMapFunc ) InjectFunc (f inject.Func ) error {
76
+ if f == nil {
77
+ return nil
78
+ }
79
+ return f (e .ToRequests )
80
+ }
81
+
71
82
// Mapper maps an object to a collection of keys to be enqueued
72
83
type Mapper interface {
73
84
// Map maps an object
You can’t perform that action at this time.
0 commit comments