feat: add auto update
This commit is contained in:
@ -75,12 +75,30 @@ message LogChunk {
|
||||
int64 timestamp = 4;
|
||||
}
|
||||
|
||||
message FileResult {
|
||||
string command_id = 1;
|
||||
bool success = 2;
|
||||
string error = 3;
|
||||
bytes content = 4; // for ReadFile: file content; for ListDir: JSON-encoded entries
|
||||
}
|
||||
|
||||
message UpdateCheckResult {
|
||||
string command_id = 1;
|
||||
string container_id = 2;
|
||||
bool update_available = 3;
|
||||
string current_digest = 4;
|
||||
string remote_digest = 5;
|
||||
string error = 6;
|
||||
}
|
||||
|
||||
message AgentMessage {
|
||||
oneof payload {
|
||||
AgentHandshake handshake = 1;
|
||||
ContainerSnapshot snapshot = 2;
|
||||
CommandResult result = 3;
|
||||
LogChunk log_chunk = 4;
|
||||
AgentHandshake handshake = 1;
|
||||
ContainerSnapshot snapshot = 2;
|
||||
CommandResult result = 3;
|
||||
LogChunk log_chunk = 4;
|
||||
FileResult file_result = 5;
|
||||
UpdateCheckResult update_check_result = 6;
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,10 +125,54 @@ message StreamLogsCommand {
|
||||
int32 tail = 4;
|
||||
}
|
||||
|
||||
message ListDirCommand {
|
||||
string command_id = 1;
|
||||
string path = 2;
|
||||
}
|
||||
|
||||
message ReadFileCommand {
|
||||
string command_id = 1;
|
||||
string path = 2;
|
||||
}
|
||||
|
||||
message WriteFileCommand {
|
||||
string command_id = 1;
|
||||
string path = 2;
|
||||
bytes content = 3;
|
||||
}
|
||||
|
||||
message ExecComposeCommand {
|
||||
string command_id = 1;
|
||||
string path = 2; // directory containing docker-compose.yaml
|
||||
string action = 3; // "up", "down", "pull"
|
||||
}
|
||||
|
||||
message CreateDirCommand {
|
||||
string command_id = 1;
|
||||
string path = 2;
|
||||
}
|
||||
|
||||
message CheckUpdateCommand {
|
||||
string command_id = 1;
|
||||
string container_id = 2;
|
||||
}
|
||||
|
||||
message UpdateContainerCommand {
|
||||
string command_id = 1;
|
||||
string container_id = 2;
|
||||
}
|
||||
|
||||
message ServerMessage {
|
||||
oneof payload {
|
||||
ContainerCommand container_cmd = 1;
|
||||
StreamLogsCommand stream_logs = 2;
|
||||
ContainerCommand container_cmd = 1;
|
||||
StreamLogsCommand stream_logs = 2;
|
||||
ListDirCommand list_dir = 3;
|
||||
ReadFileCommand read_file = 4;
|
||||
WriteFileCommand write_file = 5;
|
||||
ExecComposeCommand exec_compose = 6;
|
||||
CreateDirCommand create_dir = 7;
|
||||
CheckUpdateCommand check_update = 8;
|
||||
UpdateContainerCommand update_container = 9;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user