@@ -110,7 +110,7 @@ func Test_enqueueRefRequestsHandler_Create(t *testing.T) {
110
110
refCache : cache ,
111
111
createEvents : createEvents ,
112
112
q : & DelegatingQueue {
113
- Interface : workqueue .New ( ),
113
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
114
114
},
115
115
wantAddedAfter : wantAddedAfterValid ,
116
116
maxRequeueAfter : time .Second * 10 ,
@@ -122,7 +122,7 @@ func Test_enqueueRefRequestsHandler_Create(t *testing.T) {
122
122
refCache : cache ,
123
123
createEvents : createEvents ,
124
124
q : & DelegatingQueue {
125
- Interface : workqueue .New ( ),
125
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
126
126
},
127
127
wantAddedAfter : wantAddedAfterValid ,
128
128
wantRefCache : cache ,
@@ -133,7 +133,7 @@ func Test_enqueueRefRequestsHandler_Create(t *testing.T) {
133
133
refCache : cache ,
134
134
createEvents : createEvents ,
135
135
q : & DelegatingQueue {
136
- Interface : workqueue .New ( ),
136
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
137
137
},
138
138
wantAddedAfter : wantAddedAfterValid ,
139
139
maxRequeueAfter : time .Second * - 1 ,
@@ -146,7 +146,7 @@ func Test_enqueueRefRequestsHandler_Create(t *testing.T) {
146
146
createEvents : createEvents ,
147
147
validator : & validatorFunc {},
148
148
q : & DelegatingQueue {
149
- Interface : workqueue .New ( ),
149
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
150
150
},
151
151
wantValidObjects : []client.Object {
152
152
createEvent .Object ,
@@ -162,7 +162,7 @@ func Test_enqueueRefRequestsHandler_Create(t *testing.T) {
162
162
createEvents : createEvents ,
163
163
validator : & validatorFunc {},
164
164
q : & DelegatingQueue {
165
- Interface : workqueue .New ( ),
165
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
166
166
},
167
167
wantInvalidObjects : []client.Object {
168
168
createEvent .Object ,
@@ -178,7 +178,7 @@ func Test_enqueueRefRequestsHandler_Create(t *testing.T) {
178
178
},
179
179
createEvents : createEvents ,
180
180
q : & DelegatingQueue {
181
- Interface : workqueue .New ( ),
181
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
182
182
},
183
183
},
184
184
}
@@ -250,7 +250,7 @@ func Test_enqueueRefRequestsHandler_Update(t *testing.T) {
250
250
refCache : cache ,
251
251
updateEvents : updateEventsEnqueue ,
252
252
q : & DelegatingQueue {
253
- Interface : workqueue .New ( ),
253
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
254
254
},
255
255
wantAddedAfter : wantAddedAfterValid ,
256
256
wantRefCache : cache ,
@@ -262,7 +262,7 @@ func Test_enqueueRefRequestsHandler_Update(t *testing.T) {
262
262
updateEvents : updateEventsEnqueue ,
263
263
validator : & validatorFunc {},
264
264
q : & DelegatingQueue {
265
- Interface : workqueue .New ( ),
265
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
266
266
},
267
267
wantValidObjects : []client.Object {
268
268
objectNew ,
@@ -278,7 +278,7 @@ func Test_enqueueRefRequestsHandler_Update(t *testing.T) {
278
278
updateEvents : updateEventsEnqueue ,
279
279
validator : & validatorFunc {},
280
280
q : & DelegatingQueue {
281
- Interface : workqueue .New ( ),
281
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
282
282
},
283
283
wantInvalidObjects : []client.Object {
284
284
objectNew ,
@@ -294,7 +294,7 @@ func Test_enqueueRefRequestsHandler_Update(t *testing.T) {
294
294
},
295
295
updateEvents : updateEventsEnqueue ,
296
296
q : & DelegatingQueue {
297
- Interface : workqueue .New ( ),
297
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
298
298
},
299
299
},
300
300
{
@@ -303,7 +303,7 @@ func Test_enqueueRefRequestsHandler_Update(t *testing.T) {
303
303
refCache : cache ,
304
304
updateEvents : updateEventsNoEnqueue ,
305
305
q : & DelegatingQueue {
306
- Interface : workqueue .New ( ),
306
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
307
307
},
308
308
},
309
309
}
@@ -353,7 +353,7 @@ func Test_enqueueRefRequestsHandler_Delete(t *testing.T) {
353
353
kind : SecretTransformation ,
354
354
refCache : cache ,
355
355
q : & DelegatingQueue {
356
- Interface : workqueue .New ( ),
356
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
357
357
},
358
358
deleteEvents : []event.DeleteEvent {
359
359
{
@@ -369,7 +369,7 @@ func Test_enqueueRefRequestsHandler_Delete(t *testing.T) {
369
369
kind : SecretTransformation ,
370
370
refCache : cache ,
371
371
q : & DelegatingQueue {
372
- Interface : workqueue .New ( ),
372
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
373
373
},
374
374
deleteEvents : []event.DeleteEvent {
375
375
{
@@ -383,7 +383,7 @@ func Test_enqueueRefRequestsHandler_Delete(t *testing.T) {
383
383
kind : SecretTransformation ,
384
384
refCache : cache ,
385
385
q : & DelegatingQueue {
386
- Interface : workqueue .New ( ),
386
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
387
387
},
388
388
deleteEvents : []event.DeleteEvent {
389
389
{
@@ -469,29 +469,29 @@ func assertEnqueueRefRequestHandler(t *testing.T, ctx context.Context, tt testCa
469
469
}
470
470
}
471
471
472
- var _ workqueue.RateLimitingInterface = & DelegatingQueue {}
472
+ var _ workqueue.TypedRateLimitingInterface [reconcile. Request ] = & DelegatingQueue {}
473
473
474
474
type DelegatingQueue struct {
475
- workqueue.Interface
475
+ workqueue.TypedRateLimitingInterface [reconcile. Request ]
476
476
mu sync.Mutex
477
477
AddedAfter []any
478
478
AddedAfterDuration []time.Duration
479
479
}
480
480
481
481
// AddAfter implements RateLimitingInterface.
482
- func (q * DelegatingQueue ) AddAfter (item interface {} , d time.Duration ) {
482
+ func (q * DelegatingQueue ) AddAfter (item reconcile. Request , d time.Duration ) {
483
483
q .mu .Lock ()
484
484
defer q .mu .Unlock ()
485
485
q .AddedAfter = append (q .AddedAfter , item )
486
486
q .AddedAfterDuration = append (q .AddedAfterDuration , d )
487
487
q .Add (item )
488
488
}
489
489
490
- func (q * DelegatingQueue ) AddRateLimited (item interface {} ) {}
490
+ func (q * DelegatingQueue ) AddRateLimited (item reconcile. Request ) {}
491
491
492
- func (q * DelegatingQueue ) Forget (item interface {} ) {}
492
+ func (q * DelegatingQueue ) Forget (item reconcile. Request ) {}
493
493
494
- func (q * DelegatingQueue ) NumRequeues (item interface {} ) int {
494
+ func (q * DelegatingQueue ) NumRequeues (item reconcile. Request ) int {
495
495
return 0
496
496
}
497
497
@@ -553,7 +553,7 @@ func Test_enqueueOnDeletionRequestHandler_Delete(t *testing.T) {
553
553
deleteEventSupported ,
554
554
},
555
555
q : & DelegatingQueue {
556
- Interface : workqueue .New ( ),
556
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
557
557
},
558
558
gvk : gvk ,
559
559
wantAddedAfter : wantAddedAfterValid ,
@@ -567,7 +567,7 @@ func Test_enqueueOnDeletionRequestHandler_Delete(t *testing.T) {
567
567
deleteEventSupported ,
568
568
},
569
569
q : & DelegatingQueue {
570
- Interface : workqueue .New ( ),
570
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
571
571
},
572
572
gvk : gvk ,
573
573
wantAddedAfter : wantAddedAfterValid ,
@@ -581,7 +581,7 @@ func Test_enqueueOnDeletionRequestHandler_Delete(t *testing.T) {
581
581
deleteEventSupported ,
582
582
},
583
583
q : & DelegatingQueue {
584
- Interface : workqueue .New ( ),
584
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
585
585
},
586
586
gvk : gvk ,
587
587
wantAddedAfter : wantAddedAfterValid ,
@@ -594,7 +594,7 @@ func Test_enqueueOnDeletionRequestHandler_Delete(t *testing.T) {
594
594
deleteEventSupported ,
595
595
},
596
596
q : & DelegatingQueue {
597
- Interface : workqueue .New ( ),
597
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
598
598
},
599
599
gvk : gvk ,
600
600
wantAddedAfter : wantAddedAfterValid ,
@@ -607,7 +607,7 @@ func Test_enqueueOnDeletionRequestHandler_Delete(t *testing.T) {
607
607
deleteEventUnsupported ,
608
608
},
609
609
q : & DelegatingQueue {
610
- Interface : workqueue .New ( ),
610
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
611
611
},
612
612
gvk : gvk ,
613
613
},
@@ -671,7 +671,7 @@ func Test_enqueueOnDeletionRequestHandler_Create(t *testing.T) {
671
671
createEvent ,
672
672
},
673
673
q : & DelegatingQueue {
674
- Interface : workqueue .New ( ),
674
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
675
675
},
676
676
gvk : gvk ,
677
677
wantAddedAfter : nil ,
@@ -683,7 +683,7 @@ func Test_enqueueOnDeletionRequestHandler_Create(t *testing.T) {
683
683
createEventUnsupported ,
684
684
},
685
685
q : & DelegatingQueue {
686
- Interface : workqueue .New ( ),
686
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
687
687
},
688
688
gvk : gvk ,
689
689
wantAddedAfter : nil ,
@@ -767,7 +767,7 @@ func Test_enqueueOnDeletionRequestHandler_Update(t *testing.T) {
767
767
updateEvent ,
768
768
},
769
769
q : & DelegatingQueue {
770
- Interface : workqueue .New ( ),
770
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
771
771
},
772
772
gvk : gvk ,
773
773
wantAddedAfter : nil ,
@@ -779,7 +779,7 @@ func Test_enqueueOnDeletionRequestHandler_Update(t *testing.T) {
779
779
updateEventUnsupported ,
780
780
},
781
781
q : & DelegatingQueue {
782
- Interface : workqueue .New ( ),
782
+ TypedRateLimitingInterface : workqueue.NewTypedRateLimitingQueue [reconcile. Request ]( nil ),
783
783
},
784
784
gvk : gvk ,
785
785
wantAddedAfter : nil ,
0 commit comments