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

@ -5,8 +5,8 @@ use std::sync::{Arc, RwLock};
use tonic::async_trait;
use tracing::{instrument, warn};
use super::utils::{traverse_directory, SimplePutter};
use super::{DirectoryPutter, DirectoryService};
use super::utils::traverse_directory;
use super::{DirectoryPutter, DirectoryService, SimplePutter};
#[derive(Clone, Default)]
pub struct MemoryDirectoryService {