diff --git a/protobuf/schema/v1/server_analyzer_service.proto b/protobuf/schema/v1/server_analyzer_service.proto index ddf9cdc..3b482b1 100644 --- a/protobuf/schema/v1/server_analyzer_service.proto +++ b/protobuf/schema/v1/server_analyzer_service.proto @@ -51,8 +51,29 @@ message Error { int32 code = 2; } +message QueryRequest { + string backend = 1; + string query = 2; +} + +message QueryResponse { + Error error = 1; + string response = 2; +} + service ServerAnalyzerService { + + rpc Query(QueryRequest) returns (QueryResponse) { + option (google.api.http) = { + // this is url, for RESTfull/JSON api and method + // this line means when a HTTP post request comes with "/v1/query" call this rpc method over this service + // the request body QueryRequest can be passed in to parameterize the request + post: "/v1/query" + body: "*" + }; + } + rpc Analyze(AnalyzeRequest) returns (AnalyzeResponse) { // option type is http option (google.api.http) = {