Struct relay_metrics::RouterService
source · pub struct RouterService { /* private fields */ }
Expand description
Service that routes metrics & metric buckets to the appropriate aggregator.
Each aggregator gets its own configuration.
Metrics are routed to the first aggregator which matches the configuration’s Condition
.
If no condition matches, the metric/bucket is routed to the default_aggregator
.
Implementations§
source§impl RouterService
impl RouterService
sourcepub fn new(
aggregator_config: AggregatorServiceConfig,
secondary_aggregators: Vec<ScopedAggregatorConfig>,
receiver: Option<Recipient<FlushBuckets, NoResponse>>
) -> Self
pub fn new( aggregator_config: AggregatorServiceConfig, secondary_aggregators: Vec<ScopedAggregatorConfig>, receiver: Option<Recipient<FlushBuckets, NoResponse>> ) -> Self
Create a new router service.
Trait Implementations§
source§impl Service for RouterService
impl Service for RouterService
§type Interface = Aggregator
type Interface = Aggregator
The interface of messages this service implements. Read more
source§fn spawn_handler(self, rx: Receiver<Self::Interface>)
fn spawn_handler(self, rx: Receiver<Self::Interface>)
Spawns a task to handle service messages. Read more
§fn start(self) -> Addr<Self::Interface>
fn start(self) -> Addr<Self::Interface>
Starts the service in the current runtime and returns an address for it.
Auto Trait Implementations§
impl !RefUnwindSafe for RouterService
impl Send for RouterService
impl Sync for RouterService
impl Unpin for RouterService
impl !UnwindSafe for RouterService
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