#module #caryatid #spy

caryatid_module_spy

Spy module for Caryatid

2 releases

new 0.1.1 Mar 27, 2025
0.1.0 Mar 24, 2025

#1 in #spy

Download history 78/week @ 2025-03-19

78 downloads per month

Apache-2.0

11KB

Standard Spy module for Caryatid

The Spy module provides a way to observe any messages on the bus. It simply subscribes to a topic and logs the received messages.

Configuration

The Spy module is configured with a topic to spy on:

[module.spy]
topic = mi5.top.secret

Messages

The spy module can receive any message types and logs them (as info) using their Debug trait.

Registration

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

    Spy::<Message>::register(&mut process);

lib.rs:

Caryatid Spy module

Dependencies

~8–16MB
~205K SLoC