Adds ability to run middlewares for Pipeline and Operator callables
Problem
No existing way to just get the timings of each callable, add a generic manager for now, TimerManager in a separate pr
Solution
Create middleware manager and add a chain of callables to call middlewares before calling the callables
Design
Very similar to Starlette (Fastapi) middleware. Before calling the callables for Pipeline or Operator, add a "gadget" where the gadget logic is called before and after the callable.
One note is that Pipeline and Operator do not rely on the middleware. It doesnt know it exists. It is just a helper.
Description
Adds ability to run middlewares for Pipeline and Operator callables
Problem
No existing way to just get the timings of each callable, add a generic manager for now, TimerManager in a separate pr
Solution
Create middleware manager and add a chain of callables to call middlewares before calling the callables
Design
Very similar to Starlette (Fastapi) middleware. Before calling the callables for Pipeline or Operator, add a "gadget" where the gadget logic is called before and after the callable.
One note is that Pipeline and Operator do not rely on the middleware. It doesnt know it exists. It is just a helper.
Usage
Check tests,
Testing
Checks the functionality of middleware and middleware managers work as expected