refactor: remove router rpc (#114)

This commit is contained in:
Weny Xu
2023-10-31 13:12:55 +09:00
committed by GitHub
parent 1d7dc6f18b
commit c27b3844e5
10 changed files with 176 additions and 4401 deletions
-61
View File
@@ -23,67 +23,6 @@ namespace greptime {
namespace v1 {
namespace meta {
static const char* Router_method_names[] = {
"/greptime.v1.meta.Router/Route",
};
std::unique_ptr< Router::Stub> Router::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
(void)options;
std::unique_ptr< Router::Stub> stub(new Router::Stub(channel, options));
return stub;
}
Router::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
: channel_(channel), rpcmethod_Route_(Router_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
{}
::grpc::Status Router::Stub::Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::greptime::v1::meta::RouteResponse* response) {
return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Route_, context, request, response);
}
void Router::Stub::async::Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response, std::function<void(::grpc::Status)> f) {
::grpc::internal::CallbackUnaryCall< ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Route_, context, request, response, std::move(f));
}
void Router::Stub::async::Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response, ::grpc::ClientUnaryReactor* reactor) {
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Route_, context, request, response, reactor);
}
::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>* Router::Stub::PrepareAsyncRouteRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::meta::RouteResponse, ::greptime::v1::meta::RouteRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Route_, context, request);
}
::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>* Router::Stub::AsyncRouteRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) {
auto* result =
this->PrepareAsyncRouteRaw(context, request, cq);
result->StartCall();
return result;
}
Router::Service::Service() {
AddMethod(new ::grpc::internal::RpcServiceMethod(
Router_method_names[0],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Router::Service, ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Router::Service* service,
::grpc::ServerContext* ctx,
const ::greptime::v1::meta::RouteRequest* req,
::greptime::v1::meta::RouteResponse* resp) {
return service->Route(ctx, req, resp);
}, this)));
}
Router::Service::~Service() {
}
::grpc::Status Router::Service::Route(::grpc::ServerContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response) {
(void) context;
(void) request;
(void) response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
} // namespace greptime
} // namespace v1
} // namespace meta
-264
View File
@@ -44,270 +44,6 @@ namespace greptime {
namespace v1 {
namespace meta {
class Router final {
public:
static constexpr char const* service_full_name() {
return "greptime.v1.meta.Router";
}
class StubInterface {
public:
virtual ~StubInterface() {}
// Fetch routing information for tables. The smallest unit is the complete
// routing information(all regions) of a table.
//
// ```text
// table_1
// table_name
// table_schema
// regions
// region_1
// leader_peer
// follower_peer_1, follower_peer_2
// region_2
// leader_peer
// follower_peer_1, follower_peer_2, follower_peer_3
// region_xxx
// table_2
// ...
// ```
//
virtual ::grpc::Status Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::greptime::v1::meta::RouteResponse* response) = 0;
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::RouteResponse>> AsyncRoute(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::RouteResponse>>(AsyncRouteRaw(context, request, cq));
}
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::RouteResponse>> PrepareAsyncRoute(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::RouteResponse>>(PrepareAsyncRouteRaw(context, request, cq));
}
class async_interface {
public:
virtual ~async_interface() {}
// Fetch routing information for tables. The smallest unit is the complete
// routing information(all regions) of a table.
//
// ```text
// table_1
// table_name
// table_schema
// regions
// region_1
// leader_peer
// follower_peer_1, follower_peer_2
// region_2
// leader_peer
// follower_peer_1, follower_peer_2, follower_peer_3
// region_xxx
// table_2
// ...
// ```
//
virtual void Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response, std::function<void(::grpc::Status)>) = 0;
virtual void Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
};
typedef class async_interface experimental_async_interface;
virtual class async_interface* async() { return nullptr; }
class async_interface* experimental_async() { return async(); }
private:
virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::RouteResponse>* AsyncRouteRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::RouteResponse>* PrepareAsyncRouteRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) = 0;
};
class Stub final : public StubInterface {
public:
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
::grpc::Status Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::greptime::v1::meta::RouteResponse* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>> AsyncRoute(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>>(AsyncRouteRaw(context, request, cq));
}
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>> PrepareAsyncRoute(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>>(PrepareAsyncRouteRaw(context, request, cq));
}
class async final :
public StubInterface::async_interface {
public:
void Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response, std::function<void(::grpc::Status)>) override;
void Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
private:
friend class Stub;
explicit async(Stub* stub): stub_(stub) { }
Stub* stub() { return stub_; }
Stub* stub_;
};
class async* async() override { return &async_stub_; }
private:
std::shared_ptr< ::grpc::ChannelInterface> channel_;
class async async_stub_{this};
::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>* AsyncRouteRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>* PrepareAsyncRouteRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) override;
const ::grpc::internal::RpcMethod rpcmethod_Route_;
};
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
class Service : public ::grpc::Service {
public:
Service();
virtual ~Service();
// Fetch routing information for tables. The smallest unit is the complete
// routing information(all regions) of a table.
//
// ```text
// table_1
// table_name
// table_schema
// regions
// region_1
// leader_peer
// follower_peer_1, follower_peer_2
// region_2
// leader_peer
// follower_peer_1, follower_peer_2, follower_peer_3
// region_xxx
// table_2
// ...
// ```
//
virtual ::grpc::Status Route(::grpc::ServerContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response);
};
template <class BaseClass>
class WithAsyncMethod_Route : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithAsyncMethod_Route() {
::grpc::Service::MarkMethodAsync(0);
}
~WithAsyncMethod_Route() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Route(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestRoute(::grpc::ServerContext* context, ::greptime::v1::meta::RouteRequest* request, ::grpc::ServerAsyncResponseWriter< ::greptime::v1::meta::RouteResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
}
};
typedef WithAsyncMethod_Route<Service > AsyncService;
template <class BaseClass>
class WithCallbackMethod_Route : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithCallbackMethod_Route() {
::grpc::Service::MarkMethodCallback(0,
new ::grpc::internal::CallbackUnaryHandler< ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse>(
[this](
::grpc::CallbackServerContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response) { return this->Route(context, request, response); }));}
void SetMessageAllocatorFor_Route(
::grpc::MessageAllocator< ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse>* allocator) {
::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0);
static_cast<::grpc::internal::CallbackUnaryHandler< ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse>*>(handler)
->SetMessageAllocator(allocator);
}
~WithCallbackMethod_Route() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Route(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual ::grpc::ServerUnaryReactor* Route(
::grpc::CallbackServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) { return nullptr; }
};
typedef WithCallbackMethod_Route<Service > CallbackService;
typedef CallbackService ExperimentalCallbackService;
template <class BaseClass>
class WithGenericMethod_Route : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithGenericMethod_Route() {
::grpc::Service::MarkMethodGeneric(0);
}
~WithGenericMethod_Route() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Route(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
template <class BaseClass>
class WithRawMethod_Route : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithRawMethod_Route() {
::grpc::Service::MarkMethodRaw(0);
}
~WithRawMethod_Route() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Route(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestRoute(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class WithRawCallbackMethod_Route : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithRawCallbackMethod_Route() {
::grpc::Service::MarkMethodRawCallback(0,
new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
[this](
::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Route(context, request, response); }));
}
~WithRawCallbackMethod_Route() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status Route(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual ::grpc::ServerUnaryReactor* Route(
::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; }
};
template <class BaseClass>
class WithStreamedUnaryMethod_Route : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithStreamedUnaryMethod_Route() {
::grpc::Service::MarkMethodStreamed(0,
new ::grpc::internal::StreamedUnaryHandler<
::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse>(
[this](::grpc::ServerContext* context,
::grpc::ServerUnaryStreamer<
::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse>* streamer) {
return this->StreamedRoute(context,
streamer);
}));
}
~WithStreamedUnaryMethod_Route() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
::grpc::Status Route(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with streamed unary
virtual ::grpc::Status StreamedRoute(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::greptime::v1::meta::RouteRequest,::greptime::v1::meta::RouteResponse>* server_unary_streamer) = 0;
};
typedef WithStreamedUnaryMethod_Route<Service > StreamedUnaryService;
typedef Service SplitStreamedService;
typedef WithStreamedUnaryMethod_Route<Service > StreamedService;
};
} // namespace meta
} // namespace v1
} // namespace greptime
+36 -609
View File
@@ -23,35 +23,6 @@ namespace _pbi = _pb::internal;
namespace greptime {
namespace v1 {
namespace meta {
PROTOBUF_CONSTEXPR RouteRequest::RouteRequest(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.table_ids_)*/{}
, /*decltype(_impl_.header_)*/nullptr
, /*decltype(_impl_._cached_size_)*/{}} {}
struct RouteRequestDefaultTypeInternal {
PROTOBUF_CONSTEXPR RouteRequestDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~RouteRequestDefaultTypeInternal() {}
union {
RouteRequest _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RouteRequestDefaultTypeInternal _RouteRequest_default_instance_;
PROTOBUF_CONSTEXPR RouteResponse::RouteResponse(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.peers_)*/{}
, /*decltype(_impl_.table_routes_)*/{}
, /*decltype(_impl_.header_)*/nullptr
, /*decltype(_impl_._cached_size_)*/{}} {}
struct RouteResponseDefaultTypeInternal {
PROTOBUF_CONSTEXPR RouteResponseDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~RouteResponseDefaultTypeInternal() {}
union {
RouteResponse _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RouteResponseDefaultTypeInternal _RouteResponse_default_instance_;
PROTOBUF_CONSTEXPR TableRoute::TableRoute(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.region_routes_)*/{}
@@ -155,28 +126,11 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT
} // namespace meta
} // namespace v1
} // namespace greptime
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[9];
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[7];
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2fmeta_2froute_2eproto = nullptr;
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fmeta_2froute_2eproto = nullptr;
const uint32_t TableStruct_greptime_2fv1_2fmeta_2froute_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteRequest, _impl_.header_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteRequest, _impl_.table_ids_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteResponse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteResponse, _impl_.header_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteResponse, _impl_.peers_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteResponse, _impl_.table_routes_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::TableRoute, _internal_metadata_),
~0u, // no _extensions_
@@ -241,20 +195,16 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2froute_2eproto::offsets[] PROTO
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::TableRouteValue, _impl_.table_route_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::greptime::v1::meta::RouteRequest)},
{ 8, -1, -1, sizeof(::greptime::v1::meta::RouteResponse)},
{ 17, -1, -1, sizeof(::greptime::v1::meta::TableRoute)},
{ 25, -1, -1, sizeof(::greptime::v1::meta::RegionRoute)},
{ 34, -1, -1, sizeof(::greptime::v1::meta::Table)},
{ 43, 51, -1, sizeof(::greptime::v1::meta::Region_AttrsEntry_DoNotUse)},
{ 53, -1, -1, sizeof(::greptime::v1::meta::Region)},
{ 63, -1, -1, sizeof(::greptime::v1::meta::Partition)},
{ 71, -1, -1, sizeof(::greptime::v1::meta::TableRouteValue)},
{ 0, -1, -1, sizeof(::greptime::v1::meta::TableRoute)},
{ 8, -1, -1, sizeof(::greptime::v1::meta::RegionRoute)},
{ 17, -1, -1, sizeof(::greptime::v1::meta::Table)},
{ 26, 34, -1, sizeof(::greptime::v1::meta::Region_AttrsEntry_DoNotUse)},
{ 36, -1, -1, sizeof(::greptime::v1::meta::Region)},
{ 46, -1, -1, sizeof(::greptime::v1::meta::Partition)},
{ 54, -1, -1, sizeof(::greptime::v1::meta::TableRouteValue)},
};
static const ::_pb::Message* const file_default_instances[] = {
&::greptime::v1::meta::_RouteRequest_default_instance_._instance,
&::greptime::v1::meta::_RouteResponse_default_instance_._instance,
&::greptime::v1::meta::_TableRoute_default_instance_._instance,
&::greptime::v1::meta::_RegionRoute_default_instance_._instance,
&::greptime::v1::meta::_Table_default_instance_._instance,
@@ -267,43 +217,34 @@ static const ::_pb::Message* const file_default_instances[] = {
const char descriptor_table_protodef_greptime_2fv1_2fmeta_2froute_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\034greptime/v1/meta/route.proto\022\020greptime"
".v1.meta\032\035greptime/v1/meta/common.proto\""
"m\n\014RouteRequest\022/\n\006header\030\001 \001(\0132\037.grepti"
"me.v1.meta.RequestHeader\022,\n\ttable_ids\030\002 "
"\003(\0132\031.greptime.v1.meta.TableId\"\234\001\n\rRoute"
"Response\0220\n\006header\030\001 \001(\0132 .greptime.v1.m"
"eta.ResponseHeader\022%\n\005peers\030\002 \003(\0132\026.grep"
"time.v1.meta.Peer\0222\n\014table_routes\030\003 \003(\0132"
"\034.greptime.v1.meta.TableRoute\"j\n\nTableRo"
"ute\022&\n\005table\030\001 \001(\0132\027.greptime.v1.meta.Ta"
"ble\0224\n\rregion_routes\030\002 \003(\0132\035.greptime.v1"
".meta.RegionRoute\"q\n\013RegionRoute\022(\n\006regi"
"on\030\001 \001(\0132\030.greptime.v1.meta.Region\022\031\n\021le"
"ader_peer_index\030\002 \001(\004\022\035\n\025follower_peer_i"
"ndexes\030\003 \003(\004\"Z\n\005Table\022\n\n\002id\030\001 \001(\004\022/\n\ntab"
"le_name\030\002 \001(\0132\033.greptime.v1.meta.TableNa"
"me\022\024\n\014table_schema\030\003 \001(\014\"\264\001\n\006Region\022\n\n\002i"
"d\030\001 \001(\004\022\014\n\004name\030\002 \001(\t\022.\n\tpartition\030\003 \001(\013"
"2\033.greptime.v1.meta.Partition\0222\n\005attrs\030d"
" \003(\0132#.greptime.v1.meta.Region.AttrsEntr"
"y\032,\n\nAttrsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 "
"\001(\t:\0028\001\"4\n\tPartition\022\023\n\013column_list\030\001 \003("
"\014\022\022\n\nvalue_list\030\002 \003(\014\"k\n\017TableRouteValue"
"\022%\n\005peers\030\001 \003(\0132\026.greptime.v1.meta.Peer\022"
"1\n\013table_route\030\002 \001(\0132\034.greptime.v1.meta."
"TableRoute2T\n\006Router\022J\n\005Route\022\036.greptime"
".v1.meta.RouteRequest\032\037.greptime.v1.meta"
".RouteResponse\"\000B<Z:github.com/GreptimeT"
"eam/greptime-proto/go/greptime/v1/metab\006"
"proto3"
"j\n\nTableRoute\022&\n\005table\030\001 \001(\0132\027.greptime."
"v1.meta.Table\0224\n\rregion_routes\030\002 \003(\0132\035.g"
"reptime.v1.meta.RegionRoute\"q\n\013RegionRou"
"te\022(\n\006region\030\001 \001(\0132\030.greptime.v1.meta.Re"
"gion\022\031\n\021leader_peer_index\030\002 \001(\004\022\035\n\025follo"
"wer_peer_indexes\030\003 \003(\004\"Z\n\005Table\022\n\n\002id\030\001 "
"\001(\004\022/\n\ntable_name\030\002 \001(\0132\033.greptime.v1.me"
"ta.TableName\022\024\n\014table_schema\030\003 \001(\014\"\264\001\n\006R"
"egion\022\n\n\002id\030\001 \001(\004\022\014\n\004name\030\002 \001(\t\022.\n\tparti"
"tion\030\003 \001(\0132\033.greptime.v1.meta.Partition\022"
"2\n\005attrs\030d \003(\0132#.greptime.v1.meta.Region"
".AttrsEntry\032,\n\nAttrsEntry\022\013\n\003key\030\001 \001(\t\022\r"
"\n\005value\030\002 \001(\t:\0028\001\"4\n\tPartition\022\023\n\013column"
"_list\030\001 \003(\014\022\022\n\nvalue_list\030\002 \003(\014\"k\n\017Table"
"RouteValue\022%\n\005peers\030\001 \003(\0132\026.greptime.v1."
"meta.Peer\0221\n\013table_route\030\002 \001(\0132\034.greptim"
"e.v1.meta.TableRouteB<Z:github.com/Grept"
"imeTeam/greptime-proto/go/greptime/v1/me"
"tab\006proto3"
;
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_deps[1] = {
&::descriptor_table_greptime_2fv1_2fmeta_2fcommon_2eproto,
};
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto = {
false, false, 1166, descriptor_table_protodef_greptime_2fv1_2fmeta_2froute_2eproto,
false, false, 810, descriptor_table_protodef_greptime_2fv1_2fmeta_2froute_2eproto,
"greptime/v1/meta/route.proto",
&descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once, descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_deps, 1, 9,
&descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once, descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_deps, 1, 7,
schemas, file_default_instances, TableStruct_greptime_2fv1_2fmeta_2froute_2eproto::offsets,
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto, file_level_enum_descriptors_greptime_2fv1_2fmeta_2froute_2eproto,
file_level_service_descriptors_greptime_2fv1_2fmeta_2froute_2eproto,
@@ -320,512 +261,6 @@ namespace meta {
// ===================================================================
class RouteRequest::_Internal {
public:
static const ::greptime::v1::meta::RequestHeader& header(const RouteRequest* msg);
};
const ::greptime::v1::meta::RequestHeader&
RouteRequest::_Internal::header(const RouteRequest* msg) {
return *msg->_impl_.header_;
}
void RouteRequest::clear_header() {
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
delete _impl_.header_;
}
_impl_.header_ = nullptr;
}
void RouteRequest::clear_table_ids() {
_impl_.table_ids_.Clear();
}
RouteRequest::RouteRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:greptime.v1.meta.RouteRequest)
}
RouteRequest::RouteRequest(const RouteRequest& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
RouteRequest* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.table_ids_){from._impl_.table_ids_}
, decltype(_impl_.header_){nullptr}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_header()) {
_this->_impl_.header_ = new ::greptime::v1::meta::RequestHeader(*from._impl_.header_);
}
// @@protoc_insertion_point(copy_constructor:greptime.v1.meta.RouteRequest)
}
inline void RouteRequest::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.table_ids_){arena}
, decltype(_impl_.header_){nullptr}
, /*decltype(_impl_._cached_size_)*/{}
};
}
RouteRequest::~RouteRequest() {
// @@protoc_insertion_point(destructor:greptime.v1.meta.RouteRequest)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void RouteRequest::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.table_ids_.~RepeatedPtrField();
if (this != internal_default_instance()) delete _impl_.header_;
}
void RouteRequest::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void RouteRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.meta.RouteRequest)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.table_ids_.Clear();
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
delete _impl_.header_;
}
_impl_.header_ = nullptr;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* RouteRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// .greptime.v1.meta.RequestHeader header = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_header(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .greptime.v1.meta.TableId table_ids = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_table_ids(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* RouteRequest::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.meta.RouteRequest)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// .greptime.v1.meta.RequestHeader header = 1;
if (this->_internal_has_header()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, _Internal::header(this),
_Internal::header(this).GetCachedSize(), target, stream);
}
// repeated .greptime.v1.meta.TableId table_ids = 2;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_table_ids_size()); i < n; i++) {
const auto& repfield = this->_internal_table_ids(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.meta.RouteRequest)
return target;
}
size_t RouteRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.meta.RouteRequest)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .greptime.v1.meta.TableId table_ids = 2;
total_size += 1UL * this->_internal_table_ids_size();
for (const auto& msg : this->_impl_.table_ids_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// .greptime.v1.meta.RequestHeader header = 1;
if (this->_internal_has_header()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.header_);
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RouteRequest::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
RouteRequest::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RouteRequest::GetClassData() const { return &_class_data_; }
void RouteRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<RouteRequest*>(&to_msg);
auto& from = static_cast<const RouteRequest&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.meta.RouteRequest)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.table_ids_.MergeFrom(from._impl_.table_ids_);
if (from._internal_has_header()) {
_this->_internal_mutable_header()->::greptime::v1::meta::RequestHeader::MergeFrom(
from._internal_header());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void RouteRequest::CopyFrom(const RouteRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.meta.RouteRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool RouteRequest::IsInitialized() const {
return true;
}
void RouteRequest::InternalSwap(RouteRequest* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.table_ids_.InternalSwap(&other->_impl_.table_ids_);
swap(_impl_.header_, other->_impl_.header_);
}
::PROTOBUF_NAMESPACE_ID::Metadata RouteRequest::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once,
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[0]);
}
// ===================================================================
class RouteResponse::_Internal {
public:
static const ::greptime::v1::meta::ResponseHeader& header(const RouteResponse* msg);
};
const ::greptime::v1::meta::ResponseHeader&
RouteResponse::_Internal::header(const RouteResponse* msg) {
return *msg->_impl_.header_;
}
void RouteResponse::clear_header() {
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
delete _impl_.header_;
}
_impl_.header_ = nullptr;
}
void RouteResponse::clear_peers() {
_impl_.peers_.Clear();
}
RouteResponse::RouteResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:greptime.v1.meta.RouteResponse)
}
RouteResponse::RouteResponse(const RouteResponse& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
RouteResponse* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.peers_){from._impl_.peers_}
, decltype(_impl_.table_routes_){from._impl_.table_routes_}
, decltype(_impl_.header_){nullptr}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_header()) {
_this->_impl_.header_ = new ::greptime::v1::meta::ResponseHeader(*from._impl_.header_);
}
// @@protoc_insertion_point(copy_constructor:greptime.v1.meta.RouteResponse)
}
inline void RouteResponse::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.peers_){arena}
, decltype(_impl_.table_routes_){arena}
, decltype(_impl_.header_){nullptr}
, /*decltype(_impl_._cached_size_)*/{}
};
}
RouteResponse::~RouteResponse() {
// @@protoc_insertion_point(destructor:greptime.v1.meta.RouteResponse)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void RouteResponse::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.peers_.~RepeatedPtrField();
_impl_.table_routes_.~RepeatedPtrField();
if (this != internal_default_instance()) delete _impl_.header_;
}
void RouteResponse::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void RouteResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.meta.RouteResponse)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.peers_.Clear();
_impl_.table_routes_.Clear();
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
delete _impl_.header_;
}
_impl_.header_ = nullptr;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* RouteResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// .greptime.v1.meta.ResponseHeader header = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_header(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .greptime.v1.meta.Peer peers = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_peers(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
} else
goto handle_unusual;
continue;
// repeated .greptime.v1.meta.TableRoute table_routes = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_table_routes(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* RouteResponse::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.meta.RouteResponse)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// .greptime.v1.meta.ResponseHeader header = 1;
if (this->_internal_has_header()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, _Internal::header(this),
_Internal::header(this).GetCachedSize(), target, stream);
}
// repeated .greptime.v1.meta.Peer peers = 2;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_peers_size()); i < n; i++) {
const auto& repfield = this->_internal_peers(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
}
// repeated .greptime.v1.meta.TableRoute table_routes = 3;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_table_routes_size()); i < n; i++) {
const auto& repfield = this->_internal_table_routes(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.meta.RouteResponse)
return target;
}
size_t RouteResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.meta.RouteResponse)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .greptime.v1.meta.Peer peers = 2;
total_size += 1UL * this->_internal_peers_size();
for (const auto& msg : this->_impl_.peers_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .greptime.v1.meta.TableRoute table_routes = 3;
total_size += 1UL * this->_internal_table_routes_size();
for (const auto& msg : this->_impl_.table_routes_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// .greptime.v1.meta.ResponseHeader header = 1;
if (this->_internal_has_header()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.header_);
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RouteResponse::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
RouteResponse::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RouteResponse::GetClassData() const { return &_class_data_; }
void RouteResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<RouteResponse*>(&to_msg);
auto& from = static_cast<const RouteResponse&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.meta.RouteResponse)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.peers_.MergeFrom(from._impl_.peers_);
_this->_impl_.table_routes_.MergeFrom(from._impl_.table_routes_);
if (from._internal_has_header()) {
_this->_internal_mutable_header()->::greptime::v1::meta::ResponseHeader::MergeFrom(
from._internal_header());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void RouteResponse::CopyFrom(const RouteResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.meta.RouteResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool RouteResponse::IsInitialized() const {
return true;
}
void RouteResponse::InternalSwap(RouteResponse* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.peers_.InternalSwap(&other->_impl_.peers_);
_impl_.table_routes_.InternalSwap(&other->_impl_.table_routes_);
swap(_impl_.header_, other->_impl_.header_);
}
::PROTOBUF_NAMESPACE_ID::Metadata RouteResponse::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once,
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[1]);
}
// ===================================================================
class TableRoute::_Internal {
public:
static const ::greptime::v1::meta::Table& table(const TableRoute* msg);
@@ -1048,7 +483,7 @@ void TableRoute::InternalSwap(TableRoute* other) {
::PROTOBUF_NAMESPACE_ID::Metadata TableRoute::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once,
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[2]);
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[0]);
}
// ===================================================================
@@ -1314,7 +749,7 @@ void RegionRoute::InternalSwap(RegionRoute* other) {
::PROTOBUF_NAMESPACE_ID::Metadata RegionRoute::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once,
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[3]);
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[1]);
}
// ===================================================================
@@ -1591,7 +1026,7 @@ void Table::InternalSwap(Table* other) {
::PROTOBUF_NAMESPACE_ID::Metadata Table::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once,
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[4]);
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[2]);
}
// ===================================================================
@@ -1605,7 +1040,7 @@ void Region_AttrsEntry_DoNotUse::MergeFrom(const Region_AttrsEntry_DoNotUse& oth
::PROTOBUF_NAMESPACE_ID::Metadata Region_AttrsEntry_DoNotUse::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once,
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[5]);
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[3]);
}
// ===================================================================
@@ -1949,7 +1384,7 @@ void Region::InternalSwap(Region* other) {
::PROTOBUF_NAMESPACE_ID::Metadata Region::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once,
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[6]);
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[4]);
}
// ===================================================================
@@ -2168,7 +1603,7 @@ void Partition::InternalSwap(Partition* other) {
::PROTOBUF_NAMESPACE_ID::Metadata Partition::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once,
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[7]);
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[5]);
}
// ===================================================================
@@ -2398,7 +1833,7 @@ void TableRouteValue::InternalSwap(TableRouteValue* other) {
::PROTOBUF_NAMESPACE_ID::Metadata TableRouteValue::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once,
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[8]);
file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[6]);
}
// @@protoc_insertion_point(namespace_scope)
@@ -2406,14 +1841,6 @@ void TableRouteValue::InternalSwap(TableRouteValue* other) {
} // namespace v1
} // namespace greptime
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::greptime::v1::meta::RouteRequest*
Arena::CreateMaybeMessage< ::greptime::v1::meta::RouteRequest >(Arena* arena) {
return Arena::CreateMessageInternal< ::greptime::v1::meta::RouteRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::meta::RouteResponse*
Arena::CreateMaybeMessage< ::greptime::v1::meta::RouteResponse >(Arena* arena) {
return Arena::CreateMessageInternal< ::greptime::v1::meta::RouteResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::meta::TableRoute*
Arena::CreateMaybeMessage< ::greptime::v1::meta::TableRoute >(Arena* arena) {
return Arena::CreateMessageInternal< ::greptime::v1::meta::TableRoute >(arena);
+6 -684
View File
@@ -63,12 +63,6 @@ extern RegionRouteDefaultTypeInternal _RegionRoute_default_instance_;
class Region_AttrsEntry_DoNotUse;
struct Region_AttrsEntry_DoNotUseDefaultTypeInternal;
extern Region_AttrsEntry_DoNotUseDefaultTypeInternal _Region_AttrsEntry_DoNotUse_default_instance_;
class RouteRequest;
struct RouteRequestDefaultTypeInternal;
extern RouteRequestDefaultTypeInternal _RouteRequest_default_instance_;
class RouteResponse;
struct RouteResponseDefaultTypeInternal;
extern RouteResponseDefaultTypeInternal _RouteResponse_default_instance_;
class Table;
struct TableDefaultTypeInternal;
extern TableDefaultTypeInternal _Table_default_instance_;
@@ -86,8 +80,6 @@ template<> ::greptime::v1::meta::Partition* Arena::CreateMaybeMessage<::greptime
template<> ::greptime::v1::meta::Region* Arena::CreateMaybeMessage<::greptime::v1::meta::Region>(Arena*);
template<> ::greptime::v1::meta::RegionRoute* Arena::CreateMaybeMessage<::greptime::v1::meta::RegionRoute>(Arena*);
template<> ::greptime::v1::meta::Region_AttrsEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::meta::Region_AttrsEntry_DoNotUse>(Arena*);
template<> ::greptime::v1::meta::RouteRequest* Arena::CreateMaybeMessage<::greptime::v1::meta::RouteRequest>(Arena*);
template<> ::greptime::v1::meta::RouteResponse* Arena::CreateMaybeMessage<::greptime::v1::meta::RouteResponse>(Arena*);
template<> ::greptime::v1::meta::Table* Arena::CreateMaybeMessage<::greptime::v1::meta::Table>(Arena*);
template<> ::greptime::v1::meta::TableRoute* Arena::CreateMaybeMessage<::greptime::v1::meta::TableRoute>(Arena*);
template<> ::greptime::v1::meta::TableRouteValue* Arena::CreateMaybeMessage<::greptime::v1::meta::TableRouteValue>(Arena*);
@@ -98,380 +90,6 @@ namespace meta {
// ===================================================================
class RouteRequest final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.RouteRequest) */ {
public:
inline RouteRequest() : RouteRequest(nullptr) {}
~RouteRequest() override;
explicit PROTOBUF_CONSTEXPR RouteRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
RouteRequest(const RouteRequest& from);
RouteRequest(RouteRequest&& from) noexcept
: RouteRequest() {
*this = ::std::move(from);
}
inline RouteRequest& operator=(const RouteRequest& from) {
CopyFrom(from);
return *this;
}
inline RouteRequest& operator=(RouteRequest&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
&& GetOwningArena() != nullptr
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
) {
InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const RouteRequest& default_instance() {
return *internal_default_instance();
}
static inline const RouteRequest* internal_default_instance() {
return reinterpret_cast<const RouteRequest*>(
&_RouteRequest_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(RouteRequest& a, RouteRequest& b) {
a.Swap(&b);
}
inline void Swap(RouteRequest* other) {
if (other == this) return;
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
if (GetOwningArena() != nullptr &&
GetOwningArena() == other->GetOwningArena()) {
#else // PROTOBUF_FORCE_COPY_IN_SWAP
if (GetOwningArena() == other->GetOwningArena()) {
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(RouteRequest* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
RouteRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
return CreateMaybeMessage<RouteRequest>(arena);
}
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const RouteRequest& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
void MergeFrom( const RouteRequest& from) {
RouteRequest::MergeImpl(*this, from);
}
private:
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(RouteRequest* other);
private:
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "greptime.v1.meta.RouteRequest";
}
protected:
explicit RouteRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
public:
static const ClassData _class_data_;
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kTableIdsFieldNumber = 2,
kHeaderFieldNumber = 1,
};
// repeated .greptime.v1.meta.TableId table_ids = 2;
int table_ids_size() const;
private:
int _internal_table_ids_size() const;
public:
void clear_table_ids();
::greptime::v1::meta::TableId* mutable_table_ids(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableId >*
mutable_table_ids();
private:
const ::greptime::v1::meta::TableId& _internal_table_ids(int index) const;
::greptime::v1::meta::TableId* _internal_add_table_ids();
public:
const ::greptime::v1::meta::TableId& table_ids(int index) const;
::greptime::v1::meta::TableId* add_table_ids();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableId >&
table_ids() const;
// .greptime.v1.meta.RequestHeader header = 1;
bool has_header() const;
private:
bool _internal_has_header() const;
public:
void clear_header();
const ::greptime::v1::meta::RequestHeader& header() const;
PROTOBUF_NODISCARD ::greptime::v1::meta::RequestHeader* release_header();
::greptime::v1::meta::RequestHeader* mutable_header();
void set_allocated_header(::greptime::v1::meta::RequestHeader* header);
private:
const ::greptime::v1::meta::RequestHeader& _internal_header() const;
::greptime::v1::meta::RequestHeader* _internal_mutable_header();
public:
void unsafe_arena_set_allocated_header(
::greptime::v1::meta::RequestHeader* header);
::greptime::v1::meta::RequestHeader* unsafe_arena_release_header();
// @@protoc_insertion_point(class_scope:greptime.v1.meta.RouteRequest)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
struct Impl_ {
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableId > table_ids_;
::greptime::v1::meta::RequestHeader* header_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
};
union { Impl_ _impl_; };
friend struct ::TableStruct_greptime_2fv1_2fmeta_2froute_2eproto;
};
// -------------------------------------------------------------------
class RouteResponse final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.RouteResponse) */ {
public:
inline RouteResponse() : RouteResponse(nullptr) {}
~RouteResponse() override;
explicit PROTOBUF_CONSTEXPR RouteResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
RouteResponse(const RouteResponse& from);
RouteResponse(RouteResponse&& from) noexcept
: RouteResponse() {
*this = ::std::move(from);
}
inline RouteResponse& operator=(const RouteResponse& from) {
CopyFrom(from);
return *this;
}
inline RouteResponse& operator=(RouteResponse&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
&& GetOwningArena() != nullptr
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
) {
InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const RouteResponse& default_instance() {
return *internal_default_instance();
}
static inline const RouteResponse* internal_default_instance() {
return reinterpret_cast<const RouteResponse*>(
&_RouteResponse_default_instance_);
}
static constexpr int kIndexInFileMessages =
1;
friend void swap(RouteResponse& a, RouteResponse& b) {
a.Swap(&b);
}
inline void Swap(RouteResponse* other) {
if (other == this) return;
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
if (GetOwningArena() != nullptr &&
GetOwningArena() == other->GetOwningArena()) {
#else // PROTOBUF_FORCE_COPY_IN_SWAP
if (GetOwningArena() == other->GetOwningArena()) {
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(RouteResponse* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
RouteResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
return CreateMaybeMessage<RouteResponse>(arena);
}
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const RouteResponse& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
void MergeFrom( const RouteResponse& from) {
RouteResponse::MergeImpl(*this, from);
}
private:
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(RouteResponse* other);
private:
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "greptime.v1.meta.RouteResponse";
}
protected:
explicit RouteResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
public:
static const ClassData _class_data_;
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kPeersFieldNumber = 2,
kTableRoutesFieldNumber = 3,
kHeaderFieldNumber = 1,
};
// repeated .greptime.v1.meta.Peer peers = 2;
int peers_size() const;
private:
int _internal_peers_size() const;
public:
void clear_peers();
::greptime::v1::meta::Peer* mutable_peers(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::Peer >*
mutable_peers();
private:
const ::greptime::v1::meta::Peer& _internal_peers(int index) const;
::greptime::v1::meta::Peer* _internal_add_peers();
public:
const ::greptime::v1::meta::Peer& peers(int index) const;
::greptime::v1::meta::Peer* add_peers();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::Peer >&
peers() const;
// repeated .greptime.v1.meta.TableRoute table_routes = 3;
int table_routes_size() const;
private:
int _internal_table_routes_size() const;
public:
void clear_table_routes();
::greptime::v1::meta::TableRoute* mutable_table_routes(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableRoute >*
mutable_table_routes();
private:
const ::greptime::v1::meta::TableRoute& _internal_table_routes(int index) const;
::greptime::v1::meta::TableRoute* _internal_add_table_routes();
public:
const ::greptime::v1::meta::TableRoute& table_routes(int index) const;
::greptime::v1::meta::TableRoute* add_table_routes();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableRoute >&
table_routes() const;
// .greptime.v1.meta.ResponseHeader header = 1;
bool has_header() const;
private:
bool _internal_has_header() const;
public:
void clear_header();
const ::greptime::v1::meta::ResponseHeader& header() const;
PROTOBUF_NODISCARD ::greptime::v1::meta::ResponseHeader* release_header();
::greptime::v1::meta::ResponseHeader* mutable_header();
void set_allocated_header(::greptime::v1::meta::ResponseHeader* header);
private:
const ::greptime::v1::meta::ResponseHeader& _internal_header() const;
::greptime::v1::meta::ResponseHeader* _internal_mutable_header();
public:
void unsafe_arena_set_allocated_header(
::greptime::v1::meta::ResponseHeader* header);
::greptime::v1::meta::ResponseHeader* unsafe_arena_release_header();
// @@protoc_insertion_point(class_scope:greptime.v1.meta.RouteResponse)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
struct Impl_ {
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::Peer > peers_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableRoute > table_routes_;
::greptime::v1::meta::ResponseHeader* header_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
};
union { Impl_ _impl_; };
friend struct ::TableStruct_greptime_2fv1_2fmeta_2froute_2eproto;
};
// -------------------------------------------------------------------
class TableRoute final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.TableRoute) */ {
public:
@@ -520,7 +138,7 @@ class TableRoute final :
&_TableRoute_default_instance_);
}
static constexpr int kIndexInFileMessages =
2;
0;
friend void swap(TableRoute& a, TableRoute& b) {
a.Swap(&b);
@@ -697,7 +315,7 @@ class RegionRoute final :
&_RegionRoute_default_instance_);
}
static constexpr int kIndexInFileMessages =
3;
1;
friend void swap(RegionRoute& a, RegionRoute& b) {
a.Swap(&b);
@@ -890,7 +508,7 @@ class Table final :
&_Table_default_instance_);
}
static constexpr int kIndexInFileMessages =
4;
2;
friend void swap(Table& a, Table& b) {
a.Swap(&b);
@@ -1102,7 +720,7 @@ class Region final :
&_Region_default_instance_);
}
static constexpr int kIndexInFileMessages =
6;
4;
friend void swap(Region& a, Region& b) {
a.Swap(&b);
@@ -1312,7 +930,7 @@ class Partition final :
&_Partition_default_instance_);
}
static constexpr int kIndexInFileMessages =
7;
5;
friend void swap(Partition& a, Partition& b) {
a.Swap(&b);
@@ -1501,7 +1119,7 @@ class TableRouteValue final :
&_TableRouteValue_default_instance_);
}
static constexpr int kIndexInFileMessages =
8;
6;
friend void swap(TableRouteValue& a, TableRouteValue& b) {
a.Swap(&b);
@@ -1637,298 +1255,6 @@ class TableRouteValue final :
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// RouteRequest
// .greptime.v1.meta.RequestHeader header = 1;
inline bool RouteRequest::_internal_has_header() const {
return this != internal_default_instance() && _impl_.header_ != nullptr;
}
inline bool RouteRequest::has_header() const {
return _internal_has_header();
}
inline const ::greptime::v1::meta::RequestHeader& RouteRequest::_internal_header() const {
const ::greptime::v1::meta::RequestHeader* p = _impl_.header_;
return p != nullptr ? *p : reinterpret_cast<const ::greptime::v1::meta::RequestHeader&>(
::greptime::v1::meta::_RequestHeader_default_instance_);
}
inline const ::greptime::v1::meta::RequestHeader& RouteRequest::header() const {
// @@protoc_insertion_point(field_get:greptime.v1.meta.RouteRequest.header)
return _internal_header();
}
inline void RouteRequest::unsafe_arena_set_allocated_header(
::greptime::v1::meta::RequestHeader* header) {
if (GetArenaForAllocation() == nullptr) {
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_);
}
_impl_.header_ = header;
if (header) {
} else {
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.meta.RouteRequest.header)
}
inline ::greptime::v1::meta::RequestHeader* RouteRequest::release_header() {
::greptime::v1::meta::RequestHeader* temp = _impl_.header_;
_impl_.header_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
if (GetArenaForAllocation() == nullptr) { delete old; }
#else // PROTOBUF_FORCE_COPY_IN_RELEASE
if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
}
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
return temp;
}
inline ::greptime::v1::meta::RequestHeader* RouteRequest::unsafe_arena_release_header() {
// @@protoc_insertion_point(field_release:greptime.v1.meta.RouteRequest.header)
::greptime::v1::meta::RequestHeader* temp = _impl_.header_;
_impl_.header_ = nullptr;
return temp;
}
inline ::greptime::v1::meta::RequestHeader* RouteRequest::_internal_mutable_header() {
if (_impl_.header_ == nullptr) {
auto* p = CreateMaybeMessage<::greptime::v1::meta::RequestHeader>(GetArenaForAllocation());
_impl_.header_ = p;
}
return _impl_.header_;
}
inline ::greptime::v1::meta::RequestHeader* RouteRequest::mutable_header() {
::greptime::v1::meta::RequestHeader* _msg = _internal_mutable_header();
// @@protoc_insertion_point(field_mutable:greptime.v1.meta.RouteRequest.header)
return _msg;
}
inline void RouteRequest::set_allocated_header(::greptime::v1::meta::RequestHeader* header) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_);
}
if (header) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(header));
if (message_arena != submessage_arena) {
header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, header, submessage_arena);
}
} else {
}
_impl_.header_ = header;
// @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.RouteRequest.header)
}
// repeated .greptime.v1.meta.TableId table_ids = 2;
inline int RouteRequest::_internal_table_ids_size() const {
return _impl_.table_ids_.size();
}
inline int RouteRequest::table_ids_size() const {
return _internal_table_ids_size();
}
inline ::greptime::v1::meta::TableId* RouteRequest::mutable_table_ids(int index) {
// @@protoc_insertion_point(field_mutable:greptime.v1.meta.RouteRequest.table_ids)
return _impl_.table_ids_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableId >*
RouteRequest::mutable_table_ids() {
// @@protoc_insertion_point(field_mutable_list:greptime.v1.meta.RouteRequest.table_ids)
return &_impl_.table_ids_;
}
inline const ::greptime::v1::meta::TableId& RouteRequest::_internal_table_ids(int index) const {
return _impl_.table_ids_.Get(index);
}
inline const ::greptime::v1::meta::TableId& RouteRequest::table_ids(int index) const {
// @@protoc_insertion_point(field_get:greptime.v1.meta.RouteRequest.table_ids)
return _internal_table_ids(index);
}
inline ::greptime::v1::meta::TableId* RouteRequest::_internal_add_table_ids() {
return _impl_.table_ids_.Add();
}
inline ::greptime::v1::meta::TableId* RouteRequest::add_table_ids() {
::greptime::v1::meta::TableId* _add = _internal_add_table_ids();
// @@protoc_insertion_point(field_add:greptime.v1.meta.RouteRequest.table_ids)
return _add;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableId >&
RouteRequest::table_ids() const {
// @@protoc_insertion_point(field_list:greptime.v1.meta.RouteRequest.table_ids)
return _impl_.table_ids_;
}
// -------------------------------------------------------------------
// RouteResponse
// .greptime.v1.meta.ResponseHeader header = 1;
inline bool RouteResponse::_internal_has_header() const {
return this != internal_default_instance() && _impl_.header_ != nullptr;
}
inline bool RouteResponse::has_header() const {
return _internal_has_header();
}
inline const ::greptime::v1::meta::ResponseHeader& RouteResponse::_internal_header() const {
const ::greptime::v1::meta::ResponseHeader* p = _impl_.header_;
return p != nullptr ? *p : reinterpret_cast<const ::greptime::v1::meta::ResponseHeader&>(
::greptime::v1::meta::_ResponseHeader_default_instance_);
}
inline const ::greptime::v1::meta::ResponseHeader& RouteResponse::header() const {
// @@protoc_insertion_point(field_get:greptime.v1.meta.RouteResponse.header)
return _internal_header();
}
inline void RouteResponse::unsafe_arena_set_allocated_header(
::greptime::v1::meta::ResponseHeader* header) {
if (GetArenaForAllocation() == nullptr) {
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_);
}
_impl_.header_ = header;
if (header) {
} else {
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.meta.RouteResponse.header)
}
inline ::greptime::v1::meta::ResponseHeader* RouteResponse::release_header() {
::greptime::v1::meta::ResponseHeader* temp = _impl_.header_;
_impl_.header_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
if (GetArenaForAllocation() == nullptr) { delete old; }
#else // PROTOBUF_FORCE_COPY_IN_RELEASE
if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
}
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
return temp;
}
inline ::greptime::v1::meta::ResponseHeader* RouteResponse::unsafe_arena_release_header() {
// @@protoc_insertion_point(field_release:greptime.v1.meta.RouteResponse.header)
::greptime::v1::meta::ResponseHeader* temp = _impl_.header_;
_impl_.header_ = nullptr;
return temp;
}
inline ::greptime::v1::meta::ResponseHeader* RouteResponse::_internal_mutable_header() {
if (_impl_.header_ == nullptr) {
auto* p = CreateMaybeMessage<::greptime::v1::meta::ResponseHeader>(GetArenaForAllocation());
_impl_.header_ = p;
}
return _impl_.header_;
}
inline ::greptime::v1::meta::ResponseHeader* RouteResponse::mutable_header() {
::greptime::v1::meta::ResponseHeader* _msg = _internal_mutable_header();
// @@protoc_insertion_point(field_mutable:greptime.v1.meta.RouteResponse.header)
return _msg;
}
inline void RouteResponse::set_allocated_header(::greptime::v1::meta::ResponseHeader* header) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_);
}
if (header) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(header));
if (message_arena != submessage_arena) {
header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, header, submessage_arena);
}
} else {
}
_impl_.header_ = header;
// @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.RouteResponse.header)
}
// repeated .greptime.v1.meta.Peer peers = 2;
inline int RouteResponse::_internal_peers_size() const {
return _impl_.peers_.size();
}
inline int RouteResponse::peers_size() const {
return _internal_peers_size();
}
inline ::greptime::v1::meta::Peer* RouteResponse::mutable_peers(int index) {
// @@protoc_insertion_point(field_mutable:greptime.v1.meta.RouteResponse.peers)
return _impl_.peers_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::Peer >*
RouteResponse::mutable_peers() {
// @@protoc_insertion_point(field_mutable_list:greptime.v1.meta.RouteResponse.peers)
return &_impl_.peers_;
}
inline const ::greptime::v1::meta::Peer& RouteResponse::_internal_peers(int index) const {
return _impl_.peers_.Get(index);
}
inline const ::greptime::v1::meta::Peer& RouteResponse::peers(int index) const {
// @@protoc_insertion_point(field_get:greptime.v1.meta.RouteResponse.peers)
return _internal_peers(index);
}
inline ::greptime::v1::meta::Peer* RouteResponse::_internal_add_peers() {
return _impl_.peers_.Add();
}
inline ::greptime::v1::meta::Peer* RouteResponse::add_peers() {
::greptime::v1::meta::Peer* _add = _internal_add_peers();
// @@protoc_insertion_point(field_add:greptime.v1.meta.RouteResponse.peers)
return _add;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::Peer >&
RouteResponse::peers() const {
// @@protoc_insertion_point(field_list:greptime.v1.meta.RouteResponse.peers)
return _impl_.peers_;
}
// repeated .greptime.v1.meta.TableRoute table_routes = 3;
inline int RouteResponse::_internal_table_routes_size() const {
return _impl_.table_routes_.size();
}
inline int RouteResponse::table_routes_size() const {
return _internal_table_routes_size();
}
inline void RouteResponse::clear_table_routes() {
_impl_.table_routes_.Clear();
}
inline ::greptime::v1::meta::TableRoute* RouteResponse::mutable_table_routes(int index) {
// @@protoc_insertion_point(field_mutable:greptime.v1.meta.RouteResponse.table_routes)
return _impl_.table_routes_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableRoute >*
RouteResponse::mutable_table_routes() {
// @@protoc_insertion_point(field_mutable_list:greptime.v1.meta.RouteResponse.table_routes)
return &_impl_.table_routes_;
}
inline const ::greptime::v1::meta::TableRoute& RouteResponse::_internal_table_routes(int index) const {
return _impl_.table_routes_.Get(index);
}
inline const ::greptime::v1::meta::TableRoute& RouteResponse::table_routes(int index) const {
// @@protoc_insertion_point(field_get:greptime.v1.meta.RouteResponse.table_routes)
return _internal_table_routes(index);
}
inline ::greptime::v1::meta::TableRoute* RouteResponse::_internal_add_table_routes() {
return _impl_.table_routes_.Add();
}
inline ::greptime::v1::meta::TableRoute* RouteResponse::add_table_routes() {
::greptime::v1::meta::TableRoute* _add = _internal_add_table_routes();
// @@protoc_insertion_point(field_add:greptime.v1.meta.RouteResponse.table_routes)
return _add;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableRoute >&
RouteResponse::table_routes() const {
// @@protoc_insertion_point(field_list:greptime.v1.meta.RouteResponse.table_routes)
return _impl_.table_routes_;
}
// -------------------------------------------------------------------
// TableRoute
// .greptime.v1.meta.Table table = 1;
@@ -2876,10 +2202,6 @@ inline void TableRouteValue::set_allocated_table_route(::greptime::v1::meta::Tab
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
+105 -283
View File
@@ -34,124 +34,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type RouteRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
TableIds []*TableId `protobuf:"bytes,2,rep,name=table_ids,json=tableIds,proto3" json:"table_ids,omitempty"`
}
func (x *RouteRequest) Reset() {
*x = RouteRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RouteRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RouteRequest) ProtoMessage() {}
func (x *RouteRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RouteRequest.ProtoReflect.Descriptor instead.
func (*RouteRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{0}
}
func (x *RouteRequest) GetHeader() *RequestHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *RouteRequest) GetTableIds() []*TableId {
if x != nil {
return x.TableIds
}
return nil
}
type RouteResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
Peers []*Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"`
TableRoutes []*TableRoute `protobuf:"bytes,3,rep,name=table_routes,json=tableRoutes,proto3" json:"table_routes,omitempty"`
}
func (x *RouteResponse) Reset() {
*x = RouteResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RouteResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RouteResponse) ProtoMessage() {}
func (x *RouteResponse) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RouteResponse.ProtoReflect.Descriptor instead.
func (*RouteResponse) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{1}
}
func (x *RouteResponse) GetHeader() *ResponseHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *RouteResponse) GetPeers() []*Peer {
if x != nil {
return x.Peers
}
return nil
}
func (x *RouteResponse) GetTableRoutes() []*TableRoute {
if x != nil {
return x.TableRoutes
}
return nil
}
type TableRoute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -164,7 +46,7 @@ type TableRoute struct {
func (x *TableRoute) Reset() {
*x = TableRoute{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[2]
mi := &file_greptime_v1_meta_route_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -177,7 +59,7 @@ func (x *TableRoute) String() string {
func (*TableRoute) ProtoMessage() {}
func (x *TableRoute) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[2]
mi := &file_greptime_v1_meta_route_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -190,7 +72,7 @@ func (x *TableRoute) ProtoReflect() protoreflect.Message {
// Deprecated: Use TableRoute.ProtoReflect.Descriptor instead.
func (*TableRoute) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{2}
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{0}
}
func (x *TableRoute) GetTable() *Table {
@@ -222,7 +104,7 @@ type RegionRoute struct {
func (x *RegionRoute) Reset() {
*x = RegionRoute{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[3]
mi := &file_greptime_v1_meta_route_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -235,7 +117,7 @@ func (x *RegionRoute) String() string {
func (*RegionRoute) ProtoMessage() {}
func (x *RegionRoute) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[3]
mi := &file_greptime_v1_meta_route_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -248,7 +130,7 @@ func (x *RegionRoute) ProtoReflect() protoreflect.Message {
// Deprecated: Use RegionRoute.ProtoReflect.Descriptor instead.
func (*RegionRoute) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{3}
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{1}
}
func (x *RegionRoute) GetRegion() *Region {
@@ -285,7 +167,7 @@ type Table struct {
func (x *Table) Reset() {
*x = Table{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[4]
mi := &file_greptime_v1_meta_route_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -298,7 +180,7 @@ func (x *Table) String() string {
func (*Table) ProtoMessage() {}
func (x *Table) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[4]
mi := &file_greptime_v1_meta_route_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -311,7 +193,7 @@ func (x *Table) ProtoReflect() protoreflect.Message {
// Deprecated: Use Table.ProtoReflect.Descriptor instead.
func (*Table) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{4}
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{2}
}
func (x *Table) GetId() uint64 {
@@ -350,7 +232,7 @@ type Region struct {
func (x *Region) Reset() {
*x = Region{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[5]
mi := &file_greptime_v1_meta_route_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -363,7 +245,7 @@ func (x *Region) String() string {
func (*Region) ProtoMessage() {}
func (x *Region) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[5]
mi := &file_greptime_v1_meta_route_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -376,7 +258,7 @@ func (x *Region) ProtoReflect() protoreflect.Message {
// Deprecated: Use Region.ProtoReflect.Descriptor instead.
func (*Region) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{5}
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{3}
}
func (x *Region) GetId() uint64 {
@@ -420,7 +302,7 @@ type Partition struct {
func (x *Partition) Reset() {
*x = Partition{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[6]
mi := &file_greptime_v1_meta_route_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -433,7 +315,7 @@ func (x *Partition) String() string {
func (*Partition) ProtoMessage() {}
func (x *Partition) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[6]
mi := &file_greptime_v1_meta_route_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -446,7 +328,7 @@ func (x *Partition) ProtoReflect() protoreflect.Message {
// Deprecated: Use Partition.ProtoReflect.Descriptor instead.
func (*Partition) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{6}
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{4}
}
func (x *Partition) GetColumnList() [][]byte {
@@ -464,6 +346,7 @@ func (x *Partition) GetValueList() [][]byte {
}
// This message is only for saving into store.
// TODO(weny): Remove it, Now, the upgrade tool is still dependent on it.
type TableRouteValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -476,7 +359,7 @@ type TableRouteValue struct {
func (x *TableRouteValue) Reset() {
*x = TableRouteValue{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[7]
mi := &file_greptime_v1_meta_route_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -489,7 +372,7 @@ func (x *TableRouteValue) String() string {
func (*TableRouteValue) ProtoMessage() {}
func (x *TableRouteValue) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[7]
mi := &file_greptime_v1_meta_route_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -502,7 +385,7 @@ func (x *TableRouteValue) ProtoReflect() protoreflect.Message {
// Deprecated: Use TableRouteValue.ProtoReflect.Descriptor instead.
func (*TableRouteValue) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{7}
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{5}
}
func (x *TableRouteValue) GetPeers() []*Peer {
@@ -527,88 +410,63 @@ var file_greptime_v1_meta_route_proto_rawDesc = []byte{
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61,
0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x7f, 0x0a, 0x0c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x74, 0x61, 0x62, 0x6c,
0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72,
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54,
0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x52, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x73,
0x22, 0xb8, 0x01, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65,
0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x05,
0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72,
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50,
0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x61,
0x62, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0b,
0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x7f, 0x0a, 0x0a, 0x54,
0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61, 0x62,
0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c,
0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0c,
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x9f, 0x01, 0x0a,
0x0b, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x06,
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67,
0x7f, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x2d, 0x0a,
0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67,
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e,
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x2a,
0x0a, 0x11, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e,
0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x65,
0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x6f,
0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65,
0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x13, 0x66, 0x6f, 0x6c, 0x6c, 0x6f,
0x77, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x22, 0x76,
0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65,
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72,
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54,
0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e,
0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68,
0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65,
0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xdc, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69, 0x6f,
0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69,
0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x61, 0x72, 0x74,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x39, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x64, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x41,
0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6c, 0x69, 0x73,
0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c,
0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x69, 0x73,
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x69,
0x73, 0x74, 0x22, 0x7e, 0x0a, 0x0f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65,
0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x75,
0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c,
0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75,
0x74, 0x65, 0x32, 0x54, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x05,
0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54,
0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76,
0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x42, 0x0a, 0x0d,
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75,
0x74, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73,
0x22, 0x9f, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65,
0x12, 0x30, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x18, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65,
0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c,
0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32,
0x0a, 0x15, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f,
0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x13, 0x66,
0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78,
0x65, 0x73, 0x22, 0x76, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0a, 0x74,
0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61,
0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65,
0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74,
0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xdc, 0x01, 0x0a, 0x06, 0x52,
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x70, 0x61, 0x72,
0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67,
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e,
0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x64, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74,
0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x1a,
0x38, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72,
0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6c,
0x75, 0x6d, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x7e, 0x0a, 0x0f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52,
0x6f, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x65, 0x65,
0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72,
0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65,
0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67,
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e,
0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c,
0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61,
0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f,
0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -623,44 +481,32 @@ func file_greptime_v1_meta_route_proto_rawDescGZIP() []byte {
return file_greptime_v1_meta_route_proto_rawDescData
}
var file_greptime_v1_meta_route_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_greptime_v1_meta_route_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_greptime_v1_meta_route_proto_goTypes = []interface{}{
(*RouteRequest)(nil), // 0: greptime.v1.meta.RouteRequest
(*RouteResponse)(nil), // 1: greptime.v1.meta.RouteResponse
(*TableRoute)(nil), // 2: greptime.v1.meta.TableRoute
(*RegionRoute)(nil), // 3: greptime.v1.meta.RegionRoute
(*Table)(nil), // 4: greptime.v1.meta.Table
(*Region)(nil), // 5: greptime.v1.meta.Region
(*Partition)(nil), // 6: greptime.v1.meta.Partition
(*TableRouteValue)(nil), // 7: greptime.v1.meta.TableRouteValue
nil, // 8: greptime.v1.meta.Region.AttrsEntry
(*RequestHeader)(nil), // 9: greptime.v1.meta.RequestHeader
(*TableId)(nil), // 10: greptime.v1.meta.TableId
(*ResponseHeader)(nil), // 11: greptime.v1.meta.ResponseHeader
(*Peer)(nil), // 12: greptime.v1.meta.Peer
(*TableName)(nil), // 13: greptime.v1.meta.TableName
(*TableRoute)(nil), // 0: greptime.v1.meta.TableRoute
(*RegionRoute)(nil), // 1: greptime.v1.meta.RegionRoute
(*Table)(nil), // 2: greptime.v1.meta.Table
(*Region)(nil), // 3: greptime.v1.meta.Region
(*Partition)(nil), // 4: greptime.v1.meta.Partition
(*TableRouteValue)(nil), // 5: greptime.v1.meta.TableRouteValue
nil, // 6: greptime.v1.meta.Region.AttrsEntry
(*TableName)(nil), // 7: greptime.v1.meta.TableName
(*Peer)(nil), // 8: greptime.v1.meta.Peer
}
var file_greptime_v1_meta_route_proto_depIdxs = []int32{
9, // 0: greptime.v1.meta.RouteRequest.header:type_name -> greptime.v1.meta.RequestHeader
10, // 1: greptime.v1.meta.RouteRequest.table_ids:type_name -> greptime.v1.meta.TableId
11, // 2: greptime.v1.meta.RouteResponse.header:type_name -> greptime.v1.meta.ResponseHeader
12, // 3: greptime.v1.meta.RouteResponse.peers:type_name -> greptime.v1.meta.Peer
2, // 4: greptime.v1.meta.RouteResponse.table_routes:type_name -> greptime.v1.meta.TableRoute
4, // 5: greptime.v1.meta.TableRoute.table:type_name -> greptime.v1.meta.Table
3, // 6: greptime.v1.meta.TableRoute.region_routes:type_name -> greptime.v1.meta.RegionRoute
5, // 7: greptime.v1.meta.RegionRoute.region:type_name -> greptime.v1.meta.Region
13, // 8: greptime.v1.meta.Table.table_name:type_name -> greptime.v1.meta.TableName
6, // 9: greptime.v1.meta.Region.partition:type_name -> greptime.v1.meta.Partition
8, // 10: greptime.v1.meta.Region.attrs:type_name -> greptime.v1.meta.Region.AttrsEntry
12, // 11: greptime.v1.meta.TableRouteValue.peers:type_name -> greptime.v1.meta.Peer
2, // 12: greptime.v1.meta.TableRouteValue.table_route:type_name -> greptime.v1.meta.TableRoute
0, // 13: greptime.v1.meta.Router.Route:input_type -> greptime.v1.meta.RouteRequest
1, // 14: greptime.v1.meta.Router.Route:output_type -> greptime.v1.meta.RouteResponse
14, // [14:15] is the sub-list for method output_type
13, // [13:14] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension type_name
13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
2, // 0: greptime.v1.meta.TableRoute.table:type_name -> greptime.v1.meta.Table
1, // 1: greptime.v1.meta.TableRoute.region_routes:type_name -> greptime.v1.meta.RegionRoute
3, // 2: greptime.v1.meta.RegionRoute.region:type_name -> greptime.v1.meta.Region
7, // 3: greptime.v1.meta.Table.table_name:type_name -> greptime.v1.meta.TableName
4, // 4: greptime.v1.meta.Region.partition:type_name -> greptime.v1.meta.Partition
6, // 5: greptime.v1.meta.Region.attrs:type_name -> greptime.v1.meta.Region.AttrsEntry
8, // 6: greptime.v1.meta.TableRouteValue.peers:type_name -> greptime.v1.meta.Peer
0, // 7: greptime.v1.meta.TableRouteValue.table_route:type_name -> greptime.v1.meta.TableRoute
8, // [8:8] is the sub-list for method output_type
8, // [8:8] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension extendee
0, // [0:8] is the sub-list for field type_name
}
func init() { file_greptime_v1_meta_route_proto_init() }
@@ -671,30 +517,6 @@ func file_greptime_v1_meta_route_proto_init() {
file_greptime_v1_meta_common_proto_init()
if !protoimpl.UnsafeEnabled {
file_greptime_v1_meta_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RouteRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RouteResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TableRoute); i {
case 0:
return &v.state
@@ -706,7 +528,7 @@ func file_greptime_v1_meta_route_proto_init() {
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
file_greptime_v1_meta_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RegionRoute); i {
case 0:
return &v.state
@@ -718,7 +540,7 @@ func file_greptime_v1_meta_route_proto_init() {
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
file_greptime_v1_meta_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Table); i {
case 0:
return &v.state
@@ -730,7 +552,7 @@ func file_greptime_v1_meta_route_proto_init() {
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
file_greptime_v1_meta_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Region); i {
case 0:
return &v.state
@@ -742,7 +564,7 @@ func file_greptime_v1_meta_route_proto_init() {
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
file_greptime_v1_meta_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Partition); i {
case 0:
return &v.state
@@ -754,7 +576,7 @@ func file_greptime_v1_meta_route_proto_init() {
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
file_greptime_v1_meta_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TableRouteValue); i {
case 0:
return &v.state
@@ -773,9 +595,9 @@ func file_greptime_v1_meta_route_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_greptime_v1_meta_route_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
NumServices: 0,
},
GoTypes: file_greptime_v1_meta_route_proto_goTypes,
DependencyIndexes: file_greptime_v1_meta_route_proto_depIdxs,
File diff suppressed because it is too large Load Diff
+1 -35
View File
@@ -20,41 +20,6 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"
import "greptime/v1/meta/common.proto";
service Router {
// Fetch routing information for tables. The smallest unit is the complete
// routing information(all regions) of a table.
//
// ```text
// table_1
// table_name
// table_schema
// regions
// region_1
// leader_peer
// follower_peer_1, follower_peer_2
// region_2
// leader_peer
// follower_peer_1, follower_peer_2, follower_peer_3
// region_xxx
// table_2
// ...
// ```
//
rpc Route(RouteRequest) returns (RouteResponse) {}
}
message RouteRequest {
RequestHeader header = 1;
repeated TableId table_ids = 2;
}
message RouteResponse {
ResponseHeader header = 1;
repeated Peer peers = 2;
repeated TableRoute table_routes = 3;
}
message TableRoute {
Table table = 1;
repeated RegionRoute region_routes = 2;
@@ -90,6 +55,7 @@ message Partition {
}
// This message is only for saving into store.
// TODO(weny): Remove it, Now, the upgrade tool is still dependent on it.
message TableRouteValue {
repeated Peer peers = 1;
TableRoute table_route = 2;
-1
View File
@@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
mod serde;
#[allow(clippy::large_enum_variant)]
pub mod v1;
-38
View File
@@ -1,38 +0,0 @@
// 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.
use prost::DecodeError;
use prost::Message;
use crate::v1::meta::TableRouteValue;
macro_rules! impl_convert_with_bytes {
($data_type: ty) => {
impl From<$data_type> for Vec<u8> {
fn from(entity: $data_type) -> Self {
entity.encode_to_vec()
}
}
impl TryFrom<&[u8]> for $data_type {
type Error = DecodeError;
fn try_from(value: &[u8]) -> Result<Self, Self::Error> {
<$data_type>::decode(value.as_ref())
}
}
};
}
impl_convert_with_bytes!(TableRouteValue);
-1
View File
@@ -155,7 +155,6 @@ macro_rules! gen_set_header {
}
gen_set_header!(HeartbeatRequest);
gen_set_header!(RouteRequest);
gen_set_header!(RangeRequest);
gen_set_header!(PutRequest);
gen_set_header!(BatchGetRequest);