diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/execution_api/local/local_cas.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buildtool/execution_api/local/local_cas.hpp b/src/buildtool/execution_api/local/local_cas.hpp index ea10b638..f8efbb6a 100644 --- a/src/buildtool/execution_api/local/local_cas.hpp +++ b/src/buildtool/execution_api/local/local_cas.hpp @@ -23,6 +23,11 @@ class LocalCAS { auto operator=(LocalCAS&&) -> LocalCAS& = delete; ~LocalCAS() noexcept = default; + [[nodiscard]] static auto Instance() noexcept -> LocalCAS<kType>& { + static auto instance = LocalCAS<kType>{}; + return instance; + } + [[nodiscard]] auto StoreBlobFromBytes(std::string const& bytes) const noexcept -> std::optional<bazel_re::Digest> { return StoreBlob(bytes, /*is_owner=*/true); |