You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use volo_http::{Router, Server as HttpServer}
let http_app = Router::new().route("xxx", get(xx)).route("xxx", get(xx)).layer(TestLayer::new()).layer(DemoLayer::new());
let addr: SocketAddr = "0.0.0.0:8080".parse().unwrap();
let addr = volo::net::Address::from(addr);
HttpServer::new(app).run(addr).await.unwrap();
grpc 服务启动(问题,中间件不通用)
use volo_grpc::server::Server as GrpcServer;
let addr: SocketAddr = "[::]:8080".parse().unwrap();
let addr = volo::net::Address::from(addr);
GrpcServer::new().add_service(s).layer(TestLayer::new()).layer(DemoLayer::new()).run(addr).await.unwrap();
The text was updated successfully, but these errors were encountered:
先说问题:
问题1:http服务能使用开发的测试中间件TestLayer和DemoLayer,但是grpc服务不能,所以一问:volo_grpc和volo_http的中间件是否通用
问题2:开发的测试中间件TestLayer和DemoLayer能否放在一个Vec中,如果能,哪这个Vec的类型如何定义,如下:
volo-grpc和volo-http的中间件不知是否通用
下面是开发的测试中间件
http 服务启动(正常)
grpc 服务启动(问题,中间件不通用)
The text was updated successfully, but these errors were encountered: