aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/log-store.hh
diff options
context:
space:
mode:
authorGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-03-18 01:25:55 +0100
committerGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-03-18 01:25:55 +0100
commitca5c3e86abf4ba7ff8e680a0a89c895d452931b9 (patch)
tree1a5dc481a375e6ab060221118f0d61959a06ecf6 /src/libstore/log-store.hh
parent1942fed6d9cee95775046c5ad3d253ab2e8ab210 (diff)
parent6afc3617982e872fac2142c3aeccd1e8482e7e52 (diff)
Merge remote-tracking branch 'origin/master' into coerce-string
Diffstat (limited to 'src/libstore/log-store.hh')
-rw-r--r--src/libstore/log-store.hh21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/libstore/log-store.hh b/src/libstore/log-store.hh
new file mode 100644
index 000000000..ff1b92e17
--- /dev/null
+++ b/src/libstore/log-store.hh
@@ -0,0 +1,21 @@
+#pragma once
+
+#include "store-api.hh"
+
+
+namespace nix {
+
+struct LogStore : public virtual Store
+{
+ inline static std::string operationName = "Build log storage and retrieval";
+
+ /* Return the build log of the specified store path, if available,
+ or null otherwise. */
+ virtual std::optional<std::string> getBuildLog(const StorePath & path) = 0;
+
+ virtual void addBuildLog(const StorePath & path, std::string_view log) = 0;
+
+ static LogStore & require(Store & store);
+};
+
+}