Skip to content

Commit

Permalink
Add simulation logs rpc (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkrull-ansys authored Dec 13, 2024
1 parent 52bd8e6 commit 5a15850
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 34 deletions.
2 changes: 1 addition & 1 deletion ansys/api/additive/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.2-dev0
3.0.0-dev0
20 changes: 0 additions & 20 deletions ansys/api/additive/v0/about.proto

This file was deleted.

12 changes: 12 additions & 0 deletions ansys/api/additive/v0/additive_domain.proto
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,16 @@ message Microstructure3DInput {
message Microstructure3DResult {
bytes three_d_vtk = 1;
MicrostructureResult two_d_result = 2;
}

// DownloadFileResponse is used to transfer a file in chunks from
// the server to a client. Content and content_md5 may be empty
// if only a progress message is sent. It is defined here because
// it is used in multiple services.
message DownloadFileResponse {
string file_name = 1; // name of file without path
uint64 total_size = 2; // total file size in bytes
bytes content = 3; // chunk of file content
string content_md5 = 4; // md5 hash of content
Progress progress = 10; // download progress
}
24 changes: 24 additions & 0 deletions ansys/api/additive/v0/additive_server_info.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
syntax = "proto3";

package ansys.api.additive.v0.about;

option csharp_namespace = "Ansys.Api.Additive";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "ansys/api/additive/v0/additive_domain.proto";

service ServerInfoService {
rpc About (google.protobuf.Empty) returns (AboutResponse) {
option (google.api.http) = {
get: "/about"
};
}

rpc ServerLogs(google.protobuf.Empty) returns (stream DownloadFileResponse);
}

message AboutResponse {
map<string, string> metadata = 1;
}


16 changes: 3 additions & 13 deletions ansys/api/additive/v0/additive_simulation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ service SimulationService {

rpc DownloadFile(DownloadFileRequest) returns (stream DownloadFileResponse);

rpc DownloadLogs(DownloadLogsRequest) returns (stream DownloadFileResponse);
rpc SimulationLogs(SimulationLogsRequest) returns (stream DownloadFileResponse);

rpc Mesh(MeshRequest) returns (google.longrunning.Operation) {
option (google.longrunning.operation_info) = {
Expand Down Expand Up @@ -74,18 +74,8 @@ message DownloadFileRequest {
string remote_file_name = 1; // full path to file on server
}

message DownloadLogsRequest {
}

// DownloadFileResponse is used to transfer a file in chunks from
// the server to a client. Content and content_md5 may be empty
// if only a progress message is sent.
message DownloadFileResponse {
string file_name = 1; // name of file without path
uint64 total_size = 2; // total file size in bytes
bytes content = 3; // chunk of file content
string content_md5 = 4; // md5 hash of content
Progress progress = 10; // download progress
message SimulationLogsRequest {
string id = 1; // id of the simulation
}

message MeshRequest {
Expand Down

0 comments on commit 5a15850

Please sign in to comment.