Class swarmauri_core.middlewares.IMiddleware.IMiddleware
swarmauri_core.middlewares.IMiddleware.IMiddleware
Bases: ABC
Abstract base class for all middleware implementations.
on_scope
abstractmethod
async
on_scope(scope)
Hook executed when a new scope is received.
Source code in swarmauri_core/middlewares/IMiddleware.py
45 46 47 |
|
on_receive
abstractmethod
async
on_receive(scope, message)
Hook executed for each message pulled from the receive callable.
Source code in swarmauri_core/middlewares/IMiddleware.py
49 50 51 |
|
on_send
abstractmethod
async
on_send(scope, message)
Hook executed before messages are forwarded to the downstream send.
Source code in swarmauri_core/middlewares/IMiddleware.py
53 54 55 |
|