1use std::time::Duration;
2
3#[tokio::main]
10async fn main() -> Result<(), Box<dyn std::error::Error>> {
11 unsafe { std::env::set_var("RUST_BACKTRACE", "1") };
12 let client = zeebe_rs::Client::builder()
13 .with_address("http://localhost", 26500)
14 .with_oauth(
15 String::from("zeebe"),
16 String::from("zecret"),
17 String::from(
18 "http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token",
19 ),
20 String::from("zeebe-api"),
21 Duration::from_secs(30),
22 None,
23 )
24 .build()
25 .await?;
26
27 let _ = client.auth_initialized().await;
28 let topology = client.topology().send().await;
29 println!("{:?}", topology);
30
31 Ok(())
32}