Skip to content

Commit 45da5dc

Browse files
committed
Rename TypedNewDelayingQueue to NewTypedDelayingQueue
This change renames NewTypedDelayingQueue to NewTypedDelayingQueue to stay consistent with the naming scheme in the package. A NewTypedDelayingQueue constructor is kept for backwards compatibility but marked as deprecated.
1 parent ed37370 commit 45da5dc

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

staging/src/k8s.io/client-go/util/workqueue/delaying_queue.go

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,26 +64,33 @@ type TypedDelayingQueueConfig[T comparable] struct {
6464
// NewDelayingQueue does not emit metrics. For use with a MetricsProvider, please use
6565
// NewDelayingQueueWithConfig instead and specify a name.
6666
//
67-
// Deprecated: use TypedNewDelayingQueue instead.
67+
// Deprecated: use NewTypedDelayingQueue instead.
6868
func NewDelayingQueue() DelayingInterface {
6969
return NewDelayingQueueWithConfig(DelayingQueueConfig{})
7070
}
7171

72-
// TypedNewDelayingQueue constructs a new workqueue with delayed queuing ability.
73-
// TypedNewDelayingQueue does not emit metrics. For use with a MetricsProvider, please use
74-
// TypedNewDelayingQueueWithConfig instead and specify a name.
75-
func TypedNewDelayingQueue[T comparable]() TypedDelayingInterface[T] {
72+
// NewTypedDelayingQueue constructs a new workqueue with delayed queuing ability.
73+
// NewTypedDelayingQueue does not emit metrics. For use with a MetricsProvider, please use
74+
// NewTypedDelayingQueueWithConfig instead and specify a name.
75+
func NewTypedDelayingQueue[T comparable]() TypedDelayingInterface[T] {
7676
return NewTypedDelayingQueueWithConfig(TypedDelayingQueueConfig[T]{})
7777
}
7878

7979
// NewDelayingQueueWithConfig constructs a new workqueue with options to
8080
// customize different properties.
8181
//
82-
// Deprecated: use TypedNewDelayingQueueWithConfig instead.
82+
// Deprecated: use NewTypedDelayingQueueWithConfig instead.
8383
func NewDelayingQueueWithConfig(config DelayingQueueConfig) DelayingInterface {
8484
return NewTypedDelayingQueueWithConfig[any](config)
8585
}
8686

87+
// TypedNewDelayingQueue exists for backwards compatibility only.
88+
//
89+
// Deprecated: use NewTypedDelayingQueueWithConfig instead.
90+
func TypedNewDelayingQueue[T comparable](config TypedDelayingQueueConfig[T]) TypedDelayingInterface[T] {
91+
return NewTypedDelayingQueueWithConfig(config)
92+
}
93+
8794
// NewTypedDelayingQueueWithConfig constructs a new workqueue with options to
8895
// customize different properties.
8996
func NewTypedDelayingQueueWithConfig[T comparable](config TypedDelayingQueueConfig[T]) TypedDelayingInterface[T] {

0 commit comments

Comments
 (0)