diff options
Diffstat (limited to 'src/buildtool/execution_api/common/execution_api.hpp')
-rw-r--r-- | src/buildtool/execution_api/common/execution_api.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/buildtool/execution_api/common/execution_api.hpp b/src/buildtool/execution_api/common/execution_api.hpp index 37abd5ea..d6ec49fb 100644 --- a/src/buildtool/execution_api/common/execution_api.hpp +++ b/src/buildtool/execution_api/common/execution_api.hpp @@ -15,6 +15,7 @@ #ifndef INCLUDED_SRC_BUILDTOOL_EXECUTION_API_COMMON_EXECUTION_APIHPP #define INCLUDED_SRC_BUILDTOOL_EXECUTION_API_COMMON_EXECUTION_APIHPP +#include <filesystem> #include <map> #include <memory> #include <optional> @@ -27,6 +28,7 @@ #include "src/buildtool/execution_api/bazel_msg/bazel_blob_container.hpp" #include "src/buildtool/execution_api/bazel_msg/bazel_msg_factory.hpp" #include "src/buildtool/execution_api/common/execution_action.hpp" +#include "src/buildtool/file_system/object_type.hpp" /// \brief Abstract remote execution API /// Can be used to create actions. @@ -116,6 +118,12 @@ class IExecutionApi { bool skip_find_missing = false) noexcept -> bool = 0; + /// \brief Upload a file to CAS as an object of the specified type. + /// It may be assumed that the file is owned entirely by the build process. + [[nodiscard]] virtual auto UploadFile( + std::filesystem::path const& file_path, + ObjectType type) noexcept -> bool; + [[nodiscard]] virtual auto UploadTree( std::vector<DependencyGraph::NamedArtifactNodePtr> const& artifacts) noexcept -> std::optional<ArtifactDigest> = 0; |