40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
#include <iostream>
|
|
#include <fstream>
|
|
|
|
#include <argparse.hpp>
|
|
|
|
#include <daggy/Server.hpp>
|
|
|
|
// Add executors here
|
|
#include <daggy/executors/task/ForkingTaskExecutor.hpp>
|
|
|
|
// Add loggers here
|
|
#include <daggy/loggers/dag_run/OStreamLogger.hpp>
|
|
#include <daggy/loggers/dag_run/FileSystemLogger.hpp>
|
|
|
|
struct Options {
|
|
Pistache::IP listenAddress = Pistache::Ipv4::any();
|
|
uint16_t listenPort = 2503;
|
|
size_t webThreads = 50;
|
|
size_t dagThreads = 20;
|
|
|
|
std::unique_ptr<daggy::executors::task::TaskExecutor> executor;
|
|
std::unique_ptr<daggy::loggers::dag_run::DAGRunLogger> logger;
|
|
};
|
|
|
|
int main(int argc, char **argv) {
|
|
argparse::ArgumentParser args("Daggy");
|
|
|
|
args.add_argument("-v", "--verbose");
|
|
args.add_argument("-c", "--config")
|
|
.help("Config file");
|
|
args.add_argument("--ip")
|
|
.help("IP address to listen to");
|
|
args.add_argument("--port")
|
|
.help("Port to listen to")
|
|
.action([](const std::string &value) { return std::stoi(value); });
|
|
|
|
// Set some defaults
|
|
|
|
// daggy::Server endpoint(10);
|
|
} |