mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-23 23:27:57 +01:00
39 lines
859 B
Rust
39 lines
859 B
Rust
use crate::capnp::machine::Machine;
|
|
use crate::resources::search::ResourcesHandle;
|
|
use crate::resources::Resource;
|
|
use crate::session::SessionHandle;
|
|
use crate::RESOURCES;
|
|
use api::resources_capnp::resources;
|
|
use capnp::capability::Promise;
|
|
use capnp_rpc::pry;
|
|
use tracing::Span;
|
|
|
|
const TARGET: &str = "bffh::api::machinesystem";
|
|
|
|
#[derive(Clone)]
|
|
pub struct Machines {
|
|
span: Span,
|
|
session: SessionHandle,
|
|
resources: ResourcesHandle,
|
|
}
|
|
|
|
impl Machines {
|
|
pub fn new(session: SessionHandle) -> Self {
|
|
let span = tracing::info_span!(
|
|
target: TARGET,
|
|
parent: &session.span,
|
|
"MachineSystem",
|
|
);
|
|
// FIXME no unwrap bad
|
|
Self {
|
|
span,
|
|
session,
|
|
resources: RESOURCES.get().unwrap().clone(),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl resources::Server for Machines {
|
|
|
|
}
|