feat: kill process rpc service (#244)
* feat/kill-process: ### Add KillProcess RPC Method - **Added `KillProcess` RPC Method**: Introduced a new RPC method `KillProcess` in the `Frontend` service to allow killing a running process on the frontend. - Updated files: `server.grpc.pb.cc`, `server.grpc.pb.h`, `server.pb.cc`, `server.pb.h`, `server.proto` - Added new request and response messages: `KillProcessRequest` and `KillProcessResponse`. - **Java Bindings**: Updated Java bindings to include the new `KillProcess` method. - Updated file: `Server.java` * feat/kill-process: **Update `server.proto` for KillProcessRequest and KillProcessResponse** - Added `server_addr` field to `KillProcessRequest` for specifying the frontend server address. - Changed field numbers for `catalog` and `process_id` in `KillProcessRequest`. - Enhanced `KillProcessResponse` to include a `found` boolean indicating if the target process was located. Signed-off-by: Lei, HUANG <mrsatangel@gmail.com> * rename found to success --------- Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
This commit is contained in:
@@ -23,6 +23,8 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/front
|
||||
service Frontend {
|
||||
// List all running processes on frontend.
|
||||
rpc ListProcess(ListProcessRequest) returns (ListProcessResponse);
|
||||
// Kill a running process on frontend.
|
||||
rpc KillProcess(KillProcessRequest) returns (KillProcessResponse);
|
||||
}
|
||||
|
||||
message ListProcessRequest {
|
||||
@@ -33,6 +35,20 @@ message ListProcessResponse {
|
||||
repeated ProcessInfo processes = 1;
|
||||
}
|
||||
|
||||
message KillProcessRequest {
|
||||
// Frontend server address of process.
|
||||
string server_addr = 1;
|
||||
// Catalog of process to kill.
|
||||
string catalog = 2;
|
||||
// ID of process to kill.
|
||||
uint64 process_id = 3;
|
||||
}
|
||||
|
||||
message KillProcessResponse {
|
||||
// Whether targeting process is successfully killed
|
||||
bool success = 1;
|
||||
}
|
||||
|
||||
message ProcessInfo {
|
||||
// ID.
|
||||
uint64 id = 1;
|
||||
|
||||
Reference in New Issue
Block a user