Arcana::Snapshot
Shutdown snapshots for crash recovery.
Captures the full bus state (directory listings, mailbox messages, frozen messages, tokens) into a single JSON file. Reloaded at startup to restore everything as it was at last clean shutdown.
See bin/arcana.cr for the SIGTERM/SIGINT trap that calls save,
and the startup load that calls load.
Constants
VERSION = 1
Class methods
Restore bus state from the supplied StateBackend. Returns true if state was loaded, false if the backend has no saved state. Raises on malformed JSON.
Path-taking convenience wrapper.
save(bus : Bus, directory : Directory, server : Server, backend : StateBackend) : Nil
Write the full bus state via the supplied StateBackend. The backend is responsible for atomicity and durability semantics.