The internal concepts of the frameworkext package of koord-scheduler are somewhat confusing and need some clarification.
ExtenderFactory is responsible for creating Extender.
Extender implements ExtendedHandle, which means the extension of framework.Handle, and implements some functions of framework.Framework, responsible for intercepting some function calls. The Extender corresponds to each profile, and some transformers inside each Extender are initialized through the type assert mechanism when the plugin is built.
design document describes the new extension points named Transformer but now named Hook in the current implementation.
And the Hook should be registered in the main function, but we can use type assert with plugin instance to determine whether the plugin implements the Hook
And we should add PreBindReservation extension point to clearly indicate whether a plugin needs to update the Reservation in the PreBind phase
Why is this needed:
Is there a suggested solution, if so, please add it:
[x] refactor the scheduler framework extender. Already in review.. #1066
What is your proposal:
The internal concepts of the frameworkext package of koord-scheduler are somewhat confusing and need some clarification.
Transformer
but now namedHook
in the current implementation.Hook
should be registered in the main function, but we can use type assert with plugin instance to determine whether the plugin implements theHook
PreBindReservation
extension point to clearly indicate whether a plugin needs to update the Reservation in the PreBind phaseWhy is this needed:
Is there a suggested solution, if so, please add it:
PreBindReservation