8 releases (5 breaking)
| 0.10.2 | Dec 15, 2025 |
|---|---|
| 0.10.1 | Dec 1, 2025 |
| 0.10.0 | Nov 19, 2025 |
| 0.9.0 | Jun 18, 2025 |
| 0.2.0 | May 15, 2025 |
#1220 in Encoding
10KB
61 lines
Standard Record module for Caryatid
The Record module provides a way to record any messages on the bus. It simply subscribes to a topic and logs the received messages to JSON files in a given directory.
Configuration
The Record module is configured with a topic to record, and a directory to record to:
[module.record]
topic = "interesting.message.channel"
path = "/path/to/record/to/"
Messages
The record module can receive any message type and records them as JSON using
their serde::Serialize trait.
Registration
The Record module needs to be parameterised with the type of the outer message
enum
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub enum Message {
None(()),
... all my messages ...
}
Then within your main.rs you would register the Record module into the
process like this:
Record::<Message>::register(&mut process);
Dependencies
~10–15MB
~200K SLoC