mod actor; pub mod error; mod handle_impl; mod message; pub mod store; use std::collections::HashSet; use std::path::PathBuf; use uuid::Uuid; use actor::UuidResolverActor; use error::Result; use message::UuidResolveMsg; use store::UuidStore; #[cfg(test)] use mockall::automock; pub use handle_impl::UuidResolverHandleImpl; pub use store::HeedUuidStore; const UUID_STORE_SIZE: usize = 1_073_741_824; //1GiB #[async_trait::async_trait] #[cfg_attr(test, automock)] pub trait UuidResolverHandle { async fn get(&self, name: String) -> Result; async fn insert(&self, name: String, uuid: Uuid) -> Result<()>; async fn delete(&self, name: String) -> Result; async fn list(&self) -> Result>; async fn snapshot(&self, path: PathBuf) -> Result>; async fn get_size(&self) -> Result; async fn dump(&self, path: PathBuf) -> Result>; }