| Crates.io | caryatid_module_record |
| lib.rs | caryatid_module_record |
| version | 0.9.0 |
| created_at | 2025-05-15 13:01:43.032605+00 |
| updated_at | 2025-06-18 15:02:57.884115+00 |
| description | Message recording module for Caryatid |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1674944 |
| size | 40,539 |
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.
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/"
The record module can receive any message type and records them as JSON using
their serde::Serialize trait.
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);