pub struct QueueMetrics { /* private fields */ }Expand description
Queue-edge handles (spate_queue_*).
Implementations§
Source§impl QueueMetrics
impl QueueMetrics
Sourcepub fn new(labels: &ComponentLabels, queue: &str, capacity: usize) -> Self
pub fn new(labels: &ComponentLabels, queue: &str, capacity: usize) -> Self
Resolve handles for one queue edge (e.g. chain->sink/shard-3) and
publish its configured capacity.
Claims this edge’s series (the labels plus the queue name); a second
live handle set for the same edge logs and becomes a shadow, counting
but publishing neither depth nor capacity (see “Series ownership” in
docs/METRICS.md).
Sourcepub fn try_new(
labels: &ComponentLabels,
queue: &str,
capacity: usize,
) -> Result<Self, MetricsError>
pub fn try_new( labels: &ComponentLabels, queue: &str, capacity: usize, ) -> Result<Self, MetricsError>
Resolve handles for one queue edge, failing when another live handle set already owns it. The pipeline builder’s path.
§Errors
MetricsError::DuplicateSeries on a collision.
Sourcepub fn full_events(&self, n: u64)
pub fn full_events(&self, n: u64)
Count try_send rejections.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for QueueMetrics
impl !UnwindSafe for QueueMetrics
impl Freeze for QueueMetrics
impl Send for QueueMetrics
impl Sync for QueueMetrics
impl Unpin for QueueMetrics
impl UnsafeUnpin for QueueMetrics
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