Struct htsget_lambda::Router
source · pub struct Router<'a, H> { /* private fields */ }
Expand description
A Router is a struct which handles routing any htsget requests to the htsget search, using the config.
Implementations§
source§impl<'a, H: HtsGet + Send + Sync + 'static> Router<'a, H>
impl<'a, H: HtsGet + Send + Sync + 'static> Router<'a, H>
pub fn new(searcher: Arc<H>, config_service_info: &'a ServiceInfo) -> Self
sourcepub async fn route_request(&self, request: Request) -> Result<Response<Body>>
pub async fn route_request(&self, request: Request) -> Result<Response<Body>>
Routes the request to the relevant htsget search endpoint using the lambda request, returning a http response.