1pub(crate) mod adapter;
22pub mod config;
23pub mod ic;
24pub mod icrc;
25pub mod perf;
26pub mod rpc;
27pub mod runtime;
28pub mod storage;
29pub mod view;
30
31use std::time::Duration;
32
33pub const OPS_INIT_DELAY: Duration = Duration::from_secs(10);
39
40pub const OPS_CYCLE_TRACK_INTERVAL: Duration = Duration::from_secs(60 * 10);
42
43pub const OPS_LOG_RETENTION_INTERVAL: Duration = Duration::from_secs(60 * 10);
45
46pub const OPS_POOL_INIT_DELAY: Duration = Duration::from_secs(30);
48
49pub const OPS_POOL_CHECK_INTERVAL: Duration = Duration::from_secs(30 * 60);
51
52pub mod prelude {
58 pub use crate::{
59 cdk::{
60 api::{canister_self, msg_caller},
61 candid::CandidType,
62 types::{Account, Cycles, Int, Nat, Principal, Subaccount},
63 },
64 ids::CanisterRole,
65 log,
66 log::Level,
67 ops::OpsError,
68 ops::ic::{call::Call, call_and_decode},
69 };
70 pub use serde::{Deserialize, Serialize};
71}
72
73use crate::ThisError;
74
75#[derive(Debug, ThisError)]
81pub enum OpsError {
82 #[error(transparent)]
83 ConfigOpsError(#[from] config::ConfigOpsError),
84
85 #[error(transparent)]
86 RpcOpsError(#[from] rpc::RpcOpsError),
87
88 #[error(transparent)]
89 RuntimeOpsError(#[from] runtime::RuntimeOpsError),
90
91 #[error(transparent)]
92 StorageOpsError(#[from] storage::StorageOpsError),
93}