manta_server/backend_dispatcher/
sat.rs

1//! Dispatches `SatTrait` (SAT file application) methods to csm-rs or
2//! ochami-rs.
3//!
4//! Both backend variants return the same tuple
5//! `(Vec<CfsConfigurationResponse>, Vec<Image>, Vec<BosSessionTemplate>,
6//! Vec<BosSession>)` so the dispatch is a straight `match`/`.await`.
7
8use manta_backend_dispatcher::{
9  error::Error,
10  interfaces::apply_sat_file::{ApplySatFileParams, SatTrait},
11  types::{
12    bos::{session::BosSession, session_template::BosSessionTemplate},
13    cfs::cfs_configuration_response::CfsConfigurationResponse,
14    ims::Image,
15  },
16};
17
18use StaticBackendDispatcher::*;
19
20use crate::manta_backend_dispatcher::StaticBackendDispatcher;
21
22impl SatTrait for StaticBackendDispatcher {
23  async fn apply_sat_file(
24    &self,
25    params: ApplySatFileParams<'_>,
26  ) -> Result<
27    (
28      Vec<CfsConfigurationResponse>,
29      Vec<Image>,
30      Vec<BosSessionTemplate>,
31      Vec<BosSession>,
32    ),
33    Error,
34  > {
35    dispatch!(self, apply_sat_file, params)
36  }
37}