blob: 0279f719aa42a978ec946f4d541a872b071843e3 [file] [log] [blame]
syntax = "proto3";
package xos;
import "google/protobuf/empty.proto";
import "annotations.proto";
message Xproto {
string filename = 1;
string contents = 2;
}
message DeclFile {
string filename = 1;
string contents = 2;
};
message AtticFile {
string filename = 1;
string contents = 2;
};
message APIConvenienceFile {
string filename = 1;
string contents = 2;
};
message LoadModelsRequest {
string name = 1;
string version = 2;
repeated Xproto xprotos = 3;
repeated DeclFile decls = 4;
repeated AtticFile attics = 5;
repeated APIConvenienceFile convenience_methods = 6;
};
message ListConvenienceMethodsReply {
repeated APIConvenienceFile convenience_methods = 1;
}
message LoadModelsReply {
enum LoadModelsStatus {
SUCCESS = 0;
ERROR = 1;
}
LoadModelsStatus status = 1;
};
message UnloadModelsRequest {
string name = 1;
string version = 2;
};
message ServiceModelStatus {
string name = 1;
string version = 2;
string state = 3;
};
message LoadStatusReply {
int32 model_status = 1;
string model_output = 2;
repeated ServiceModelStatus services = 3;
}
service dynamicload {
rpc LoadModels(LoadModelsRequest) returns (LoadModelsReply) {
option (googleapi.http) = {
post: "/xosapi/v1/dynamicload/load_models"
body: "*"
};
}
rpc UnloadModels(UnloadModelsRequest) returns (LoadModelsReply) {
option (googleapi.http) = {
post: "/xosapi/v1/dynamicload/unload_models"
body: "*"
};
}
rpc GetLoadStatus(google.protobuf.Empty) returns (LoadStatusReply) {
option (googleapi.http) = {
get: "/xosapi/v1/dynamicload/load_status"
};
}
rpc GetConvenienceMethods(google.protobuf.Empty) returns (ListConvenienceMethodsReply) {
option (googleapi.http) = {
// NOTE do we need to expose this via rest? maybe for debug...
get: "/xosapi/v1/dynamicload/convenience_methods"
};
}
};