1#[cfg(feature = "fuse")]
2use debug_ignore::DebugIgnore;
3#[cfg(feature = "fuse")]
4use easy_fuser::templates::DefaultFuseHandler;
5use iroh_blobs::net_protocol::Blobs;
6use iroh_docs::protocol::Docs;
7use std::path::PathBuf;
8#[cfg(feature = "fuse")]
9use std::sync::Arc;
10use std::sync::LazyLock;
11#[cfg(feature = "fuse")]
12use tokio::runtime::Handle;
13use tokio::sync::watch::Sender;
14
15pub mod core;
17pub mod directory;
19pub mod file;
21pub mod net;
23pub mod replica;
25pub mod util;
27
28pub const FS_PATH: &str = ".oku";
30pub(crate) static NODE_PATH: LazyLock<PathBuf> =
31 LazyLock::new(|| PathBuf::from(FS_PATH).join("node"));
32
33#[derive(Clone, Debug)]
37pub struct OkuFs {
38 pub(crate) endpoint: iroh::Endpoint,
39 pub(crate) blobs: Blobs<iroh_blobs::store::fs::Store>,
40 pub(crate) docs: Docs<iroh_blobs::store::fs::Store>,
41 pub(crate) router: iroh::protocol::Router,
42 pub replica_sender: Sender<()>,
45 pub okunet_fetch_sender: Sender<bool>,
47 #[cfg(feature = "fuse")]
48 pub(crate) fuse_handler: DebugIgnore<Arc<DefaultFuseHandler>>,
49 #[cfg(feature = "fuse")]
50 pub(crate) handle: Handle,
52 pub(crate) dht: mainline::async_dht::AsyncDht,
53}