Tyler Chatow | a79419d | 2020-08-12 20:12:11 -0700 | [diff] [blame] | 1 | namespace aos.starter; |
| 2 | |
| 3 | enum 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 | |
| 19 | table StarterRpc { |
James Kuszmaul | 293b217 | 2021-11-10 16:20:48 -0800 | [diff] [blame] | 20 | command:Command (id: 0); |
Tyler Chatow | a79419d | 2020-08-12 20:12:11 -0700 | [diff] [blame] | 21 | |
| 22 | // The name of the application to send the command to. Command is ignored if |
| 23 | // the given application does not exist. |
James Kuszmaul | 293b217 | 2021-11-10 16:20:48 -0800 | [diff] [blame] | 24 | 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 Chatow | a79419d | 2020-08-12 20:12:11 -0700 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | root_type StarterRpc; |