Skip to content

Commit

Permalink
feat: added generic query mode
Browse files Browse the repository at this point in the history
Signed-off-by: AlexsJones <[email protected]>
  • Loading branch information
AlexsJones committed Sep 20, 2024
1 parent af12c9f commit 3bf45b3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions protobuf/schema/v1/server_analyzer_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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) = {
Expand Down

0 comments on commit 3bf45b3

Please sign in to comment.