diff options
| author | Joe Kirchoff <[email protected]> | 2022-03-17 09:55:09 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-17 09:55:09 -0700 |
| commit | 7466cb93fbb9f4082dc253a328222dac8bbe58e4 (patch) | |
| tree | 2b60020b7ab15867bfabf135bf8217aabe553c6d /zenserver/upstream/upstreamapply.h | |
| parent | Introduced basic validation of the clang-format version (diff) | |
| download | zen-7466cb93fbb9f4082dc253a328222dac8bbe58e4.tar.xz zen-7466cb93fbb9f4082dc253a328222dac8bbe58e4.zip | |
Update horde compute to use Jupiter for storage (#60)
Diffstat (limited to 'zenserver/upstream/upstreamapply.h')
| -rw-r--r-- | zenserver/upstream/upstreamapply.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/zenserver/upstream/upstreamapply.h b/zenserver/upstream/upstreamapply.h index c56a22ac3..44c08e30e 100644 --- a/zenserver/upstream/upstreamapply.h +++ b/zenserver/upstream/upstreamapply.h @@ -25,6 +25,8 @@ class CidStore; class ZenCacheStore; struct CloudCacheClientOptions; class CloudCacheTokenProvider; +struct UpstreamAuthConfig; +class AuthMgr; enum class UpstreamApplyState : int32_t { @@ -129,10 +131,18 @@ public: virtual PostUpstreamApplyResult PostApply(const UpstreamApplyRecord& ApplyRecord) = 0; virtual GetUpstreamApplyUpdatesResult GetUpdates() = 0; virtual UpstreamApplyEndpointStats& Stats() = 0; + + static std::unique_ptr<UpstreamApplyEndpoint> CreateHordeEndpoint(const CloudCacheClientOptions& ComputeOptions, + const UpstreamAuthConfig& ComputeAuthConfig, + const CloudCacheClientOptions& StorageOptions, + const UpstreamAuthConfig& StorageAuthConfig, + CasStore& CasStore, + CidStore& CidStore, + AuthMgr& Mgr); }; /** - * Manages one or more upstream cache endpoints. + * Manages one or more upstream compute endpoints. */ class UpstreamApply { @@ -157,14 +167,9 @@ public: virtual EnqueueResult EnqueueUpstream(UpstreamApplyRecord ApplyRecord) = 0; virtual StatusResult GetStatus(const IoHash& WorkerId, const IoHash& ActionId) = 0; virtual void GetStatus(CbObjectWriter& CbO) = 0; -}; -std::unique_ptr<UpstreamApply> MakeUpstreamApply(const UpstreamApplyOptions& Options, CasStore& CasStore, CidStore& CidStore); - -std::unique_ptr<UpstreamApplyEndpoint> MakeHordeUpstreamEndpoint(const CloudCacheClientOptions& Options, - std::unique_ptr<CloudCacheTokenProvider> TokenProvider, - CasStore& CasStore, - CidStore& CidStore); + static std::unique_ptr<UpstreamApply> Create(const UpstreamApplyOptions& Options, CasStore& CasStore, CidStore& CidStore); +}; } // namespace zen |