route-util 0.1.0

route utils
Documentation
use crate::http1_backend::{get_fixed_address, get_pool_and_meta, parse_rule, to_backend};
use detcd::ServiceState;
use http_pool::body::{VariantBody, variant_body};
use http_pool::http2::HttpPool;
use http_pool::net_pool::Pools;
use hyper::body::Incoming;
use hyper::{Request, Response};

pub async fn send_to_backend(
    pools: Pools<http_pool::http2::Pool>,
    service: String,
    service_id: Option<u32>,
    mut req: Request<Incoming>,
) -> Result<Response<VariantBody>, anyhow::Error> {
    to_backend! {
        pools,
        req,
        service,
        service_id
    }
}