pub struct Counters<'a> { /* private fields */ }Implementations§
Source§impl<'a> Counters<'a>
impl<'a> Counters<'a>
Sourcepub async fn get_counters(
&self,
nodewise: Option<bool>,
cluster_node_id: Option<&str>,
) -> Result<CountersDto, NifiError>
pub async fn get_counters( &self, nodewise: Option<bool>, cluster_node_id: Option<&str>, ) -> Result<CountersDto, NifiError>
Gets the current counters for this NiFi
Note: This endpoint is subject to change as NiFi and it’s REST API evolve.
Calls GET /nifi-api/counters.
§Parameters
nodewise: Whether or not to include the breakdown per node. Optional, defaults to falsecluster_node_id: The id of the node where to get the status.
§Errors
400: NiFi was unable to complete the request because it was invalid. The request should not be retried without modification.401: Client could not be authenticated.403: Client is not authorized to make this request.409: The request was valid but NiFi was not in the appropriate state to process it.
§Permissions
Requires Read - /counters.
Sourcepub async fn update_all_counters(&self) -> Result<CountersDto, NifiError>
pub async fn update_all_counters(&self) -> Result<CountersDto, NifiError>
Updates all counters. This will reset all counter values to 0
Note: This endpoint is subject to change as NiFi and it’s REST API evolve.
Calls PUT /nifi-api/counters.
§Errors
400: NiFi was unable to complete the request because it was invalid. The request should not be retried without modification.401: Client could not be authenticated.403: Client is not authorized to make this request.409: The request was valid but NiFi was not in the appropriate state to process it.
§Permissions
Requires Write - /counters.
Sourcepub async fn update_counter(&self, id: &str) -> Result<CounterDto, NifiError>
pub async fn update_counter(&self, id: &str) -> Result<CounterDto, NifiError>
Updates the specified counter. This will reset the counter value to 0
Note: This endpoint is subject to change as NiFi and it’s REST API evolve.
Calls PUT /nifi-api/counters/{id}.
§Parameters
id: The id of the counter.
§Errors
400: NiFi was unable to complete the request because it was invalid. The request should not be retried without modification.401: Client could not be authenticated.403: Client is not authorized to make this request.404: The specified resource could not be found.409: The request was valid but NiFi was not in the appropriate state to process it.
§Permissions
Requires Write - /counters.
Auto Trait Implementations§
impl<'a> Freeze for Counters<'a>
impl<'a> !RefUnwindSafe for Counters<'a>
impl<'a> Send for Counters<'a>
impl<'a> Sync for Counters<'a>
impl<'a> Unpin for Counters<'a>
impl<'a> UnsafeUnpin for Counters<'a>
impl<'a> !UnwindSafe for Counters<'a>
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