pub struct TargetsQueryBuilder { /* private fields */ }Expand description
Provides methods to build a query to the targets endpoint and send it to Prometheus.
Implementations§
Source§impl TargetsQueryBuilder
Note that Prometheus combines all filters that have been set in the final request
and only returns targets that match all filters.
See the official documentation for a thorough explanation on the filters that can
be set: Prometheus API documentation.
impl TargetsQueryBuilder
Note that Prometheus combines all filters that have been set in the final request
and only returns targets that match all filters.
See the official documentation for a thorough explanation on the filters that can
be set: Prometheus API documentation.
Sourcepub fn state(self, state: TargetState) -> Self
pub fn state(self, state: TargetState) -> Self
Set this to filter by active or dropped targets. Calling this repeatedly will replace the current filter.
Sourcepub fn scrape_pool(self, name: impl Display) -> Self
pub fn scrape_pool(self, name: impl Display) -> Self
Set this to filter by scrape pool name. Calling this repeatedly will replace the current filter.
Trait Implementations§
Source§impl Clone for TargetsQueryBuilder
impl Clone for TargetsQueryBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for TargetsQueryBuilder
impl !UnwindSafe for TargetsQueryBuilder
impl Forget for TargetsQueryBuilder
impl Freeze for TargetsQueryBuilderwhere
*const ArcInner<ClientRef> is !null: Freeze,
PhantomData<ArcInner<ClientRef>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
impl Move for TargetsQueryBuilder
impl Send for TargetsQueryBuilder
impl Sync for TargetsQueryBuilder
impl Unpin for TargetsQueryBuilder
impl UnsafeUnpin for TargetsQueryBuilderwhere
*const ArcInner<ClientRef> is !null: UnsafeUnpin,
PhantomData<ArcInner<ClientRef>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
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