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/starter_rpc.fbs b/aos/starter/starter_rpc.fbs
new file mode 100644
index 0000000..0e72cff
--- /dev/null
+++ b/aos/starter/starter_rpc.fbs
@@ -0,0 +1,27 @@
+namespace aos.starter;
+
+enum Command : short {
+ // Requests that the application move into the RUNNING state. Skips delay if
+ // WAITING, starts if STOPPED, no-op if STARTING or RUNNING.
+ START,
+
+ // Requests that the application shut down and become STOPPED. Application
+ // will not automatically restart unless a START command is sent. Cancels
+ // start if WAITING, kills application gracefully with timeout if STARTING or
+ // RUNNING, no-op if STOPPING or STOPPED.
+ STOP,
+
+ // Performs the equivalent of a STOP, followed by a START operation.
+ // Application restarts immediately (no WAITING delay).
+ RESTART,
+}
+
+table StarterRpc {
+ command : Command;
+
+ // The name of the application to send the command to. Command is ignored if
+ // the given application does not exist.
+ name: string;
+}
+
+root_type StarterRpc;