pub struct TopologyRequest(/* private fields */);Expand description
Request to obtain the current cluster topology.
This request is used to retrieve detailed information about the Zeebe cluster’s topology, including broker nodes, partition distribution, cluster size, replication factor, and gateway version.
§Example
ⓘ
let topology = client.topology().send().await;§Errors
Returns a ClientError if the request fails.
Implementations§
Source§impl TopologyRequest
impl TopologyRequest
Sourcepub async fn send(self) -> Result<TopologyResponse, ClientError>
pub async fn send(self) -> Result<TopologyResponse, ClientError>
Sends a request to get the current cluster topology
§Returns
A Result containing either:
TopologyResponsewith information about:- Broker nodes in the cluster
- Partition distribution
- Cluster size and replication factor
- Gateway version
ClientErrorif the request fails
Examples found in repository?
More examples
examples/oauth.rs (line 28)
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}Trait Implementations§
Source§impl Clone for TopologyRequest
impl Clone for TopologyRequest
Source§fn clone(&self) -> TopologyRequest
fn clone(&self) -> TopologyRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for TopologyRequest
impl !RefUnwindSafe for TopologyRequest
impl Send for TopologyRequest
impl Sync for TopologyRequest
impl Unpin for TopologyRequest
impl !UnwindSafe for TopologyRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request