Skip to content

Commit 6ef70ce

Browse files
committed
Switch to workqueue.TypedDelayingInterface
DelayingInterface has been deprecated since k8s v1.31 Signed-off-by: Brad Davidson <[email protected]>
1 parent 9d199a7 commit 6ef70ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/logstructured/logstructured.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func (l *LogStructured) Update(ctx context.Context, key string, value []byte, re
281281
}
282282

283283
func (l *LogStructured) ttl(ctx context.Context) {
284-
queue := workqueue.NewDelayingQueue()
284+
queue := workqueue.NewTypedDelayingQueue[string]()
285285
rwMutex := &sync.RWMutex{}
286286
ttlEventKVMap := make(map[string]*ttlEventKV)
287287
eventCh := l.ttlEvents(ctx)
@@ -321,15 +321,15 @@ func (l *LogStructured) ttl(ctx context.Context) {
321321
}
322322
}
323323

324-
func (l *LogStructured) handleTTLEvents(ctx context.Context, rwMutex *sync.RWMutex, queue workqueue.DelayingInterface, store map[string]*ttlEventKV) bool {
324+
func (l *LogStructured) handleTTLEvents(ctx context.Context, rwMutex *sync.RWMutex, queue workqueue.TypedDelayingInterface[string], store map[string]*ttlEventKV) bool {
325325
key, shutdown := queue.Get()
326326
if shutdown {
327327
logrus.Info("TTL events work queue has shut down")
328328
return false
329329
}
330330
defer queue.Done(key)
331331

332-
eventKV := loadTTLEventKV(rwMutex, store, key.(string))
332+
eventKV := loadTTLEventKV(rwMutex, store, key)
333333
if eventKV == nil {
334334
logrus.Errorf("TTL event not found for key=%v", key)
335335
return true

0 commit comments

Comments
 (0)