[−][src]Trait envoy_sdk::host::stats::Counter
An interface of the Envoy
Counter
.
A Counter
can only be incremented.
Examples
Basic usage of Counter
:
use envoy::host::Stats; let stats = Stats::default(); let requests_total = stats.counter("requests_total")?; requests_total.inc()?;
Required methods
fn add(&self, offset: u64) -> Result<()>
Increments counter by a given offset.
fn value(&self) -> Result<u64>
Returns current value of the counter.