canic_core/api/pool.rs
1use crate::{
2 PublicError,
3 dto::pool::{CanisterPoolView, PoolAdminCommand, PoolAdminResponse},
4 workflow,
5};
6
7///
8/// Pool API
9///
10
11#[must_use]
12pub fn pool_list() -> CanisterPoolView {
13 workflow::pool::query::pool_list_view()
14}
15
16pub async fn pool_admin(cmd: PoolAdminCommand) -> Result<PoolAdminResponse, PublicError> {
17 workflow::pool::admin::handle_admin(cmd)
18 .await
19 .map_err(PublicError::from)
20}