feat: frontend server (#242)

* feat/frontend-server
 ### Add Frontend Service Protocol Buffers
 - Introduced a new Protocol Buffers file `server.proto` in `proto/greptime/v1/frontend/`.
 - Defined the `Frontend` service with an RPC method `ListProcess`.
 - Added message definitions for `ListProcessRequest`, `ListProcessResponse`, and `ProcessInfo`.
 - Included fields for process ID, catalog, schema, query, start timestamp, and client information in `ProcessInfo`.

Signed-off-by: Lei, HUANG <lhuang@greptime.com>

* feat/frontend-server:
 ### Update `server.proto` in `greptime/v1/frontend`

 - Added a newline at the end of the `ProcessInfo` message definition in `server.proto`.

Signed-off-by: Lei, HUANG <lhuang@greptime.com>

* feat/frontend-server:
 Add new proto file to build script

 - Updated `build.rs` to include `proto/greptime/v1/frontend/server.proto` in the build process.

Signed-off-by: Lei, HUANG <lhuang@greptime.com>

* add frontend mod

Signed-off-by: Lei, HUANG <lhuang@greptime.com>

* feat/frontend-server:
 **Add Frontend Info to ProcessInfo**

 - Updated `server.proto` to include a new field `frontend` in the `ProcessInfo` message, providing additional frontend information for processes.

Signed-off-by: Lei, HUANG <lhuang@greptime.com>

* feat/frontend-server:
 Update `server.proto` to modify data types and field names

 - Changed the data type of `id` from `uint64` to `string` in `ProcessInfo`.
 - Renamed field `schema` to `schemas` in `ProcessInfo`.

Signed-off-by: Lei, HUANG <lhuang@greptime.com>

* -

Signed-off-by: Lei, HUANG <lhuang@greptime.com>

* add catalog to ListProcessRequest

---------

Signed-off-by: Lei, HUANG <lhuang@greptime.com>
This commit is contained in:
Lei, HUANG
2025-06-12 10:45:14 +08:00
committed by GitHub
parent 454c52634c
commit 5f6119ac79
9 changed files with 5585 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
// Copyright 2023 Greptime Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package greptime.v1.frontend;
option java_package = "io.greptime.v1.frontend";
option java_outer_classname = "Server";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/frontend";
service Frontend {
// List all running processes on frontend.
rpc ListProcess(ListProcessRequest) returns (ListProcessResponse);
}
message ListProcessRequest {
string catalog = 1;
}
message ListProcessResponse {
repeated ProcessInfo processes = 1;
}
message ProcessInfo {
// ID.
uint64 id = 1;
// Catalog of process.
string catalog = 2;
// Involved schemas.
repeated string schemas = 3;
// Query string.
string query = 4;
// Start time.
int64 start_timestamp = 5;
// Client info.
string client = 6;
// Frontend info of process.
string frontend = 7;
}