Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move ServerToCommandMessage to separate section #2

Merged
merged 1 commit into from
Feb 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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