about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-08-05T03·06-0400
committerglittershark <grfn@gws.fyi>2020-08-05T22·28+0000
commitea488b570535b1cea5cfec74aa908af92202fcd1 (patch)
tree26a7efd68a6a485f8cf6dfa9938243154e79914c /third_party/nix/src/libstore/store-api.hh
parentf9df9b47339f3583741ccec9760dd8f3934bdee4 (diff)
feat(3p/nix): Implement FindRoots, CollectGarbage r/1600
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 <rikingcoding@gmail.com>
Diffstat (limited to 'third_party/nix/src/libstore/store-api.hh')
-rw-r--r--third_party/nix/src/libstore/store-api.hh5
1 files changed, 5 insertions, 0 deletions
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<unsigned long long>::max()};
+
+  [[nodiscard]] const proto::GCAction ActionToProto() const;
 };
 
+std::optional<GCOptions::GCAction> 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. */