feat(nix-daemon): Implement QueryPathInfo and IsValidPath.

Change-Id: Ia601e2eae24a2bc13d8851b2e8ed9d6c1808bb35
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12745
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Vladimir Kryachko <v.kryachko@gmail.com>
Tested-by: BuildkiteCI
This commit is contained in:
Vova Kryachko 2024-11-08 14:22:23 -05:00 committed by Vladimir Kryachko
parent b564ed9d43
commit 9d114bf040
4 changed files with 182 additions and 12 deletions

View file

@ -1,8 +1,18 @@
pub mod worker_protocol;
use std::io::Result;
use types::UnkeyedValidPathInfo;
use crate::store_path::StorePath;
pub mod handler;
pub mod types;
pub mod worker_protocol;
/// Represents all possible operations over the nix-daemon protocol.
pub trait NixDaemonIO {
// TODO add methods to it.
fn query_path_info(
&self,
path: &StorePath<String>,
) -> impl std::future::Future<Output = Result<Option<UnkeyedValidPathInfo>>> + Send;
}