blob: 4ca6908b52c360d4fe4a8a0bd0bac06591b2b3a6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include <zenhttp/httpserver.h>
#include <zenstore/cas.h>
namespace zen {
/**
* Simple CAS store HTTP endpoint
*
* Note that since this does not end up pinning any of the chunks it's only really useful for a small subset of use cases where you know a
* chunk exists in the underlying CAS store. Thus it's mainly useful for internal use when communicating between Zen store instances
*
* Using this interface for adding CAS chunks makes little sense except for testing purposes as garbage collection may reap anything you add
* before anything ever gets to access it
*/
class HttpCasService : public HttpService
{
public:
explicit HttpCasService(CasStore& Store);
~HttpCasService() = default;
virtual const char* BaseUri() const override;
virtual void HandleRequest(zen::HttpServerRequest& Request) override;
private:
CasStore& m_CasStore;
HttpRequestRouter m_Router;
};
} // namespace zen
|