syntax = "proto3"; package meta_event; option go_package = "github.com/CeresDB/ceresdbproto/golang/pkg/metaeventpb"; import "common.proto"; import "meta_service.proto"; // The service is hosted by CeresDB to handle the events from CeresMeta. service MetaEventService { rpc OpenShard(OpenShardRequest) returns (OpenShardResponse) {} rpc CloseShard(CloseShardRequest) returns (CloseShardResponse) {} rpc CreateTableOnShard(CreateTableOnShardRequest) returns (CreateTableOnShardResponse) {} rpc DropTableOnShard(DropTableOnShardRequest) returns (DropTableOnShardResponse) {} rpc OpenTableOnShard(OpenTableOnShardRequest) returns (OpenTableOnShardResponse) {} rpc CloseTableOnShard(CloseTableOnShardRequest) returns (CloseTableOnShardResponse) {} rpc SplitShard(SplitShardRequest) returns (SplitShardResponse) {} rpc MergeShards(MergeShardsRequest) returns (MergeShardsResponse) {} rpc ChangeShardRole(ChangeShardRoleRequest) returns (ChangeShardRoleResponse) {} } message UpdateShardInfo { meta_service.ShardInfo curr_shard_info = 1; // Deprecated: This field is deprecated. // Use version in ShardInfo to get the current version instead. uint64 prev_version = 2; } message OpenShardRequest { meta_service.ShardInfo shard = 1; } message OpenShardResponse { common.ResponseHeader header = 1; } message CloseShardRequest { uint32 shard_id = 1; } message CloseShardResponse { common.ResponseHeader header = 1; } message CreateTableOnShardRequest { UpdateShardInfo update_shard_info = 1; meta_service.TableInfo table_info = 2; bytes encoded_schema = 3; string engine = 4; bool create_if_not_exist = 5; map options = 6; } message CreateTableOnShardResponse { common.ResponseHeader header = 1; uint64 latest_shard_version = 2; } message DropTableOnShardRequest { UpdateShardInfo update_shard_info = 1; meta_service.TableInfo table_info = 2; } message DropTableOnShardResponse { common.ResponseHeader header = 1; uint64 latest_shard_version = 2; } message OpenTableOnShardRequest { UpdateShardInfo update_shard_info = 1; meta_service.TableInfo table_info = 2; } message OpenTableOnShardResponse { common.ResponseHeader header = 1; } message CloseTableOnShardRequest { UpdateShardInfo update_shard_info = 1; meta_service.TableInfo table_info = 2; } message CloseTableOnShardResponse { common.ResponseHeader header = 1; } message SplitShardRequest {} message SplitShardResponse { common.ResponseHeader header = 1; } message MergeShardsRequest {} message MergeShardsResponse { common.ResponseHeader header = 1; } message ChangeShardRoleRequest {} message ChangeShardRoleResponse { common.ResponseHeader header = 1; } message ShardLockValue { string node_name = 1; }