Filesystem publisher whose failed prepare/verify leaves the destination unchanged. 更多...
#include <AssetPackageStore.h>
Public 类型 | |
| using | BeforeReplace = std::function< PackagePublishGateDecision(const std::filesystem::path &temporary, const std::filesystem::path &destination)> |
Public 成员函数 | |
| AtomicAssetPackageStore (BeforeReplace beforeReplace={}) | |
| Construct a publisher, optionally with a failure-injection/policy gate. | |
| Result< PackagePublishReceipt > | publishEva (const std::filesystem::path &destination, const EvaManifest &manifest, std::vector< EvaArchiveEntry > entries, const EvaArchiveLimits &limits={}) |
Build, reopen-verify and atomically publish one .eva source archive. | |
| Result< PackagePublishReceipt > | publishEvpack (const std::filesystem::path &destination, std::span< const std::uint8_t > bytes, const EvpackLimits &limits={}, const EvpackTrust &trust={}) |
Reopen-verify and atomically publish already cooked .evpack bytes. | |
详细描述
Filesystem publisher whose failed prepare/verify leaves the destination unchanged.
- 备注
- The optional gate is invoked after reopening the temporary file and before replacement, without a store lock. It must not retain references to its path arguments.
在文件 AssetPackageStore.h 第 39 行定义.
成员类型定义说明
◆ BeforeReplace
| using eve::asset::AtomicAssetPackageStore::BeforeReplace = std::function<PackagePublishGateDecision( const std::filesystem::path& temporary, const std::filesystem::path& destination)> |
在文件 AssetPackageStore.h 第 41 行定义.
构造及析构函数说明
◆ AtomicAssetPackageStore()
|
explicit |
Construct a publisher, optionally with a failure-injection/policy gate.
在文件 AssetPackageStore.cpp 第 131 行定义.
成员函数说明
◆ publishEva()
| Result< PackagePublishReceipt > eve::asset::AtomicAssetPackageStore::publishEva | ( | const std::filesystem::path & | destination, |
| const EvaManifest & | manifest, | ||
| std::vector< EvaArchiveEntry > | entries, | ||
| const EvaArchiveLimits & | limits = {} |
||
| ) |
Build, reopen-verify and atomically publish one .eva source archive.
- 返回
- Receipt after replacement, or a diagnostic with the old destination intact. @thread Concurrent calls on this instance are safe. @reentrancy The gate may call unrelated services but must not recursively publish to this store.
在文件 AssetPackageStore.cpp 第 134 行定义.
引用了 eve::asset::buildEvaArchive(), eve::Cancelled, entries, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, limits, eve::asset::EvaManifest::packageId, eve::asset::parseEvaArchive(), eve::asset::Reject , 以及 eve::Result< T >::success().
◆ publishEvpack()
| Result< PackagePublishReceipt > eve::asset::AtomicAssetPackageStore::publishEvpack | ( | const std::filesystem::path & | destination, |
| std::span< const std::uint8_t > | bytes, | ||
| const EvpackLimits & | limits = {}, |
||
| const EvpackTrust & | trust = {} |
||
| ) |
Reopen-verify and atomically publish already cooked .evpack bytes.
- 返回
- Receipt after replacement, or a diagnostic with the old destination intact. @thread Concurrent calls on this instance are safe. @reentrancy The gate may call unrelated services but must not recursively publish to this store.
在文件 AssetPackageStore.cpp 第 167 行定义.
引用了 bytes, eve::Cancelled, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, limits, packageId, eve::asset::parseEvpack(), eve::asset::Reject , 以及 eve::Result< T >::success().
该类的文档由以下文件生成:
- src/modules/asset/AssetPackageStore.h
- src/modules/asset/AssetPackageStore.cpp