From 629c248c22c49f853ac08600f0b041707b4cfe98 Mon Sep 17 00:00:00 2001 From: Time Hoo Date: Fri, 18 Nov 2022 11:30:20 +0800 Subject: [PATCH] add getOverview --- hstream.proto | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/hstream.proto b/hstream.proto index ee0cf40..0e747d8 100644 --- a/hstream.proto +++ b/hstream.proto @@ -33,10 +33,14 @@ service HStreamApi { // Shard APIs rpc ListShards(ListShardsRequest) returns (ListShardsResponse) {} + rpc ListSubscriptions(ListSubscriptionsRequest) + returns (ListSubscriptionsResponse) {} rpc CreateShardReader(CreateShardReaderRequest) returns (CreateShardReaderResponse) {} rpc LookupShardReader(LookupShardReaderRequest) returns (LookupShardReaderResponse) {} + rpc ListShardReaders(ListShardReadersRequest) + returns (ListShardReadersResponse) {} rpc ReadShard(ReadShardRequest) returns (ReadShardResponse) {} rpc DeleteShardReader(DeleteShardReaderRequest) returns (google.protobuf.Empty) {} @@ -58,6 +62,7 @@ service HStreamApi { rpc DescribeCluster(google.protobuf.Empty) returns (DescribeClusterResponse) { } rpc LookupResource(LookupResourceRequest) returns (ServerNode) {} + rpc GetOverview(GetOverviewRequest) returns (GetOverviewResponse) {} // Admin Command rpc SendAdminCommand(AdminCommandRequest) returns (AdminCommandResponse); @@ -105,8 +110,6 @@ service HStreamApi { rpc GetView(GetViewRequest) returns (View) {} rpc DeleteView(DeleteViewRequest) returns (google.protobuf.Empty) {} - // overvew related apis - // rpc GetOverview(GetOverviewRequest) returns (GetOverviewResponse) {} // FIXME: (store)node related apis rpc ListNodes(ListNodesRequest) returns (ListNodesResponse) {} @@ -308,8 +311,13 @@ message ReadShardRequest { uint32 maxRecords = 2; } +message ListShardReadersRequest {} +message ListShardReadersResponse { repeated ShardReader shardReaders = 1; } + message DeleteShardReaderRequest { string readerId = 1; } +message ShardReader { string id = 1; } + message ReadShardResponse { repeated ReceivedRecord receivedRecords = 1; } message TerminateQueriesRequest { @@ -390,6 +398,23 @@ message View { repeated string schema = 5; } +// Overview related +message GetOverviewRequest {} + +message GetOverviewResponse { + string protocolVersion = 1; + string serverVersion = 2; + repeated ServerNodeStatus serverNodesStatus = 3; + uint64 clusterUpTime = 4; + repeated Stream allStreams = 5; + repeated Subscription allSubscriptions = 6; + repeated Shard allShards = 7; + repeated ShardReader allShardReaders = 8; + repeated Connector allConnectors = 9; + repeated View allViews = 10; + repeated Query allQueries = 11; +} + // Nodes related Request and Response message GetNodeRequest { int32 id = 1; }