Skip to main content

Router

Trait Router 

Source
pub trait Router: Send + Sync {
    // Required method
    fn route(&self, ns: &NamespaceId) -> Result<Route, RoutingError>;
}
Expand description

Decides whether a namespace should be served locally or remotely.

The default LocalRouter always returns Route::Local. Custom implementations can check a shared registry, raft state, or any other logic to decide routing.

Required Methods§

Implementors§