MCPcopy Create free account
hub / github.com/hashintel/hash / run_rest_server

Function run_rest_server

apps/hash-graph/src/subcommand/server.rs:212–231  ·  view source on GitHub ↗
(
    router: axum::Router,
    address: HttpAddress,
    shutdown: CancellationToken,
)

Source from the content-addressed store, hash-verified

210}
211
212async 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
233async fn create_temporal_client(
234 config: &TemporalConfig,

Callers 1

start_rest_serverFunction · 0.85

Calls 3

serveFunction · 0.85
OkInterface · 0.85
change_contextMethod · 0.45

Tested by

no test coverage detected