(
dependencies: Dependencies<S, C>,
notifications: N,
)
| 64 | } |
| 65 | |
| 66 | pub fn rpc_router<S, C, N>( |
| 67 | dependencies: Dependencies<S, C>, |
| 68 | notifications: N, |
| 69 | ) -> ( |
| 70 | Router<impl Route<RequestBody, ResponseBody: Send, Future: Send> + Send>, |
| 71 | Task<Account, N>, |
| 72 | ) |
| 73 | where |
| 74 | S: StorePool + Send + Sync + 'static, |
| 75 | C: ReportEncoder + ReportDecoder + Clone + Send + Sync + 'static, |
| 76 | for<'p> S::Store<'p>: PrincipalStore, |
| 77 | { |
| 78 | let builder = RouterBuilder::new(dependencies.codec) |
| 79 | .with_builder(|builder| { |
| 80 | builder |
| 81 | .layer(HandleReportLayer::new()) |
| 82 | .layer(HandleBodyReportLayer::new()) |
| 83 | }) |
| 84 | .register(AuthenticationDelegate::new(AuthenticationServer)) |
| 85 | .register(AccountDelegate::new(AccountServer { |
| 86 | store_pool: dependencies.store, |
| 87 | temporal_client: dependencies.temporal_client, |
| 88 | })) |
| 89 | .register(EchoDelegate::new(EchoServer)); |
| 90 | |
| 91 | let task = builder.background_task(notifications); |
| 92 | |
| 93 | let router = builder.build(); |
| 94 | |
| 95 | (router, task) |
| 96 | } |
no test coverage detected