#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

#444 in Concurrency

Download history 14/week @ 2024-03-12 24/week @ 2024-04-02 17/week @ 2024-04-09

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–20MB
~253K SLoC