aboutsummaryrefslogtreecommitdiff
path: root/zenserver/monitoring/httpstatus.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-10-04 15:24:53 +0200
committerStefan Boberg <[email protected]>2021-10-04 15:25:33 +0200
commitcceed531be3fc89f034e79a599a72e28ebe7d32b (patch)
treeb53c473c3d9899bc97b0b90336882f37f8bcfcf3 /zenserver/monitoring/httpstatus.cpp
parentclang-format (diff)
downloadzen-cceed531be3fc89f034e79a599a72e28ebe7d32b.tar.xz
zen-cceed531be3fc89f034e79a599a72e28ebe7d32b.zip
monitoring: added stubs for /stats and /status endpoints
this is a tactical check-in to allow me to merge some other changes
Diffstat (limited to 'zenserver/monitoring/httpstatus.cpp')
-rw-r--r--zenserver/monitoring/httpstatus.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/zenserver/monitoring/httpstatus.cpp b/zenserver/monitoring/httpstatus.cpp
new file mode 100644
index 000000000..c18bf6c1f
--- /dev/null
+++ b/zenserver/monitoring/httpstatus.cpp
@@ -0,0 +1,33 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+#include "httpstatus.h"
+
+namespace zen {
+
+HttpStatusService::HttpStatusService() : m_Log(logging::Get("status"))
+{
+}
+
+HttpStatusService::~HttpStatusService()
+{
+}
+
+const char*
+HttpStatusService::BaseUri() const
+{
+ return "/statUs/";
+}
+
+void
+HttpStatusService::HandleRequest(HttpServerRequest& Request)
+{
+ using namespace std::literals;
+
+ switch (Request.RequestVerb())
+ {
+ case HttpVerb::kGet:
+ return Request.WriteResponse(HttpResponseCode::OK, HttpContentType::kText, u8"OK!"sv);
+ }
+}
+
+} // namespace zen