Type classes for


Diag keeps track of a services diagnostic flags.

flags: Set[str] = None
last_transition: MutableMapping[str, float] = None
abstract set_flag(flag: str) → None
abstract unset_flag(flag: str) → None
class*, beacon: mode.utils.types.trees.NodeT = None, loop: = None)

Abstract type for an asynchronous service that can be started/stopped.

See also


Diag: Type[DiagT] = None
diag: DiagT = None
async_exit_stack: AsyncExitStack = None
exit_stack: ExitStack = None
shutdown_timeout: float = None
wait_for_shutdown = False
restart_count: int = 0
supervisor: Optional[mode.types.supervisors.SupervisorStrategyT] = None
abstract add_dependency(service: →
abstract async add_runtime_dependency(service: →
abstract async add_async_context(context: AsyncContextManager) → Any
abstract add_context(context: ContextManager) → Any
abstract async start() → None
abstract async maybe_start() → bool
abstract async crash(reason: BaseException) → None
abstract async stop() → None
abstract service_reset() → None
abstract async restart() → None
abstract async wait_until_stopped() → None
abstract set_shutdown() → None
abstract property started
abstract property crashed
abstract property should_stop
abstract property state
abstract property label
abstract property shortlabel
property beacon
abstract property loop
abstract property crash_reason