@@ -31,10 +31,10 @@ import (
3131)
3232
3333const  (
34- 	testProfileHandlerName  =  "test-profile-handler" 
35- 	test1Name               =  "test-one" 
36- 	test2Name               =  "test-two" 
37- 	testPickerName          =  "test-picker" 
34+ 	testProfileHandlerType  =  "test-profile-handler" 
35+ 	test1Type               =  "test-one" 
36+ 	test2Type               =  "test-two" 
37+ 	testPickerType          =  "test-picker" 
3838)
3939
4040func  TestLoadConfiguration (t  * testing.T ) {
@@ -50,21 +50,21 @@ func TestLoadConfiguration(t *testing.T) {
5050		Plugins : []configapi.PluginSpec {
5151			{
5252				Name :       "test1" ,
53- 				PluginName : test1Name ,
53+ 				PluginName : test1Type ,
5454				Parameters : json .RawMessage ("{\" threshold\" :10}" ),
5555			},
5656			{
5757				Name :       "profileHandler" ,
5858				PluginName : "test-profile-handler" ,
5959			},
6060			{
61- 				Name :       test2Name ,
62- 				PluginName : test2Name ,
61+ 				Name :       test2Type ,
62+ 				PluginName : test2Type ,
6363				Parameters : json .RawMessage ("{\" hashBlockSize\" :32}" ),
6464			},
6565			{
6666				Name :       "testPicker" ,
67- 				PluginName : testPickerName ,
67+ 				PluginName : testPickerType ,
6868			},
6969		},
7070		SchedulingProfiles : []configapi.SchedulingProfile {
@@ -463,8 +463,8 @@ type test1 struct {
463463	Threshold  int  `json:"threshold"` 
464464}
465465
466- func  (f  * test1 ) Name () string  {
467- 	return  test1Name 
466+ func  (f  * test1 ) Type () string  {
467+ 	return  test1Type 
468468}
469469
470470// Filter filters out pods that doesn't meet the filter criteria. 
@@ -478,8 +478,8 @@ var _ framework.PostCycle = &test2{}
478478
479479type  test2  struct {}
480480
481- func  (f  * test2 ) Name () string  {
482- 	return  test2Name 
481+ func  (f  * test2 ) Type () string  {
482+ 	return  test2Type 
483483}
484484
485485func  (m  * test2 ) Score (ctx  context.Context , request  * types.LLMRequest , cycleState  * types.CycleState , pods  []types.Pod ) map [types.Pod ]float64  {
@@ -494,8 +494,8 @@ var _ framework.Picker = &testPicker{}
494494
495495type  testPicker  struct {}
496496
497- func  (p  * testPicker ) Name () string  {
498- 	return  testPickerName 
497+ func  (p  * testPicker ) Type () string  {
498+ 	return  testPickerType 
499499}
500500
501501func  (p  * testPicker ) Pick (ctx  context.Context , cycleState  * types.CycleState , scoredPods  []* types.ScoredPod ) * types.ProfileRunResult  {
@@ -507,8 +507,8 @@ var _ framework.ProfileHandler = &testProfileHandler{}
507507
508508type  testProfileHandler  struct {}
509509
510- func  (p  * testProfileHandler ) Name () string  {
511- 	return  testProfileHandlerName 
510+ func  (p  * testProfileHandler ) Type () string  {
511+ 	return  testProfileHandlerType 
512512}
513513
514514func  (p  * testProfileHandler ) Pick (ctx  context.Context , request  * types.LLMRequest , profiles  map [string ]* framework.SchedulerProfile , executionResults  map [string ]* types.ProfileRunResult ) map [string ]* framework.SchedulerProfile  {
@@ -520,27 +520,27 @@ func (p *testProfileHandler) ProcessResults(ctx context.Context, request *types.
520520}
521521
522522func  registerTestPlugins () {
523- 	plugins .Register (test1Name ,
523+ 	plugins .Register (test1Type ,
524524		func (name  string , parameters  json.RawMessage , handle  plugins.Handle ) (plugins.Plugin , error ) {
525525			result  :=  test1 {}
526526			err  :=  json .Unmarshal (parameters , & result )
527527			return  & result , err 
528528		},
529529	)
530530
531- 	plugins .Register (test2Name ,
531+ 	plugins .Register (test2Type ,
532532		func (name  string , parameters  json.RawMessage , handle  plugins.Handle ) (plugins.Plugin , error ) {
533533			return  & test2 {}, nil 
534534		},
535535	)
536536
537- 	plugins .Register (testPickerName ,
537+ 	plugins .Register (testPickerType ,
538538		func (name  string , parameters  json.RawMessage , handle  plugins.Handle ) (plugins.Plugin , error ) {
539539			return  & testPicker {}, nil 
540540		},
541541	)
542542
543- 	plugins .Register (testProfileHandlerName ,
543+ 	plugins .Register (testProfileHandlerType ,
544544		func (name  string , parameters  json.RawMessage , handle  plugins.Handle ) (plugins.Plugin , error ) {
545545			return  & testProfileHandler {}, nil 
546546		},
0 commit comments