- Checkpointing work so I can switch computers.

This commit is contained in:
Ian Roddis
2021-08-14 08:36:49 -03:00
parent eb8e530f9a
commit a668bf81f1
2 changed files with 24 additions and 17 deletions

View File

@@ -19,17 +19,11 @@ namespace daggy {
private: private:
void createDescription(); void createDescription();
// void handleRunDAG(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
// DAG Runs
//
void runDAG(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void handleGetDAGRuns(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
// List void handleGetDAGRun(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void getDAGRuns(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
// 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); void handleReady(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);

View File

@@ -38,18 +38,31 @@ namespace daggy {
.response(Http::Code::Ok, "Response to the /ready call") .response(Http::Code::Ok, "Response to the /ready call")
.hide(); .hide();
auto versionPath = desc_.path("/v1"); auto versionPath = desc_.path("/v1");
auto accountsPath = versionPath.path("/accounts"); auto dagPath = versionPath.path("/dag");
/* // Run a DAG
accountsPath dagPath
.route(desc_.get("/all")) .route(desc_.post("/"))
.bind(&BankerService::retrieveAllAccounts, this) .bind(&Server::handleRunDAG, this)
.produces(MIME(Application, Json), MIME(Application, Xml)) .produces(MIME(Application, Json), MIME(Application, Xml))
.response(Http::Code::Ok, "The list of all account"); .response(Http::Code::Ok, "Run a DAG");
*/
// List all DAG runs
dagPath
.route(desc_.get("/"))
.bind(&Server::handleGetDAGRuns, this)
.produces(MIME(Application, Json), MIME(Application, Xml))
.response(Http::Code::Ok, "The list of all known DAG Runs");
// List detailed DAG run
dagPath
.route(desc_.get("/{id}"))
.bind(&Server::handleGetDAGRun, this)
.produces(MIME(Application, Json), MIME(Application, Xml))
.response(Http::Code::Ok, "Details of a specific DAG run");
} }
void Server::handleReady(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { void Server::handleReady(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {