@@ -555,16 +555,20 @@ schedulingProfiles:
555
555
var _ framework.Filter = & test1 {}
556
556
557
557
type test1 struct {
558
- plugins.TypedName
558
+ tn plugins.TypedName
559
559
Threshold int `json:"threshold"`
560
560
}
561
561
562
562
func newTest1 () * test1 {
563
563
return & test1 {
564
- TypedName : plugins.TypedName {Type : test1Type , Name : "test-1" },
564
+ tn : plugins.TypedName {Type : test1Type , Name : "test-1" },
565
565
}
566
566
}
567
567
568
+ func (f * test1 ) TypedName () plugins.TypedName {
569
+ return f .tn
570
+ }
571
+
568
572
// Filter filters out pods that doesn't meet the filter criteria.
569
573
func (f * test1 ) Filter (_ context.Context , _ * types.CycleState , _ * types.LLMRequest , pods []types.Pod ) []types.Pod {
570
574
return pods
@@ -575,15 +579,19 @@ var _ framework.Scorer = &test2{}
575
579
var _ framework.PostCycle = & test2 {}
576
580
577
581
type test2 struct {
578
- plugins.TypedName
582
+ tn plugins.TypedName
579
583
}
580
584
581
585
func newTest2 () * test2 {
582
586
return & test2 {
583
- TypedName : plugins.TypedName {Type : test2Type , Name : "test-2" },
587
+ tn : plugins.TypedName {Type : test2Type , Name : "test-2" },
584
588
}
585
589
}
586
590
591
+ func (m * test2 ) TypedName () plugins.TypedName {
592
+ return m .tn
593
+ }
594
+
587
595
func (m * test2 ) Score (_ context.Context , _ * types.CycleState , _ * types.LLMRequest , _ []types.Pod ) map [types.Pod ]float64 {
588
596
return map [types.Pod ]float64 {}
589
597
}
@@ -594,15 +602,19 @@ func (m *test2) PostCycle(_ context.Context, _ *types.CycleState, _ *types.Profi
594
602
var _ framework.Picker = & testPicker {}
595
603
596
604
type testPicker struct {
597
- plugins.TypedName
605
+ tn plugins.TypedName
598
606
}
599
607
600
608
func newTestPicker () * testPicker {
601
609
return & testPicker {
602
- TypedName : plugins.TypedName {Type : testPickerType , Name : "test-picker" },
610
+ tn : plugins.TypedName {Type : testPickerType , Name : "test-picker" },
603
611
}
604
612
}
605
613
614
+ func (p * testPicker ) TypedName () plugins.TypedName {
615
+ return p .tn
616
+ }
617
+
606
618
func (p * testPicker ) Pick (_ context.Context , _ * types.CycleState , _ []* types.ScoredPod ) * types.ProfileRunResult {
607
619
return nil
608
620
}
@@ -611,15 +623,19 @@ func (p *testPicker) Pick(_ context.Context, _ *types.CycleState, _ []*types.Sco
611
623
var _ framework.ProfileHandler = & testProfileHandler {}
612
624
613
625
type testProfileHandler struct {
614
- plugins.TypedName
626
+ tn plugins.TypedName
615
627
}
616
628
617
629
func newTestProfileHandler () * testProfileHandler {
618
630
return & testProfileHandler {
619
- TypedName : plugins.TypedName {Type : testProfileHandlerType , Name : "test-profile-handler" },
631
+ tn : plugins.TypedName {Type : testProfileHandlerType , Name : "test-profile-handler" },
620
632
}
621
633
}
622
634
635
+ func (p * testProfileHandler ) TypedName () plugins.TypedName {
636
+ return p .tn
637
+ }
638
+
623
639
func (p * testProfileHandler ) Pick (_ context.Context , _ * types.CycleState , _ * types.LLMRequest , _ map [string ]* framework.SchedulerProfile , _ map [string ]* types.ProfileRunResult ) map [string ]* framework.SchedulerProfile {
624
640
return nil
625
641
}
0 commit comments