mode.proxy
¶
Proxy to service.
Works like a service, but delegates to underlying service object.
-
class
mode.proxy.
ServiceProxy
(*, loop: asyncio.events.AbstractEventLoop = None)[source]¶ A service proxy delegates ServiceT methods to a composite service.
Example
>>> class MyServiceProxy(ServiceProxy): ... ... @cached_property ... def _service(self) -> ServiceT: ... return ActualService()
Notes
This is used by Faust, and probably useful elsewhere! The Faust App is created at module-level, and it uses service proxy to ensure the event loop is not also created just by importing a module.
-
property
started
¶
-
property
crashed
¶
-
property
should_stop
¶
-
property
state
¶
-
property
label
¶
-
property
shortlabel
¶
-
abstract
= False¶
-
property
beacon
¶
-
logger
= <Logger mode.proxy (WARNING)>¶
-
property