diff options
| author | Joe Kirchoff <[email protected]> | 2021-11-11 14:18:47 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-11 14:18:47 -0800 |
| commit | 5ad6c346f71054288f3022d93cd123a646a75873 (patch) | |
| tree | f360018710b25ed1b5e3e7438f2927810d63aa94 /zenserver/upstream/jupiter.h | |
| parent | Format fix. (diff) | |
| download | zen-5ad6c346f71054288f3022d93cd123a646a75873.tar.xz zen-5ad6c346f71054288f3022d93cd123a646a75873.zip | |
Horde remote execute (#25)
Diffstat (limited to 'zenserver/upstream/jupiter.h')
| -rw-r--r-- | zenserver/upstream/jupiter.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/zenserver/upstream/jupiter.h b/zenserver/upstream/jupiter.h index 9471ef64f..13d65587e 100644 --- a/zenserver/upstream/jupiter.h +++ b/zenserver/upstream/jupiter.h @@ -12,6 +12,7 @@ #include <chrono> #include <list> #include <memory> +#include <set> #include <vector> struct ZenCacheValue; @@ -64,6 +65,11 @@ struct FinalizeRefResult : CloudCacheResult std::vector<IoHash> Needs; }; +struct CloudCacheExistsResult : CloudCacheResult +{ + std::set<IoHash> Have; +}; + /** * Context for performing Jupiter operations * @@ -95,12 +101,18 @@ public: FinalizeRefResult FinalizeRef(std::string_view BucketId, const IoHash& Key, const IoHash& RefHah); CloudCacheResult RefExists(std::string_view BucketId, const IoHash& Key); + CloudCacheResult BlobExists(const IoHash& Key); CloudCacheResult CompressedBlobExists(const IoHash& Key); CloudCacheResult ObjectExists(const IoHash& Key); + CloudCacheExistsResult BlobExists(const std::set<IoHash>& Keys); + CloudCacheExistsResult CompressedBlobExists(const std::set<IoHash>& Keys); + CloudCacheExistsResult ObjectExists(const std::set<IoHash>& Keys); + CloudCacheResult PostComputeTasks(std::string_view ChannelId, IoBuffer TasksData); CloudCacheResult GetComputeUpdates(std::string_view ChannelId, const uint32_t WaitSeconds = 0); + CloudCacheResult GetObjectTree(const IoHash& Key); std::vector<IoHash> Filter(std::string_view BucketId, const std::vector<IoHash>& ChunkHashes); @@ -109,6 +121,10 @@ private: const CloudCacheAccessToken& GetAccessToken(); bool VerifyAccessToken(long StatusCode); + CloudCacheResult CacheTypeExists(std::string_view TypeId, const IoHash& Key); + + CloudCacheExistsResult CacheTypeExists(std::string_view TypeId, const std::set<IoHash>& Keys); + spdlog::logger& m_Log; RefPtr<CloudCacheClient> m_CacheClient; detail::CloudCacheSessionState* m_SessionState; @@ -122,6 +138,7 @@ struct CloudCacheClientOptions std::string_view OAuthProvider; std::string_view OAuthClientId; std::string_view OAuthSecret; + std::string_view AccessToken; bool UseLegacyDdc = false; }; @@ -152,6 +169,7 @@ private: std::string m_BlobStoreNamespace; std::string m_OAuthClientId; std::string m_OAuthSecret; + std::string m_AccessToken; bool m_IsValid = false; RwLock m_SessionStateLock; |