- More cmake cleanup
This commit is contained in:
@@ -2,6 +2,5 @@ project(daggy)
|
||||
|
||||
file(GLOB_RECURSE SOURCES src/*.cpp)
|
||||
add_library(${PROJECT_NAME} STATIC ${SOURCES})
|
||||
include_directories(${PISTACHE_INCLUDE_DIR})
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC include)
|
||||
target_link_libraries(${PROJECT_NAME} pistache pthread rapidjson magicEnum)
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <pistache/endpoint.h>
|
||||
#include <pistache/http.h>
|
||||
|
||||
// #include <pistache/thirdparty/serializer/rapidjson.h>
|
||||
#include <rapidjson/document.h>
|
||||
|
||||
namespace daggy {
|
||||
class Server {
|
||||
@@ -19,18 +19,6 @@ namespace daggy {
|
||||
private:
|
||||
void createDescription();
|
||||
|
||||
//
|
||||
// DAG Definition handlers
|
||||
//
|
||||
|
||||
void listDAGs(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
|
||||
void upsertDAG(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
|
||||
void deleteDAG(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
|
||||
void getDAG(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
|
||||
//
|
||||
// DAG Runs
|
||||
//
|
||||
@@ -43,9 +31,10 @@ namespace daggy {
|
||||
// Get status of specific run
|
||||
void getDAGRun(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
|
||||
void handleReady(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
|
||||
|
||||
Pistache::Http::Endpoint endpoint_;
|
||||
Pistache::Rest::Description desc_;
|
||||
Pistache::Rest::Router router_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,13 +32,11 @@ namespace daggy {
|
||||
.produces(MIME(Application, Json))
|
||||
.consumes(MIME(Application, Json));
|
||||
|
||||
/*
|
||||
desc_
|
||||
.route(desc_.get("/ready"))
|
||||
.bind(&Generic::handleReady)
|
||||
.response(Http::Code::Ok, "Response to the /ready call")
|
||||
.hide();
|
||||
*/
|
||||
.route(desc_.get("/ready"))
|
||||
.bind(&Server::handleReady, this)
|
||||
.response(Http::Code::Ok, "Response to the /ready call")
|
||||
.hide();
|
||||
|
||||
auto versionPath = desc_.path("/v1");
|
||||
|
||||
@@ -53,4 +51,8 @@ namespace daggy {
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
void Server::handleReady(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
|
||||
response.send(Pistache::Http::Code::Ok, "All good here");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user