mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-26 18:02:19 +00:00
📝 align async runtime serialization docs
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
name: async-runtime-state-to-json
|
||||
group: api
|
||||
category: async
|
||||
update-time: 20260512
|
||||
description: Convert AsyncRuntimeState into a JSON value for runtime capability and mode diagnostics.
|
||||
update-time: 20260614
|
||||
description: Convert AsyncRuntimeState into a JSON value for runtime capability and mode diagnostics using the canonical mode labels and snapshot field names.
|
||||
key-word:
|
||||
- async
|
||||
- state
|
||||
@@ -35,6 +35,7 @@ Detailed rules explaining key parameters and behaviors
|
||||
|
||||
- The output includes `mode` and `background_worker`.
|
||||
- `mode` is serialized through `async_runtime_mode_label(...)`.
|
||||
- The compact serialized shape is `{"mode":"native_worker|compatibility","background_worker":true|false}`.
|
||||
- This helper focuses on runtime capabilities rather than queue counters or logger lifecycle flags.
|
||||
- The exported JSON is suitable for diagnostics endpoints and startup environment checks.
|
||||
|
||||
@@ -67,3 +68,9 @@ e.g.:
|
||||
|
||||
- If the runtime is in compatibility mode, the helper still serializes normally using the matching mode label.
|
||||
|
||||
### Notes
|
||||
|
||||
1. The output field names are fixed as `mode` and `background_worker`.
|
||||
|
||||
2. The `mode` field always uses the canonical labels from `async_runtime_mode_label(...)`, not enum names like `NativeWorker` or `Compatibility`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user