diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-08 18:20:39 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-11 13:32:16 +0000 |
commit | 678d1c2aa0f499466c723d3461277dc197515f57 (patch) | |
tree | d724d5782585463da2bd2f41f7e92588e5085754 /src/libstore/log-store.hh | |
parent | 89effe9d4abde2ea8970736f79e0a6a499777692 (diff) |
Factor out a `LogStore` interface
Continue progress on #5729.
Just as I hoped, this uncovered an issue: the daemon protocol is missing
a way to query build logs. This doesn't effect `unix://`, but does
effect `ssh://`. A FIXME is left for this, so we come back to it later.
Diffstat (limited to 'src/libstore/log-store.hh')
-rw-r--r-- | src/libstore/log-store.hh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libstore/log-store.hh b/src/libstore/log-store.hh new file mode 100644 index 000000000..ad17cbe6e --- /dev/null +++ b/src/libstore/log-store.hh @@ -0,0 +1,19 @@ +#pragma once + +#include "store-api.hh" + + +namespace nix { + +struct LogStore : public virtual Store +{ + /* 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); +}; + +} |