canic_core/api/
component_runtime.rs1use crate::{
8 dto::{
9 component_registry::{
10 ComponentRuntimeDirectoryPreparationRequest, ComponentRuntimeDirectoryStatusResponse,
11 },
12 error::Error,
13 },
14 workflow::component_runtime,
15};
16
17pub struct ComponentRuntimeApi;
22
23impl ComponentRuntimeApi {
24 pub fn prepare_directory(
25 request: ComponentRuntimeDirectoryPreparationRequest,
26 ) -> Result<ComponentRuntimeDirectoryStatusResponse, Error> {
27 component_runtime::prepare_directory(request).map_err(Error::from)
28 }
29
30 pub fn directory_status() -> Result<ComponentRuntimeDirectoryStatusResponse, Error> {
31 component_runtime::directory_status().map_err(Error::from)
32 }
33}