blob: bbf0605bda6a7af151806eb58caffd58ab817ab6 [file] [log] [blame]
Tyler Chatowa79419d2020-08-12 20:12:11 -07001namespace aos.starter;
2
3enum Command : short {
4 // Requests that the application move into the RUNNING state. Skips delay if
5 // WAITING, starts if STOPPED, no-op if STARTING or RUNNING.
6 START,
7
8 // Requests that the application shut down and become STOPPED. Application
9 // will not automatically restart unless a START command is sent. Cancels
10 // start if WAITING, kills application gracefully with timeout if STARTING or
11 // RUNNING, no-op if STOPPING or STOPPED.
12 STOP,
13
14 // Performs the equivalent of a STOP, followed by a START operation.
15 // Application restarts immediately (no WAITING delay).
16 RESTART,
17}
18
19table StarterRpc {
James Kuszmaul293b2172021-11-10 16:20:48 -080020 command:Command (id: 0);
Tyler Chatowa79419d2020-08-12 20:12:11 -070021
22 // The name of the application to send the command to. Command is ignored if
23 // the given application does not exist.
James Kuszmaul293b2172021-11-10 16:20:48 -080024 name:string (id: 1);
25
26 // This set of nodes to start/stop the application on. If empty, indicates that applications
27 // should be restarted on all nodes.
28 nodes:[string] (id: 2);
Tyler Chatowa79419d2020-08-12 20:12:11 -070029}
30
31root_type StarterRpc;