caryatid_module_playback

Crates.iocaryatid_module_playback
lib.rscaryatid_module_playback
version0.9.0
created_at2025-05-15 13:01:18.156524+00
updated_at2025-06-18 15:02:33.112276+00
descriptionMessage playback module for Caryatid
homepage
repository
max_upload_size
id1674941
size40,345
Paul Clark (sandtreader)

documentation

README

Standard Playback module for Caryatid

The Playback module provides a way to playback any messages on the bus. It reads messages from a directory of JSON files and publishes them to a given topic.

Configuration

The Playback module is configured with a topic to publish to, and a directory from which to read message files:

[module.playback]
topic = "interesting.message.channel"
path = "/path/to/playback/from/"

Messages

The playback module can read any message type using their serde::Deserialize trait.

Registration

The Playback 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 Playback module into the process like this:

    Playback::<Message>::register(&mut process);
Commit count: 0

cargo fmt