@@ -29,7 +29,7 @@ type Endpoint struct {
2929type EndpointState struct {
3030 // storage is per Scheduling Cycle, and so has no thread-safe concerns.
3131 // TODO should think if the above is true or should we use sync map for thread safety.
32- storage map [string ]any
32+ storage map [string ]any
3333}
3434
3535// ScoredEndpoint encapsulates Endpoint with its Score.
@@ -92,30 +92,8 @@ type MultiProfilePlugin interface {
9292 // - profiles - A subset of the registered scheduling profiles to be ran in next iteration
9393 PickProfiles (request map [string ]any , profiles map [string ]* SchedulerProfile , executionResults map [string ][]* ScoredEndpoint ) map [string ]* SchedulerProfile
9494
95- << << << < HEAD
96- type EndpointState struct {
97- // storage is per Scheduling Cycle, and so has no thread-safe concerns.
98- storage map [string ]any //nolint:unused
99- }
100-
101- type SchedulingResult struct {
102- results map [string ][]Endpoint //nolint:unused
103- }
104-
105- // Scheduler is the implementation of a... scheduler.
106- // The scheduler object is created at startup using the provided configuration.
107- type Scheduler interface {
108- // PreSchedule selects scheduling profiles through the implemented
109- // logic, and returns:
110- // - profiles - A subset of the registered scheduling profiles to be ran
111- PreSchedule (request map [string ]any , data scheduling.CycleState , results map [string ][]Endpoint ) map [string ]SchedulingProfile
112-
113- // PostSchedule receives the output of the result(s) of the scheduling cycle(s)
114- // and makes sense of the data to be consumed by the calling system.
115- == == == =
11695 // ProcessProfileResults handles the outcome of each selected profile.
11796 // It may aggregate results, log test profile outputs, or apply custom logic.
118- >> >> >> > 6280 d8f (scheduler proposal continuation )
11997 // For example: suppose you have 2 profiles ShadowBoxing Profile & Production Profile.
12098 // ProcessProfileResults would know to simply log the result of ShadowBoxing
12199 // profile, and do nothing else with it.
0 commit comments