MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / rocket

Function rocket

supervisor/src/web_api.rs:98–106  ·  view source on GitHub ↗
(figment: Figment)

Source from the content-addressed store, hash-verified

96}
97
98pub fn rocket(figment: Figment) -> Rocket<Build> {
99 let supervisor = Supervisor::new();
100 let rocket = rocket::custom(figment).manage(supervisor.clone()).mount(
101 "/",
102 routes![deploy, start, stop, remove, list, info, ping, clear, shutdown],
103 );
104 tokio::spawn(handle_shutdown_signals(supervisor));
105 rocket
106}
107
108async fn handle_shutdown_signals(supervisor: Supervisor) {
109 let ctrl_c = async {

Callers 1

async_mainFunction · 0.85

Calls 2

handle_shutdown_signalsFunction · 0.85
cloneMethod · 0.80

Tested by

no test coverage detected