This pull request represents significant refactoring of some of Moonraker's internals. The goal is to prepare Moonraker for future additions such as:
Support for managing multiple connections to Klippy from one instance of moonraker
Support for 3rd party extensions
An overview of the items changed:
1) Use Python enums and flags in place of strings where appropriate. This includes HTTP request methods (ie: GET, POST), tranport types (HTTP, WEBSOCKET, etc), Klippy State, and Job State.
2) Emit a single internal event for job state changes. The legacy events remain in place for now.
3) Optimize endpoint registration to use shared API Definitions for all transports. Previously
4) Use a single instance of the JsonRPC class across all transports.
I have been testing this branch for a few weeks and believe that I have squashed any outstanding issues/regressions. That said, I only test against official Moonraker components. Developers and users who use optional components such as timelapse may wish to test this branch.
As of right now I intent to merge around the end of the week, presuming no regressions are discovered.
This pull request represents significant refactoring of some of Moonraker's internals. The goal is to prepare Moonraker for future additions such as:
An overview of the items changed:
1) Use Python enums and flags in place of strings where appropriate. This includes HTTP request methods (ie: GET, POST), tranport types (HTTP, WEBSOCKET, etc), Klippy State, and Job State.
2) Emit a single internal event for job state changes. The legacy events remain in place for now.
3) Optimize endpoint registration to use shared API Definitions for all transports. Previously
4) Use a single instance of the JsonRPC class across all transports.
I have been testing this branch for a few weeks and believe that I have squashed any outstanding issues/regressions. That said, I only test against official Moonraker components. Developers and users who use optional components such as timelapse may wish to test this branch.
As of right now I intent to merge around the end of the week, presuming no regressions are discovered.