pub struct Tier(/* private fields */);Expand description
Traffic-class label that selects which counter set a session’s bumps record
in, so a single Registry can split customer-facing, cluster-peer, regional,
etc. traffic. Each tracked broadcast keeps a per-tier counter set on both its
publisher and subscriber sides.
The default tier (Tier::default) is unprefixed: its published tracks are
publisher.json, subscriber.json, and sessions.json. A named tier
prefixes every track with its label, so Tier::new("region/sjc") records on
region/sjc/publisher.json. The label is an arbitrary path chosen by business
logic; an empty label is the default tier.
Implementations§
Source§impl Tier
impl Tier
Sourcepub fn new(label: impl Into<PathOwned>) -> Self
pub fn new(label: impl Into<PathOwned>) -> Self
A tier with the given label. An empty label is the default tier.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
True for the default (unprefixed) tier.
Sourcepub fn track_name(&self, name: &str) -> String
pub fn track_name(&self, name: &str) -> String
Track name for this tier: name on the default tier, else <tier>/<name>.
This is the naming rule the published stats tracks follow.