#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

#627 in Concurrency

Download history 12/week @ 2024-09-23 3/week @ 2024-09-30

201 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–18MB
~250K SLoC