diff options
| author | Per Larsson <[email protected]> | 2021-11-17 21:06:17 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-11-17 21:06:17 +0100 |
| commit | a3b24501aa2758b0621806086bb6e3ffc83c2b97 (patch) | |
| tree | 3673533c6c19b3e5c3e7c972099f8a75faa34868 /zenserver/upstream/upstreamcache.h | |
| parent | Added health check and return missing error message. (diff) | |
| download | zen-a3b24501aa2758b0621806086bb6e3ffc83c2b97.tar.xz zen-a3b24501aa2758b0621806086bb6e3ffc83c2b97.zip | |
Changed upstream DisplayName to UpstreamEndpointInfo with name and url.
Diffstat (limited to 'zenserver/upstream/upstreamcache.h')
| -rw-r--r-- | zenserver/upstream/upstreamcache.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/zenserver/upstream/upstreamcache.h b/zenserver/upstream/upstreamcache.h index fb2550cad..12287198d 100644 --- a/zenserver/upstream/upstreamcache.h +++ b/zenserver/upstream/upstreamcache.h @@ -100,6 +100,12 @@ struct CachePayloadGetCompleteParams using OnCachePayloadGetComplete = std::function<void(CachePayloadGetCompleteParams&&)>; +struct UpstreamEndpointInfo +{ + std::string Name; + std::string Url; +}; + /** * The upstream endpont is responsible for handling upload/downloading of cache records. */ @@ -108,14 +114,14 @@ class UpstreamEndpoint public: virtual ~UpstreamEndpoint() = default; + virtual const UpstreamEndpointInfo& GetEndpointInfo() const = 0; + virtual UpstreamEndpointHealth Initialize() = 0; virtual bool IsHealthy() const = 0; virtual UpstreamEndpointHealth CheckHealth() = 0; - virtual std::string_view DisplayName() const = 0; - virtual GetUpstreamCacheResult GetCacheRecord(CacheKey CacheKey, ZenContentType Type) = 0; virtual GetUpstreamCacheResult GetCacheRecords(std::span<CacheKey> CacheKeys, |