summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/execution_api/common')
-rw-r--r--src/buildtool/execution_api/common/TARGETS6
-rw-r--r--src/buildtool/execution_api/common/bytestream_utils.hpp (renamed from src/buildtool/execution_api/common/bytestream_common.hpp)17
2 files changed, 13 insertions, 10 deletions
diff --git a/src/buildtool/execution_api/common/TARGETS b/src/buildtool/execution_api/common/TARGETS
index 0f3288e5..a060d0fa 100644
--- a/src/buildtool/execution_api/common/TARGETS
+++ b/src/buildtool/execution_api/common/TARGETS
@@ -30,10 +30,10 @@
, "private-deps": [["src/buildtool/common", "artifact_digest_factory"]]
, "stage": ["src", "buildtool", "execution_api", "common"]
}
-, "bytestream-common":
+, "bytestream_utils":
{ "type": ["@", "rules", "CC", "library"]
- , "name": ["bytestream-common"]
- , "hdrs": ["bytestream_common.hpp"]
+ , "name": ["bytestream_utils"]
+ , "hdrs": ["bytestream_utils.hpp"]
, "stage": ["src", "buildtool", "execution_api", "common"]
}
, "api_bundle":
diff --git a/src/buildtool/execution_api/common/bytestream_common.hpp b/src/buildtool/execution_api/common/bytestream_utils.hpp
index 5c7cf3cb..c28c9627 100644
--- a/src/buildtool/execution_api/common/bytestream_common.hpp
+++ b/src/buildtool/execution_api/common/bytestream_utils.hpp
@@ -1,4 +1,4 @@
-// Copyright 2022 Huawei Cloud Computing Technology Co., Ltd.
+// Copyright 2024 Huawei Cloud Computing Technology Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,12 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// settings common for server and client
-#ifndef BYTESTREAM_COMMON_HPP
-#define BYTESTREAM_COMMON_HPP
+#ifndef INCLUDED_SRC_BUILDTOOL_EXECUTION_API_COMMON_BYTESTREAM_UTILS_HPP
+#define INCLUDED_SRC_BUILDTOOL_EXECUTION_API_COMMON_BYTESTREAM_UTILS_HPP
+
#include <cstddef>
-// Chunk size for uploads (default size used by BuildBarn)
-constexpr static std::size_t kChunkSize = 64 * 1024;
+class ByteStreamUtils final {
+ public:
+ // Chunk size for uploads (default size used by BuildBarn)
+ static constexpr std::size_t kChunkSize = 64 * 1024;
+};
-#endif
+#endif // INCLUDED_SRC_BUILDTOOL_EXECUTION_API_COMMON_BYTESTREAM_UTILS_HPP