#events #broker #auditing #client #tokio #future #stream

crypto-auditing

Client library for crypto-auditing project

4 releases

0.2.2 Apr 11, 2024
0.2.1 Dec 12, 2023
0.2.0 Nov 22, 2023
0.1.0 Sep 15, 2023

#1566 in Asynchronous

Download history 4/week @ 2024-02-20 13/week @ 2024-02-27 2/week @ 2024-03-12 5/week @ 2024-03-26 46/week @ 2024-04-02 161/week @ 2024-04-09

212 downloads per month
Used in 4 crates

GPL-3.0-or-later

29KB
287 lines

crypto-auditing

crates.io badge

This crate provides a library interface to interact with the crypto-auditing event broker. To see the whole architecture, see the design document.

To use in your project, add into your Cargo.toml:

[dependencies]
crypto-auditing = "0.2"

Example

The following example connects to the event broker and receives events prefixed with "tls::".

use crypto_auditing::event_broker::Client;
use futures::stream::StreamExt;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let client = Client::new().scopes(&vec!["tls".to_string()]);

    let (_handle, mut reader) = client.start().await?;

    tokio::spawn(async move {
        while let Some(event) = reader.next().await {
            println!("{:?}", &event);
        }
    });

    tokio::signal::ctrl_c().await?;

    Ok(())
}

See full documentation here.

Dependencies

~6–20MB
~232K SLoC