refactor(tvix/castore/directory): have SimplePutter use Validator

This simplifies a bunch of code, and gets rid of some TODOs.

Also, move it out of castore/utils, and into its own file.

Change-Id: Ie63e05a6cdfb2a73e878cf7107f9172aed1cdf13
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11224
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
This commit is contained in:
Florian Klink 2024-03-20 23:28:13 +02:00 committed by clbot
parent c92ef2df64
commit 5f069a3eb8
5 changed files with 82 additions and 59 deletions

View file

@ -6,6 +6,7 @@ mod closure_validator;
mod from_addr;
mod grpc;
mod memory;
mod simple_putter;
mod sled;
mod traverse;
mod utils;
@ -14,8 +15,10 @@ pub use self::closure_validator::ClosureValidator;
pub use self::from_addr::from_addr;
pub use self::grpc::GRPCDirectoryService;
pub use self::memory::MemoryDirectoryService;
pub use self::simple_putter::SimplePutter;
pub use self::sled::SledDirectoryService;
pub use self::traverse::descend_to;
pub use self::utils::traverse_directory;
/// The base trait all Directory services need to implement.
/// This is a simple get and put of [crate::proto::Directory], returning their