#round-robin #async #manager #service #grpc #remote #tonic

tourniquet-tonic

Async native round-robin manager for remote services. Tonic integration.

7 releases (4 breaking)

0.5.0 Feb 16, 2024
0.4.0 Jul 26, 2023
0.3.0 Aug 16, 2022
0.2.0 Jul 8, 2022
0.1.2 Jan 7, 2022

#446 in Concurrency

Download history 57/week @ 2023-12-17 13/week @ 2023-12-24 37/week @ 2023-12-31 48/week @ 2024-01-14 24/week @ 2024-01-21 24/week @ 2024-01-28 21/week @ 2024-02-04 99/week @ 2024-02-11 43/week @ 2024-02-18 134/week @ 2024-02-25 1/week @ 2024-03-03 14/week @ 2024-03-10 1/week @ 2024-03-17 94/week @ 2024-03-31

109 downloads per month

MIT license

37KB
607 lines

tourniquet-tonic

Tourniquet integration with the celery library.

Example

#
#
let rr = RoundRobin::new(
    vec!["https://api01", "https://api02"],
    TonicConnector::default(),
);

rr.run(|channel| async move {
    grpc::greeting_client::GreetingClient::new(channel.as_ref().clone())
        .hello(grpc::Message::default())
        .await?;
    Ok(())
}).await?;

License: MIT


lib.rs:

Tourniquet integration with the celery library.

Example

#
#
let rr = RoundRobin::new(
    vec!["https://api01", "https://api02"],
    TonicConnector::default(),
);

rr.run(|channel| async move {
    grpc::greeting_client::GreetingClient::new(channel.as_ref().clone())
        .hello(grpc::Message::default())
        .await?;
    Ok(())
}).await?;

Dependencies

~9–21MB
~263K SLoC