(
router: axum::Router,
address: HttpAddress,
shutdown: CancellationToken,
)
| 210 | } |
| 211 | |
| 212 | async fn run_rest_server( |
| 213 | router: axum::Router, |
| 214 | address: HttpAddress, |
| 215 | shutdown: CancellationToken, |
| 216 | ) -> Result<(), Report<GraphError>> { |
| 217 | let listener = TcpListener::bind((&*address.api_host, address.api_port)) |
| 218 | .await |
| 219 | .change_context(GraphError)?; |
| 220 | tracing::info!("REST server listening on {address}"); |
| 221 | |
| 222 | axum::serve( |
| 223 | listener, |
| 224 | router.into_make_service_with_connect_info::<SocketAddr>(), |
| 225 | ) |
| 226 | .with_graceful_shutdown(shutdown.cancelled_owned()) |
| 227 | .await |
| 228 | .change_context(GraphError)?; |
| 229 | |
| 230 | Ok(()) |
| 231 | } |
| 232 | |
| 233 | async fn create_temporal_client( |
| 234 | config: &TemporalConfig, |
no test coverage detected