diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-05-24 17:19:35 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-05-28 16:19:19 +0200 |
commit | dc273f4ce89dc6e562c4a99fd394c92f56eeb63f (patch) | |
tree | e9a48a3673c543f677fb00c2bd97d1a2feed8abf /src/buildtool/execution_api/bazel_msg/bazel_blob.hpp | |
parent | a0c2017551a5a1a9de2319d11954587bd35da773 (diff) | |
download | justbuild-dc273f4ce89dc6e562c4a99fd394c92f56eeb63f.tar.gz |
Convert BlobContainer to a template
...where the template parameter is the type of a digest.
Diffstat (limited to 'src/buildtool/execution_api/bazel_msg/bazel_blob.hpp')
-rw-r--r-- | src/buildtool/execution_api/bazel_msg/bazel_blob.hpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/buildtool/execution_api/bazel_msg/bazel_blob.hpp b/src/buildtool/execution_api/bazel_msg/bazel_blob.hpp index 75f174b5..bac9d273 100644 --- a/src/buildtool/execution_api/bazel_msg/bazel_blob.hpp +++ b/src/buildtool/execution_api/bazel_msg/bazel_blob.hpp @@ -15,20 +15,10 @@ #ifndef INCLUDED_SRC_BUILDTOOL_EXECUTION_API_BAZEL_MSG_BAZEL_BLOB_HPP #define INCLUDED_SRC_BUILDTOOL_EXECUTION_API_BAZEL_MSG_BAZEL_BLOB_HPP -#include <string> -#include <utility> // std::move - #include "src/buildtool/common/bazel_types.hpp" +#include "src/buildtool/execution_api/common/content_blob_container.hpp" -struct BazelBlob { - BazelBlob(bazel_re::Digest mydigest, std::string mydata, bool is_exec) - : digest{std::move(mydigest)}, - data{std::move(mydata)}, - is_exec{is_exec} {} - - bazel_re::Digest digest{}; - std::string data{}; - bool is_exec{}; // optional: hint to put the blob in executable CAS -}; +using BazelBlob = ContentBlob<bazel_re::Digest>; +using BlobContainer = ContentBlobContainer<bazel_re::Digest>; #endif // INCLUDED_SRC_BUILDTOOL_EXECUTION_API_BAZEL_MSG_BAZEL_BLOB_HPP |