canic-core 0.37.1

Canic — a canister orchestration and management toolkit for the Internet Computer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::{
    InternalError, dto::canister::CanisterStatusResponse, ops::ic::mgmt::MgmtOps,
    workflow::prelude::*,
};

///
/// MgmtWorkflow
///

pub struct MgmtWorkflow;

impl MgmtWorkflow {
    pub async fn canister_status(pid: Principal) -> Result<CanisterStatusResponse, InternalError> {
        let status = MgmtOps::canister_status(pid).await?;

        Ok(MgmtOps::canister_status_to_dto(status))
    }
}