Add event loop application starter
New application starter reads a configuration file with the list of
applications and their properties (arguments, binary name, etc.) and
manages starting and restarting them. The status of applications are
reported on an event loop channel and they can be controlled with a
separate starter_cmd tool.
Change-Id: I7691840be38dc28887e48efcdff7926590710eb7
diff --git a/aos/starter/starterd.cc b/aos/starter/starterd.cc
new file mode 100644
index 0000000..66786a9
--- /dev/null
+++ b/aos/starter/starterd.cc
@@ -0,0 +1,20 @@
+#include "aos/init.h"
+#include "gflags/gflags.h"
+#include "starterd_lib.h"
+
+DEFINE_string(config, "./config.json", "File path of aos configuration");
+
+int main(int argc, char **argv) {
+ aos::InitGoogle(&argc, &argv);
+
+ aos::FlatbufferDetachedBuffer<aos::Configuration> config =
+ aos::configuration::ReadConfig(FLAGS_config);
+
+ const aos::Configuration *config_msg = &config.message();
+
+ aos::starter::Starter starter(config_msg);
+
+ starter.Run();
+
+ return 0;
+}