robonix_api.result¶
Return types for lifecycle handlers.
Every on_init, on_activate, on_deactivate, and on_shutdown
handler returns one of the following values:
Ok: the handler succeeded and the framework advances state.Err: the handler failed and the provider entersERROR.Deferred: the handler cannot proceed and the provider remains in its current state. Version 0.1 reports the reason but has no deferred queue.
Only on_init receives the decoded cfg dictionary. Raising an exception
is converted defensively to Err, but returning Err explicitly
produces clearer diagnostics.
Classes
|
Handler can't proceed yet — typically waiting for an upstream provider to come online, a sensor to publish first message, etc. |
|
Handler failed. |
|
Handler succeeded. |
- class robonix_api.result.Deferred(reason: str)[source]¶
Bases:
objectHandler can’t proceed yet — typically waiting for an upstream provider to come online, a sensor to publish first message, etc. The provider stays in its current state; framework expects the operator or eviction policy to retry later. reason is shown in rbnx caps.
- reason: str¶