- Checkpointing work so I can switch computers.

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

View File

@@ -19,17 +19,11 @@ namespace daggy {
private:
void createDescription();
//
// DAG Runs
//
void handleRunDAG(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void runDAG(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void handleGetDAGRuns(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
// List
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 handleGetDAGRun(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")
.hide();
auto versionPath = desc_.path("/v1");
auto accountsPath = versionPath.path("/accounts");
auto dagPath = versionPath.path("/dag");
/*
accountsPath
.route(desc_.get("/all"))
.bind(&BankerService::retrieveAllAccounts, this)
.produces(MIME(Application, Json), MIME(Application, Xml))
.response(Http::Code::Ok, "The list of all account");
*/
// Run a DAG
dagPath
.route(desc_.post("/"))
.bind(&Server::handleRunDAG, this)
.produces(MIME(Application, Json), MIME(Application, Xml))
.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) {