Skip to main content

metered

Function metered 

Source
pub fn metered<S>(router: Router<S>, auth: Arc<AuthMetering>) -> Router<S>
where S: Clone + Send + Sync + 'static,
Expand description

Wraps router so every route requires a bearer key and is metered.

There is deliberately no unauthenticated variant, not even for a health route: an unauthenticated route is a hole an agent can probe for free.