Skip to content

Commit e9c803d

Browse files
committed
remove evictionworker interface
Signed-off-by: whosefriendA <[email protected]>
1 parent 0e0806d commit e9c803d

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

pkg/controllers/cluster/eviction_worker.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ import (
2929
"github.com/karmada-io/karmada/pkg/util/fedinformer/genericmanager"
3030
)
3131

32-
// EvictionWorker enhances AsyncWorker with dynamic rate limiting and metrics
33-
// for eviction operations. It provides a queue that adjusts its processing rate
34-
// based on cluster health status.
35-
type EvictionWorker interface {
36-
util.AsyncWorker
37-
}
38-
3932
// EvictionQueueOptions holds the options that control the behavior of the graceful eviction queue based on the overall health of the clusters.
4033
type EvictionQueueOptions struct {
4134
// ResourceEvictionRate is the number of resources to be evicted per second.
@@ -88,7 +81,7 @@ type EvictionWorkerOptions struct {
8881
}
8982

9083
// NewEvictionWorker creates a new EvictionWorker with dynamic rate limiting.
91-
func NewEvictionWorker(opts EvictionWorkerOptions) EvictionWorker {
84+
func NewEvictionWorker(opts EvictionWorkerOptions) util.AsyncWorker {
9285
rateLimiter := NewGracefulEvictionRateLimiter[interface{}](
9386
opts.InformerManager,
9487
opts.EvictionQueueOptions,

pkg/controllers/cluster/taint_manager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ type NoExecuteTaintManager struct {
6767
EvictionQueueOptions EvictionQueueOptions
6868

6969
//bindingEvictionWorker handles ResourceBinding resources
70-
bindingEvictionWorker EvictionWorker
70+
bindingEvictionWorker util.AsyncWorker
7171
//clusterBindingEvictionWorker handles the ClusterResourceBinding resource
72-
clusterBindingEvictionWorker EvictionWorker
72+
clusterBindingEvictionWorker util.AsyncWorker
7373
}
7474

7575
// Reconcile performs a full reconciliation for the object referred to by the Request.

0 commit comments

Comments
 (0)