From ea488b570535b1cea5cfec74aa908af92202fcd1 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Tue, 4 Aug 2020 23:06:01 -0400 Subject: feat(3p/nix): Implement FindRoots, CollectGarbage Implement the RPC client and server handlers for the FindRoots and CollectGarbage RPC calls Change-Id: Ifa5d582c6a33bd1e7661ac2fc860505ef404dad0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1656 Tested-by: BuildkiteCI Reviewed-by: kanepyork --- third_party/nix/src/libstore/store-api.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'third_party/nix/src/libstore/store-api.hh') diff --git a/third_party/nix/src/libstore/store-api.hh b/third_party/nix/src/libstore/store-api.hh index 7764ae8b83e0..974734dc15d5 100644 --- a/third_party/nix/src/libstore/store-api.hh +++ b/third_party/nix/src/libstore/store-api.hh @@ -80,8 +80,13 @@ struct GCOptions { /* Stop after at least `maxFreed' bytes have been freed. */ unsigned long long maxFreed{std::numeric_limits::max()}; + + [[nodiscard]] const proto::GCAction ActionToProto() const; }; +std::optional GCActionFromProto( + nix::proto::GCAction gc_action); + struct GCResults { /* Depending on the action, the GC roots, or the paths that would be or have been deleted. */ -- cgit 1.4.1