Skip to content

Commit

Permalink
Move ServerToCommandMessage to separate section (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsvanlani authored Feb 24, 2022
1 parent b8645da commit 36da919
Showing 1 changed file with 30 additions and 19 deletions.
49 changes: 30 additions & 19 deletions specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,27 +361,11 @@ enum ServerCapabilities {
#### command

This field is set when the server wants the agent to
perform a restart or shutdown command. This field must not be set with other fields
perform a restart or shutdown. This field must not be set with other fields
besides instance_uid or capabilities. All other fields will be ignored and the
agent will execute the command.
agent will execute the command. See [ServerToAgentCommand Message](#servertoagentcommand-message)
for details.

```protobuf
// ServerToAgentCommand is sent from the server to the agent to request that the agent
// perform a command.
message ServerToAgentCommand {
enum CommandType {
// The agent should restart. This request will be ignored if the agent does not
// support restart.
Restart = 0;
// The agent should shutdown. This request will be ignored if the agent does not
// support shutdown. Shutdown is permanent and the agent will no longer be running
// or connected to the management server.
Shutdown = 1;
}
CommandType type = 1;
}
```


<h2 id="servererrorresponse-message">ServerErrorResponse Message</h2>
Expand Down Expand Up @@ -432,6 +416,33 @@ Error message, typically human readable.

Additional [RetryInfo](#throttling) message about retrying if type==UNAVAILABLE.

<h2 id="servertoagentcommand-message">ServerToAgentCommand Message</h2>


The message has the following structure:

```protobuf
// ServerToAgentCommand is sent from the server to the agent to request that the agent
// perform a command.
message ServerToAgentCommand {
enum CommandType {
// The agent should restart. This request will be ignored if the agent does not
// support restart.
Restart = 0;
// The agent should shutdown. This request will be ignored if the agent does not
// support shutdown. Shutdown is permanent and the agent will no longer be running
// or connected to the management server.
Shutdown = 1;
}
CommandType type = 1;
}
```

The ServerToAgentCommand message is sent when the Server wants the Agent to restart or shutdown.
This message must only contain the command, instance_uid, and capabilities fields. All other fields
will be ignored.

# Operation


Expand Down

0 comments on commit 36da919

Please sign in to comment.