1#ifndef YAZE_CORE_SOURCE_ARTIFACT_PUBLISHER_H_
2#define YAZE_CORE_SOURCE_ARTIFACT_PUBLISHER_H_
12#include "absl/status/status.h"
13#include "absl/status/statusor.h"
20 ".yaze-message-source-sync.lock";
58 friend absl::StatusOr<std::unique_ptr<SourceArtifactPublicationLock>>
60 const std::vector<std::filesystem::path>& targets,
64 std::vector<SourceArtifactUpdate> updates,
65 std::string_view expected_primary_sha256,
73 const std::vector<std::filesystem::path>& targets,
76absl::StatusOr<std::unique_ptr<SourceArtifactPublicationLock>>
78 const std::vector<std::filesystem::path>& targets,
91 const SourceArtifactPublicationLock& lock,
92 std::vector<SourceArtifactUpdate> updates,
93 std::string_view expected_primary_sha256,
friend absl::Status PublishSourceArtifacts(const SourceArtifactPublicationLock &lock, std::vector< SourceArtifactUpdate > updates, std::string_view expected_primary_sha256, SourceArtifactReadbackValidator readback_validator)
SourceArtifactPublicationLock & operator=(const SourceArtifactPublicationLock &)=delete
~SourceArtifactPublicationLock()
SourceArtifactPublicationLock(const SourceArtifactPublicationLock &)=delete
std::unique_ptr< Impl > impl_
friend absl::StatusOr< std::unique_ptr< SourceArtifactPublicationLock > > AcquireSourceArtifactPublicationLock(const std::vector< std::filesystem::path > &targets, const SourceArtifactPublisherLabels &labels)
absl::Status PublishSourceArtifacts(const SourceArtifactPublicationLock &lock, std::vector< SourceArtifactUpdate > updates, std::string_view expected_primary_sha256, SourceArtifactReadbackValidator readback_validator)
constexpr char kSourceArtifactPublicationLockBasename[]
std::string ComputeSourceArtifactSha256(std::string_view content)
absl::Status ValidateSourceArtifactPublicationTargets(const std::vector< fs::path > &targets, const SourceArtifactPublisherLabels &labels)
std::function< absl::Status()> SourceArtifactReadbackValidator
absl::StatusOr< std::unique_ptr< SourceArtifactPublicationLock > > AcquireSourceArtifactPublicationLock(const std::vector< fs::path > &targets, const SourceArtifactPublisherLabels &labels)
std::string published_file
std::optional< std::string > before
std::filesystem::path target