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

Function cmd_gateway_refresh

dstack-util/src/system_setup.rs:739–752  ·  view source on GitHub ↗
(args: GatewayRefreshArgs)

Source from the content-addressed store, hash-verified

737}
738
739pub async fn cmd_gateway_refresh(args: GatewayRefreshArgs) -> Result<()> {
740 let host_shared_dir = args.work_dir.join(HOST_SHARED_DIR_NAME);
741 let shared = HostShared::load(host_shared_dir.as_path()).with_context(|| {
742 format!(
743 "Failed to load host-shared dir: {}",
744 host_shared_dir.display()
745 )
746 })?;
747 let keys_path = shared.dir.join(APP_KEYS);
748 let keys: AppKeys = deserialize_json_file(&keys_path)
749 .with_context(|| format!("Failed to load app keys from {}", keys_path.display()))?;
750
751 GatewayContext::new(&shared, &keys).setup(args.force).await
752}
753
754struct AppIdValidator {
755 allowed_app_id: String,

Callers 1

mainFunction · 0.85

Calls 2

deserialize_json_fileFunction · 0.85
setupMethod · 0.80

Tested by

no test coverage detected