/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 meta_event; option go_package = "github.com/apache/incubator-horaedb-proto/golang/pkg/metaeventpb"; import "common.proto"; import "meta_service.proto"; // The service is hosted by HoraeDB to handle the events from HoraeMeta. 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; } 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; }