start implementing getting meta for structure

This commit is contained in:
OMGeeky
2024-04-14 14:52:47 +02:00
parent 2a66a6572a
commit 2f72a8a7c7
8 changed files with 207 additions and 42 deletions

View File

@@ -4,6 +4,7 @@ use tokio::sync::mpsc::{channel, Sender};
use crate::filesystem::{Filesystem, ShutdownRequest};
use gdriver_common::{ipc::sample::*, prelude::*};
use tarpc::context::Context;
use tarpc::{client, tokio_serde::formats::Json};
use tokio::task::JoinHandle;
@@ -15,10 +16,11 @@ async fn main() -> Result<()> {
// service::start().await?;
let mount_options = &[MountOption::RW];
let (tx, rx) = channel(1);
let f = Filesystem::new(
service::create_client(CONFIGURATION.ip, CONFIGURATION.port).await?,
rx,
);
let gdriver_client = service::create_client(CONFIGURATION.ip, CONFIGURATION.port).await?;
gdriver_client
.set_offline_mode(Context::current(), true) //TODO make this configurable
.await??;
let f = Filesystem::new(gdriver_client, rx);
mount(f, &"/var/tmp/gdriver2_mount", mount_options, tx)
.await?
.await?;