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

Function main

dstack-util/src/main.rs:453–508  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

451
452#[tokio::main]
453async fn main() -> Result<()> {
454 {
455 use tracing_subscriber::{fmt, EnvFilter};
456 let filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info"));
457 fmt().with_env_filter(filter).with_ansi(false).init();
458 }
459
460 let cli = Cli::parse();
461
462 match cli.command {
463 Commands::Quote => cmd_quote()?,
464 Commands::Eventlog => cmd_eventlog()?,
465 Commands::Show => cmd_show_mrs()?,
466 Commands::ReplayImr => cmd_replay_imr()?,
467 Commands::Extend(extend_args) => {
468 cmd_extend(extend_args)?;
469 }
470 Commands::Hex(hex_args) => {
471 cmd_hex(hex_args)?;
472 }
473 Commands::GenRaCert(args) => {
474 cmd_gen_ra_cert(args)?;
475 }
476 Commands::Rand(rand_args) => {
477 cmd_rand(rand_args)?;
478 }
479 Commands::GenCaCert(args) => {
480 cmd_gen_ca_cert(args)?;
481 }
482 Commands::GenAppKeys(args) => {
483 cmd_gen_app_keys(args)?;
484 }
485 Commands::Setup(args) => {
486 cmd_sys_setup(args).await?;
487 }
488 Commands::GatewayRefresh(args) => {
489 cmd_gateway_refresh(args).await?;
490 }
491 Commands::NotifyHost(args) => {
492 cmd_notify_host(args).await?;
493 }
494 Commands::RemoveOrphans(args) => {
495 if args.no_dockerd {
496 docker_compose::remove_orphans_direct(
497 args.compose,
498 args.docker_root,
499 args.dry_run,
500 )?;
501 } else {
502 docker_compose::remove_orphans(args.compose, args.dry_run).await?;
503 }
504 }
505 }
506
507 Ok(())
508}

Callers

nothing calls this directly

Calls 15

cmd_quoteFunction · 0.85
cmd_eventlogFunction · 0.85
cmd_show_mrsFunction · 0.85
cmd_replay_imrFunction · 0.85
cmd_extendFunction · 0.85
cmd_hexFunction · 0.85
cmd_gen_ra_certFunction · 0.85
cmd_randFunction · 0.85
cmd_gen_ca_certFunction · 0.85
cmd_gen_app_keysFunction · 0.85
cmd_sys_setupFunction · 0.85
cmd_gateway_refreshFunction · 0.85

Tested by

no test coverage detected