Merge pull request #8627 from influxdata/savage/define-get-tables-request-rpc
feat(proto): Define GetTables RPC for TableServicepull/24376/head
commit
5b48b4983b
|
@ -5,6 +5,9 @@ option go_package = "github.com/influxdata/iox/table/v1";
|
|||
import "influxdata/iox/partition_template/v1/template.proto";
|
||||
|
||||
service TableService {
|
||||
// Get tables within a namespace
|
||||
rpc GetTables(GetTablesRequest) returns (GetTablesResponse);
|
||||
|
||||
// Create a table in a namespace
|
||||
rpc CreateTable(CreateTableRequest) returns (CreateTableResponse);
|
||||
}
|
||||
|
@ -41,3 +44,13 @@ message Table {
|
|||
// The partitioning scheme applied to writes for this table
|
||||
influxdata.iox.partition_template.v1.PartitionTemplate partition_template = 4;
|
||||
}
|
||||
|
||||
message GetTablesRequest {
|
||||
// Name of the namespace to list tables for.
|
||||
string namespace_name = 1;
|
||||
}
|
||||
|
||||
message GetTablesResponse {
|
||||
// Tables contained within the namespace.
|
||||
repeated Table tables = 1;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,14 @@ impl TableService {
|
|||
|
||||
#[tonic::async_trait]
|
||||
impl table_service_server::TableService for TableService {
|
||||
// List tables for a namespace
|
||||
async fn get_tables(
|
||||
&self,
|
||||
_request: Request<GetTablesRequest>,
|
||||
) -> Result<Response<GetTablesResponse>, Status> {
|
||||
Err(tonic::Status::unimplemented("not yet implemented"))
|
||||
}
|
||||
|
||||
// create a table
|
||||
async fn create_table(
|
||||
&self,
|
||||
|
|
Loading…
Reference in New Issue