File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
pkg/epp/scheduling/framework/plugins/scorer Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -272,8 +272,8 @@ func (r *Runner) initializeScheduler(datastore datastore.Datastore) (*scheduling
272
272
kvCacheScorerWeight := envutil .GetEnvInt ("KV_CACHE_SCORE_WEIGHT" , scorer .DefaultKVCacheScorerWeight , setupLog )
273
273
274
274
schedulerProfile := framework .NewSchedulerProfile ().
275
- WithScorers (framework .NewWeightedScorer (& scorer.QueueScorer {} , queueScorerWeight ),
276
- framework .NewWeightedScorer (& scorer.KVCacheScorer {} , kvCacheScorerWeight )).
275
+ WithScorers (framework .NewWeightedScorer (scorer .NewQueueScorer () , queueScorerWeight ),
276
+ framework .NewWeightedScorer (scorer .NewKVCacheScorer () , kvCacheScorerWeight )).
277
277
WithPicker (picker .NewMaxScorePicker ())
278
278
279
279
if prefixCacheScheduling {
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ const (
33
33
// compile-time type assertion
34
34
var _ framework.Scorer = & KVCacheScorer {}
35
35
36
+ // NewKVCacheScorer initializes a new KVCacheScorer and returns its pointer.
37
+ func NewKVCacheScorer () * KVCacheScorer {
38
+ return & KVCacheScorer {}
39
+ }
40
+
36
41
// KvCacheScorerFactory is the factory for the KV-Cache scorer
37
42
func KvCacheScorerFactory (_ json.RawMessage ) (plugins.Plugin , error ) {
38
43
return & KVCacheScorer {}, nil
Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ const (
34
34
// compile-time type assertion
35
35
var _ framework.Scorer = & QueueScorer {}
36
36
37
+ // NewQueueScorer initializes a new QueueScorer and returns its pointer.
38
+ func NewQueueScorer () * QueueScorer {
39
+ return & QueueScorer {}
40
+ }
41
+
37
42
// QueueScorerFactory is the factory for the Queue based scorer
38
43
func QueueScorerFactory (_ json.RawMessage ) (plugins.Plugin , error ) {
39
44
return & QueueScorer {}, nil
You can’t perform that action at this time.
0 commit comments