feat: add pull meta config API (#311)
* chore: add meta config rpc Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: update payload to simple string Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: wrap string with message to enable option in rust Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: replace content with vec Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: fix format Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: remove repeated Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: update comment Co-authored-by: fys <40801205+fengys1996@users.noreply.github.com> * chore: update comment Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: move pull config to a separate config service Signed-off-by: shuiyisong <xixing.sys@gmail.com> --------- Signed-off-by: shuiyisong <xixing.sys@gmail.com> Co-authored-by: fys <40801205+fengys1996@users.noreply.github.com>
This commit is contained in:
@@ -58,6 +58,7 @@ fn main() {
|
||||
"proto/greptime/v1/wal.proto",
|
||||
"proto/greptime/v1/meta/common.proto",
|
||||
"proto/greptime/v1/meta/heartbeat.proto",
|
||||
"proto/greptime/v1/meta/config.proto",
|
||||
"proto/greptime/v1/meta/route.proto",
|
||||
"proto/greptime/v1/meta/ddl.proto",
|
||||
"proto/greptime/v1/meta/region.proto",
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: greptime/v1/meta/config.proto
|
||||
|
||||
#include "greptime/v1/meta/config.pb.h"
|
||||
#include "greptime/v1/meta/config.grpc.pb.h"
|
||||
|
||||
#include <functional>
|
||||
#include <grpcpp/support/async_stream.h>
|
||||
#include <grpcpp/support/async_unary_call.h>
|
||||
#include <grpcpp/impl/channel_interface.h>
|
||||
#include <grpcpp/impl/client_unary_call.h>
|
||||
#include <grpcpp/support/client_callback.h>
|
||||
#include <grpcpp/support/message_allocator.h>
|
||||
#include <grpcpp/support/method_handler.h>
|
||||
#include <grpcpp/impl/rpc_service_method.h>
|
||||
#include <grpcpp/support/server_callback.h>
|
||||
#include <grpcpp/impl/codegen/server_callback_handlers.h>
|
||||
#include <grpcpp/server_context.h>
|
||||
#include <grpcpp/impl/service_type.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
namespace greptime {
|
||||
namespace v1 {
|
||||
namespace meta {
|
||||
|
||||
static const char* Config_method_names[] = {
|
||||
"/greptime.v1.meta.Config/PullConfig",
|
||||
};
|
||||
|
||||
std::unique_ptr< Config::Stub> Config::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
|
||||
(void)options;
|
||||
std::unique_ptr< Config::Stub> stub(new Config::Stub(channel, options));
|
||||
return stub;
|
||||
}
|
||||
|
||||
Config::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
|
||||
: channel_(channel), rpcmethod_PullConfig_(Config_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
{}
|
||||
|
||||
::grpc::Status Config::Stub::PullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& request, ::greptime::v1::meta::PullConfigResponse* response) {
|
||||
return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::meta::PullConfigRequest, ::greptime::v1::meta::PullConfigResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_PullConfig_, context, request, response);
|
||||
}
|
||||
|
||||
void Config::Stub::async::PullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest* request, ::greptime::v1::meta::PullConfigResponse* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc::internal::CallbackUnaryCall< ::greptime::v1::meta::PullConfigRequest, ::greptime::v1::meta::PullConfigResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PullConfig_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void Config::Stub::async::PullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest* request, ::greptime::v1::meta::PullConfigResponse* response, ::grpc::ClientUnaryReactor* reactor) {
|
||||
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PullConfig_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::PullConfigResponse>* Config::Stub::PrepareAsyncPullConfigRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::meta::PullConfigResponse, ::greptime::v1::meta::PullConfigRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_PullConfig_, context, request);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::PullConfigResponse>* Config::Stub::AsyncPullConfigRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
auto* result =
|
||||
this->PrepareAsyncPullConfigRaw(context, request, cq);
|
||||
result->StartCall();
|
||||
return result;
|
||||
}
|
||||
|
||||
Config::Service::Service() {
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Config_method_names[0],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< Config::Service, ::greptime::v1::meta::PullConfigRequest, ::greptime::v1::meta::PullConfigResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](Config::Service* service,
|
||||
::grpc::ServerContext* ctx,
|
||||
const ::greptime::v1::meta::PullConfigRequest* req,
|
||||
::greptime::v1::meta::PullConfigResponse* resp) {
|
||||
return service->PullConfig(ctx, req, resp);
|
||||
}, this)));
|
||||
}
|
||||
|
||||
Config::Service::~Service() {
|
||||
}
|
||||
|
||||
::grpc::Status Config::Service::PullConfig(::grpc::ServerContext* context, const ::greptime::v1::meta::PullConfigRequest* request, ::greptime::v1::meta::PullConfigResponse* response) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
(void) response;
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
|
||||
} // namespace greptime
|
||||
} // namespace v1
|
||||
} // namespace meta
|
||||
|
||||
@@ -0,0 +1,262 @@
|
||||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: greptime/v1/meta/config.proto
|
||||
// Original file comments:
|
||||
// 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.
|
||||
//
|
||||
#ifndef GRPC_greptime_2fv1_2fmeta_2fconfig_2eproto__INCLUDED
|
||||
#define GRPC_greptime_2fv1_2fmeta_2fconfig_2eproto__INCLUDED
|
||||
|
||||
#include "greptime/v1/meta/config.pb.h"
|
||||
|
||||
#include <functional>
|
||||
#include <grpcpp/generic/async_generic_service.h>
|
||||
#include <grpcpp/support/async_stream.h>
|
||||
#include <grpcpp/support/async_unary_call.h>
|
||||
#include <grpcpp/support/client_callback.h>
|
||||
#include <grpcpp/client_context.h>
|
||||
#include <grpcpp/completion_queue.h>
|
||||
#include <grpcpp/support/message_allocator.h>
|
||||
#include <grpcpp/support/method_handler.h>
|
||||
#include <grpcpp/impl/codegen/proto_utils.h>
|
||||
#include <grpcpp/impl/rpc_method.h>
|
||||
#include <grpcpp/support/server_callback.h>
|
||||
#include <grpcpp/impl/codegen/server_callback_handlers.h>
|
||||
#include <grpcpp/server_context.h>
|
||||
#include <grpcpp/impl/service_type.h>
|
||||
#include <grpcpp/impl/codegen/status.h>
|
||||
#include <grpcpp/support/stub_options.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
|
||||
namespace greptime {
|
||||
namespace v1 {
|
||||
namespace meta {
|
||||
|
||||
class Config final {
|
||||
public:
|
||||
static constexpr char const* service_full_name() {
|
||||
return "greptime.v1.meta.Config";
|
||||
}
|
||||
class StubInterface {
|
||||
public:
|
||||
virtual ~StubInterface() {}
|
||||
// Pull configuration from meta server.
|
||||
virtual ::grpc::Status PullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& request, ::greptime::v1::meta::PullConfigResponse* response) = 0;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::PullConfigResponse>> AsyncPullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::PullConfigResponse>>(AsyncPullConfigRaw(context, request, cq));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::PullConfigResponse>> PrepareAsyncPullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::PullConfigResponse>>(PrepareAsyncPullConfigRaw(context, request, cq));
|
||||
}
|
||||
class async_interface {
|
||||
public:
|
||||
virtual ~async_interface() {}
|
||||
// Pull configuration from meta server.
|
||||
virtual void PullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest* request, ::greptime::v1::meta::PullConfigResponse* response, std::function<void(::grpc::Status)>) = 0;
|
||||
virtual void PullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest* request, ::greptime::v1::meta::PullConfigResponse* 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::PullConfigResponse>* AsyncPullConfigRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& request, ::grpc::CompletionQueue* cq) = 0;
|
||||
virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::PullConfigResponse>* PrepareAsyncPullConfigRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& 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 PullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& request, ::greptime::v1::meta::PullConfigResponse* response) override;
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::PullConfigResponse>> AsyncPullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::PullConfigResponse>>(AsyncPullConfigRaw(context, request, cq));
|
||||
}
|
||||
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::PullConfigResponse>> PrepareAsyncPullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::PullConfigResponse>>(PrepareAsyncPullConfigRaw(context, request, cq));
|
||||
}
|
||||
class async final :
|
||||
public StubInterface::async_interface {
|
||||
public:
|
||||
void PullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest* request, ::greptime::v1::meta::PullConfigResponse* response, std::function<void(::grpc::Status)>) override;
|
||||
void PullConfig(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest* request, ::greptime::v1::meta::PullConfigResponse* 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::PullConfigResponse>* AsyncPullConfigRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& request, ::grpc::CompletionQueue* cq) override;
|
||||
::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::PullConfigResponse>* PrepareAsyncPullConfigRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::PullConfigRequest& request, ::grpc::CompletionQueue* cq) override;
|
||||
const ::grpc::internal::RpcMethod rpcmethod_PullConfig_;
|
||||
};
|
||||
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();
|
||||
// Pull configuration from meta server.
|
||||
virtual ::grpc::Status PullConfig(::grpc::ServerContext* context, const ::greptime::v1::meta::PullConfigRequest* request, ::greptime::v1::meta::PullConfigResponse* response);
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithAsyncMethod_PullConfig : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithAsyncMethod_PullConfig() {
|
||||
::grpc::Service::MarkMethodAsync(0);
|
||||
}
|
||||
~WithAsyncMethod_PullConfig() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status PullConfig(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::PullConfigRequest* /*request*/, ::greptime::v1::meta::PullConfigResponse* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
void RequestPullConfig(::grpc::ServerContext* context, ::greptime::v1::meta::PullConfigRequest* request, ::grpc::ServerAsyncResponseWriter< ::greptime::v1::meta::PullConfigResponse>* 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_PullConfig<Service > AsyncService;
|
||||
template <class BaseClass>
|
||||
class WithCallbackMethod_PullConfig : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithCallbackMethod_PullConfig() {
|
||||
::grpc::Service::MarkMethodCallback(0,
|
||||
new ::grpc::internal::CallbackUnaryHandler< ::greptime::v1::meta::PullConfigRequest, ::greptime::v1::meta::PullConfigResponse>(
|
||||
[this](
|
||||
::grpc::CallbackServerContext* context, const ::greptime::v1::meta::PullConfigRequest* request, ::greptime::v1::meta::PullConfigResponse* response) { return this->PullConfig(context, request, response); }));}
|
||||
void SetMessageAllocatorFor_PullConfig(
|
||||
::grpc::MessageAllocator< ::greptime::v1::meta::PullConfigRequest, ::greptime::v1::meta::PullConfigResponse>* allocator) {
|
||||
::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0);
|
||||
static_cast<::grpc::internal::CallbackUnaryHandler< ::greptime::v1::meta::PullConfigRequest, ::greptime::v1::meta::PullConfigResponse>*>(handler)
|
||||
->SetMessageAllocator(allocator);
|
||||
}
|
||||
~WithCallbackMethod_PullConfig() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status PullConfig(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::PullConfigRequest* /*request*/, ::greptime::v1::meta::PullConfigResponse* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
virtual ::grpc::ServerUnaryReactor* PullConfig(
|
||||
::grpc::CallbackServerContext* /*context*/, const ::greptime::v1::meta::PullConfigRequest* /*request*/, ::greptime::v1::meta::PullConfigResponse* /*response*/) { return nullptr; }
|
||||
};
|
||||
typedef WithCallbackMethod_PullConfig<Service > CallbackService;
|
||||
typedef CallbackService ExperimentalCallbackService;
|
||||
template <class BaseClass>
|
||||
class WithGenericMethod_PullConfig : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithGenericMethod_PullConfig() {
|
||||
::grpc::Service::MarkMethodGeneric(0);
|
||||
}
|
||||
~WithGenericMethod_PullConfig() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status PullConfig(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::PullConfigRequest* /*request*/, ::greptime::v1::meta::PullConfigResponse* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithRawMethod_PullConfig : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithRawMethod_PullConfig() {
|
||||
::grpc::Service::MarkMethodRaw(0);
|
||||
}
|
||||
~WithRawMethod_PullConfig() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status PullConfig(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::PullConfigRequest* /*request*/, ::greptime::v1::meta::PullConfigResponse* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
void RequestPullConfig(::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_PullConfig : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithRawCallbackMethod_PullConfig() {
|
||||
::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->PullConfig(context, request, response); }));
|
||||
}
|
||||
~WithRawCallbackMethod_PullConfig() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable synchronous version of this method
|
||||
::grpc::Status PullConfig(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::PullConfigRequest* /*request*/, ::greptime::v1::meta::PullConfigResponse* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
virtual ::grpc::ServerUnaryReactor* PullConfig(
|
||||
::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; }
|
||||
};
|
||||
template <class BaseClass>
|
||||
class WithStreamedUnaryMethod_PullConfig : public BaseClass {
|
||||
private:
|
||||
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
|
||||
public:
|
||||
WithStreamedUnaryMethod_PullConfig() {
|
||||
::grpc::Service::MarkMethodStreamed(0,
|
||||
new ::grpc::internal::StreamedUnaryHandler<
|
||||
::greptime::v1::meta::PullConfigRequest, ::greptime::v1::meta::PullConfigResponse>(
|
||||
[this](::grpc::ServerContext* context,
|
||||
::grpc::ServerUnaryStreamer<
|
||||
::greptime::v1::meta::PullConfigRequest, ::greptime::v1::meta::PullConfigResponse>* streamer) {
|
||||
return this->StreamedPullConfig(context,
|
||||
streamer);
|
||||
}));
|
||||
}
|
||||
~WithStreamedUnaryMethod_PullConfig() override {
|
||||
BaseClassMustBeDerivedFromService(this);
|
||||
}
|
||||
// disable regular version of this method
|
||||
::grpc::Status PullConfig(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::PullConfigRequest* /*request*/, ::greptime::v1::meta::PullConfigResponse* /*response*/) override {
|
||||
abort();
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
// replace default version of method with streamed unary
|
||||
virtual ::grpc::Status StreamedPullConfig(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::greptime::v1::meta::PullConfigRequest,::greptime::v1::meta::PullConfigResponse>* server_unary_streamer) = 0;
|
||||
};
|
||||
typedef WithStreamedUnaryMethod_PullConfig<Service > StreamedUnaryService;
|
||||
typedef Service SplitStreamedService;
|
||||
typedef WithStreamedUnaryMethod_PullConfig<Service > StreamedService;
|
||||
};
|
||||
|
||||
} // namespace meta
|
||||
} // namespace v1
|
||||
} // namespace greptime
|
||||
|
||||
|
||||
#endif // GRPC_greptime_2fv1_2fmeta_2fconfig_2eproto__INCLUDED
|
||||
@@ -0,0 +1,588 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: greptime/v1/meta/config.proto
|
||||
|
||||
#include "greptime/v1/meta/config.pb.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/wire_format_lite.h>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/reflection_ops.h>
|
||||
#include <google/protobuf/wire_format.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
|
||||
PROTOBUF_PRAGMA_INIT_SEG
|
||||
|
||||
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
|
||||
namespace _pbi = _pb::internal;
|
||||
|
||||
namespace greptime {
|
||||
namespace v1 {
|
||||
namespace meta {
|
||||
PROTOBUF_CONSTEXPR PullConfigRequest::PullConfigRequest(
|
||||
::_pbi::ConstantInitialized): _impl_{
|
||||
/*decltype(_impl_.header_)*/nullptr
|
||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||
struct PullConfigRequestDefaultTypeInternal {
|
||||
PROTOBUF_CONSTEXPR PullConfigRequestDefaultTypeInternal()
|
||||
: _instance(::_pbi::ConstantInitialized{}) {}
|
||||
~PullConfigRequestDefaultTypeInternal() {}
|
||||
union {
|
||||
PullConfigRequest _instance;
|
||||
};
|
||||
};
|
||||
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PullConfigRequestDefaultTypeInternal _PullConfigRequest_default_instance_;
|
||||
PROTOBUF_CONSTEXPR PullConfigResponse::PullConfigResponse(
|
||||
::_pbi::ConstantInitialized): _impl_{
|
||||
/*decltype(_impl_.payload_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.header_)*/nullptr
|
||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||
struct PullConfigResponseDefaultTypeInternal {
|
||||
PROTOBUF_CONSTEXPR PullConfigResponseDefaultTypeInternal()
|
||||
: _instance(::_pbi::ConstantInitialized{}) {}
|
||||
~PullConfigResponseDefaultTypeInternal() {}
|
||||
union {
|
||||
PullConfigResponse _instance;
|
||||
};
|
||||
};
|
||||
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PullConfigResponseDefaultTypeInternal _PullConfigResponse_default_instance_;
|
||||
} // namespace meta
|
||||
} // namespace v1
|
||||
} // namespace greptime
|
||||
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fmeta_2fconfig_2eproto[2];
|
||||
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2fmeta_2fconfig_2eproto = nullptr;
|
||||
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fmeta_2fconfig_2eproto = nullptr;
|
||||
|
||||
const uint32_t TableStruct_greptime_2fv1_2fmeta_2fconfig_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::PullConfigRequest, _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::PullConfigRequest, _impl_.header_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::PullConfigResponse, _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::PullConfigResponse, _impl_.header_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::PullConfigResponse, _impl_.payload_),
|
||||
};
|
||||
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(::greptime::v1::meta::PullConfigRequest)},
|
||||
{ 7, -1, -1, sizeof(::greptime::v1::meta::PullConfigResponse)},
|
||||
};
|
||||
|
||||
static const ::_pb::Message* const file_default_instances[] = {
|
||||
&::greptime::v1::meta::_PullConfigRequest_default_instance_._instance,
|
||||
&::greptime::v1::meta::_PullConfigResponse_default_instance_._instance,
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fconfig_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
"\n\035greptime/v1/meta/config.proto\022\020greptim"
|
||||
"e.v1.meta\032\035greptime/v1/meta/common.proto"
|
||||
"\"D\n\021PullConfigRequest\022/\n\006header\030\001 \001(\0132\037."
|
||||
"greptime.v1.meta.RequestHeader\"W\n\022PullCo"
|
||||
"nfigResponse\0220\n\006header\030\001 \001(\0132 .greptime."
|
||||
"v1.meta.ResponseHeader\022\017\n\007payload\030\002 \001(\t2"
|
||||
"c\n\006Config\022Y\n\nPullConfig\022#.greptime.v1.me"
|
||||
"ta.PullConfigRequest\032$.greptime.v1.meta."
|
||||
"PullConfigResponse\"\000B<Z:github.com/Grept"
|
||||
"imeTeam/greptime-proto/go/greptime/v1/me"
|
||||
"tab\006proto3"
|
||||
;
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto_deps[1] = {
|
||||
&::descriptor_table_greptime_2fv1_2fmeta_2fcommon_2eproto,
|
||||
};
|
||||
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto = {
|
||||
false, false, 410, descriptor_table_protodef_greptime_2fv1_2fmeta_2fconfig_2eproto,
|
||||
"greptime/v1/meta/config.proto",
|
||||
&descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto_once, descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto_deps, 1, 2,
|
||||
schemas, file_default_instances, TableStruct_greptime_2fv1_2fmeta_2fconfig_2eproto::offsets,
|
||||
file_level_metadata_greptime_2fv1_2fmeta_2fconfig_2eproto, file_level_enum_descriptors_greptime_2fv1_2fmeta_2fconfig_2eproto,
|
||||
file_level_service_descriptors_greptime_2fv1_2fmeta_2fconfig_2eproto,
|
||||
};
|
||||
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto_getter() {
|
||||
return &descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto;
|
||||
}
|
||||
|
||||
// Force running AddDescriptors() at dynamic initialization time.
|
||||
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_greptime_2fv1_2fmeta_2fconfig_2eproto(&descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto);
|
||||
namespace greptime {
|
||||
namespace v1 {
|
||||
namespace meta {
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class PullConfigRequest::_Internal {
|
||||
public:
|
||||
static const ::greptime::v1::meta::RequestHeader& header(const PullConfigRequest* msg);
|
||||
};
|
||||
|
||||
const ::greptime::v1::meta::RequestHeader&
|
||||
PullConfigRequest::_Internal::header(const PullConfigRequest* msg) {
|
||||
return *msg->_impl_.header_;
|
||||
}
|
||||
void PullConfigRequest::clear_header() {
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
|
||||
delete _impl_.header_;
|
||||
}
|
||||
_impl_.header_ = nullptr;
|
||||
}
|
||||
PullConfigRequest::PullConfigRequest(::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.PullConfigRequest)
|
||||
}
|
||||
PullConfigRequest::PullConfigRequest(const PullConfigRequest& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
||||
PullConfigRequest* const _this = this; (void)_this;
|
||||
new (&_impl_) Impl_{
|
||||
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.PullConfigRequest)
|
||||
}
|
||||
|
||||
inline void PullConfigRequest::SharedCtor(
|
||||
::_pb::Arena* arena, bool is_message_owned) {
|
||||
(void)arena;
|
||||
(void)is_message_owned;
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.header_){nullptr}
|
||||
, /*decltype(_impl_._cached_size_)*/{}
|
||||
};
|
||||
}
|
||||
|
||||
PullConfigRequest::~PullConfigRequest() {
|
||||
// @@protoc_insertion_point(destructor:greptime.v1.meta.PullConfigRequest)
|
||||
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
||||
(void)arena;
|
||||
return;
|
||||
}
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
inline void PullConfigRequest::SharedDtor() {
|
||||
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||
if (this != internal_default_instance()) delete _impl_.header_;
|
||||
}
|
||||
|
||||
void PullConfigRequest::SetCachedSize(int size) const {
|
||||
_impl_._cached_size_.Set(size);
|
||||
}
|
||||
|
||||
void PullConfigRequest::Clear() {
|
||||
// @@protoc_insertion_point(message_clear_start:greptime.v1.meta.PullConfigRequest)
|
||||
uint32_t cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
|
||||
delete _impl_.header_;
|
||||
}
|
||||
_impl_.header_ = nullptr;
|
||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
const char* PullConfigRequest::_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;
|
||||
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* PullConfigRequest::_InternalSerialize(
|
||||
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.meta.PullConfigRequest)
|
||||
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);
|
||||
}
|
||||
|
||||
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.PullConfigRequest)
|
||||
return target;
|
||||
}
|
||||
|
||||
size_t PullConfigRequest::ByteSizeLong() const {
|
||||
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.meta.PullConfigRequest)
|
||||
size_t total_size = 0;
|
||||
|
||||
uint32_t cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// .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 PullConfigRequest::_class_data_ = {
|
||||
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
||||
PullConfigRequest::MergeImpl
|
||||
};
|
||||
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PullConfigRequest::GetClassData() const { return &_class_data_; }
|
||||
|
||||
|
||||
void PullConfigRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
||||
auto* const _this = static_cast<PullConfigRequest*>(&to_msg);
|
||||
auto& from = static_cast<const PullConfigRequest&>(from_msg);
|
||||
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.meta.PullConfigRequest)
|
||||
GOOGLE_DCHECK_NE(&from, _this);
|
||||
uint32_t cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
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 PullConfigRequest::CopyFrom(const PullConfigRequest& from) {
|
||||
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.meta.PullConfigRequest)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool PullConfigRequest::IsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void PullConfigRequest::InternalSwap(PullConfigRequest* other) {
|
||||
using std::swap;
|
||||
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||||
swap(_impl_.header_, other->_impl_.header_);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata PullConfigRequest::GetMetadata() const {
|
||||
return ::_pbi::AssignDescriptors(
|
||||
&descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto_once,
|
||||
file_level_metadata_greptime_2fv1_2fmeta_2fconfig_2eproto[0]);
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class PullConfigResponse::_Internal {
|
||||
public:
|
||||
static const ::greptime::v1::meta::ResponseHeader& header(const PullConfigResponse* msg);
|
||||
};
|
||||
|
||||
const ::greptime::v1::meta::ResponseHeader&
|
||||
PullConfigResponse::_Internal::header(const PullConfigResponse* msg) {
|
||||
return *msg->_impl_.header_;
|
||||
}
|
||||
void PullConfigResponse::clear_header() {
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
|
||||
delete _impl_.header_;
|
||||
}
|
||||
_impl_.header_ = nullptr;
|
||||
}
|
||||
PullConfigResponse::PullConfigResponse(::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.PullConfigResponse)
|
||||
}
|
||||
PullConfigResponse::PullConfigResponse(const PullConfigResponse& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
||||
PullConfigResponse* const _this = this; (void)_this;
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.payload_){}
|
||||
, decltype(_impl_.header_){nullptr}
|
||||
, /*decltype(_impl_._cached_size_)*/{}};
|
||||
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
_impl_.payload_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.payload_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (!from._internal_payload().empty()) {
|
||||
_this->_impl_.payload_.Set(from._internal_payload(),
|
||||
_this->GetArenaForAllocation());
|
||||
}
|
||||
if (from._internal_has_header()) {
|
||||
_this->_impl_.header_ = new ::greptime::v1::meta::ResponseHeader(*from._impl_.header_);
|
||||
}
|
||||
// @@protoc_insertion_point(copy_constructor:greptime.v1.meta.PullConfigResponse)
|
||||
}
|
||||
|
||||
inline void PullConfigResponse::SharedCtor(
|
||||
::_pb::Arena* arena, bool is_message_owned) {
|
||||
(void)arena;
|
||||
(void)is_message_owned;
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.payload_){}
|
||||
, decltype(_impl_.header_){nullptr}
|
||||
, /*decltype(_impl_._cached_size_)*/{}
|
||||
};
|
||||
_impl_.payload_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.payload_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
}
|
||||
|
||||
PullConfigResponse::~PullConfigResponse() {
|
||||
// @@protoc_insertion_point(destructor:greptime.v1.meta.PullConfigResponse)
|
||||
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
||||
(void)arena;
|
||||
return;
|
||||
}
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
inline void PullConfigResponse::SharedDtor() {
|
||||
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||
_impl_.payload_.Destroy();
|
||||
if (this != internal_default_instance()) delete _impl_.header_;
|
||||
}
|
||||
|
||||
void PullConfigResponse::SetCachedSize(int size) const {
|
||||
_impl_._cached_size_.Set(size);
|
||||
}
|
||||
|
||||
void PullConfigResponse::Clear() {
|
||||
// @@protoc_insertion_point(message_clear_start:greptime.v1.meta.PullConfigResponse)
|
||||
uint32_t cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
_impl_.payload_.ClearToEmpty();
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
|
||||
delete _impl_.header_;
|
||||
}
|
||||
_impl_.header_ = nullptr;
|
||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
const char* PullConfigResponse::_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;
|
||||
// string payload = 2;
|
||||
case 2:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
||||
auto str = _internal_mutable_payload();
|
||||
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||||
CHK_(ptr);
|
||||
CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.meta.PullConfigResponse.payload"));
|
||||
} 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* PullConfigResponse::_InternalSerialize(
|
||||
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.meta.PullConfigResponse)
|
||||
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);
|
||||
}
|
||||
|
||||
// string payload = 2;
|
||||
if (!this->_internal_payload().empty()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->_internal_payload().data(), static_cast<int>(this->_internal_payload().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"greptime.v1.meta.PullConfigResponse.payload");
|
||||
target = stream->WriteStringMaybeAliased(
|
||||
2, this->_internal_payload(), target);
|
||||
}
|
||||
|
||||
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.PullConfigResponse)
|
||||
return target;
|
||||
}
|
||||
|
||||
size_t PullConfigResponse::ByteSizeLong() const {
|
||||
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.meta.PullConfigResponse)
|
||||
size_t total_size = 0;
|
||||
|
||||
uint32_t cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string payload = 2;
|
||||
if (!this->_internal_payload().empty()) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->_internal_payload());
|
||||
}
|
||||
|
||||
// .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 PullConfigResponse::_class_data_ = {
|
||||
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
||||
PullConfigResponse::MergeImpl
|
||||
};
|
||||
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PullConfigResponse::GetClassData() const { return &_class_data_; }
|
||||
|
||||
|
||||
void PullConfigResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
||||
auto* const _this = static_cast<PullConfigResponse*>(&to_msg);
|
||||
auto& from = static_cast<const PullConfigResponse&>(from_msg);
|
||||
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.meta.PullConfigResponse)
|
||||
GOOGLE_DCHECK_NE(&from, _this);
|
||||
uint32_t cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (!from._internal_payload().empty()) {
|
||||
_this->_internal_set_payload(from._internal_payload());
|
||||
}
|
||||
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 PullConfigResponse::CopyFrom(const PullConfigResponse& from) {
|
||||
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.meta.PullConfigResponse)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool PullConfigResponse::IsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void PullConfigResponse::InternalSwap(PullConfigResponse* other) {
|
||||
using std::swap;
|
||||
auto* lhs_arena = GetArenaForAllocation();
|
||||
auto* rhs_arena = other->GetArenaForAllocation();
|
||||
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||||
&_impl_.payload_, lhs_arena,
|
||||
&other->_impl_.payload_, rhs_arena
|
||||
);
|
||||
swap(_impl_.header_, other->_impl_.header_);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata PullConfigResponse::GetMetadata() const {
|
||||
return ::_pbi::AssignDescriptors(
|
||||
&descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto_once,
|
||||
file_level_metadata_greptime_2fv1_2fmeta_2fconfig_2eproto[1]);
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
} // namespace meta
|
||||
} // namespace v1
|
||||
} // namespace greptime
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> PROTOBUF_NOINLINE ::greptime::v1::meta::PullConfigRequest*
|
||||
Arena::CreateMaybeMessage< ::greptime::v1::meta::PullConfigRequest >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::greptime::v1::meta::PullConfigRequest >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE ::greptime::v1::meta::PullConfigResponse*
|
||||
Arena::CreateMaybeMessage< ::greptime::v1::meta::PullConfigResponse >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::greptime::v1::meta::PullConfigResponse >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
@@ -0,0 +1,648 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: greptime/v1/meta/config.proto
|
||||
|
||||
#ifndef GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2fmeta_2fconfig_2eproto
|
||||
#define GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2fmeta_2fconfig_2eproto
|
||||
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#if PROTOBUF_VERSION < 3021000
|
||||
#error This file was generated by a newer version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please update
|
||||
#error your headers.
|
||||
#endif
|
||||
#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION
|
||||
#error This file was generated by an older version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please
|
||||
#error regenerate this file with a newer version of protoc.
|
||||
#endif
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/arena.h>
|
||||
#include <google/protobuf/arenastring.h>
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/metadata_lite.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
|
||||
#include <google/protobuf/extension_set.h> // IWYU pragma: export
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
#include "greptime/v1/meta/common.pb.h"
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#define PROTOBUF_INTERNAL_EXPORT_greptime_2fv1_2fmeta_2fconfig_2eproto
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
namespace internal {
|
||||
class AnyMetadata;
|
||||
} // namespace internal
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// Internal implementation detail -- do not use these members.
|
||||
struct TableStruct_greptime_2fv1_2fmeta_2fconfig_2eproto {
|
||||
static const uint32_t offsets[];
|
||||
};
|
||||
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_greptime_2fv1_2fmeta_2fconfig_2eproto;
|
||||
namespace greptime {
|
||||
namespace v1 {
|
||||
namespace meta {
|
||||
class PullConfigRequest;
|
||||
struct PullConfigRequestDefaultTypeInternal;
|
||||
extern PullConfigRequestDefaultTypeInternal _PullConfigRequest_default_instance_;
|
||||
class PullConfigResponse;
|
||||
struct PullConfigResponseDefaultTypeInternal;
|
||||
extern PullConfigResponseDefaultTypeInternal _PullConfigResponse_default_instance_;
|
||||
} // namespace meta
|
||||
} // namespace v1
|
||||
} // namespace greptime
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
template<> ::greptime::v1::meta::PullConfigRequest* Arena::CreateMaybeMessage<::greptime::v1::meta::PullConfigRequest>(Arena*);
|
||||
template<> ::greptime::v1::meta::PullConfigResponse* Arena::CreateMaybeMessage<::greptime::v1::meta::PullConfigResponse>(Arena*);
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
namespace greptime {
|
||||
namespace v1 {
|
||||
namespace meta {
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class PullConfigRequest final :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.PullConfigRequest) */ {
|
||||
public:
|
||||
inline PullConfigRequest() : PullConfigRequest(nullptr) {}
|
||||
~PullConfigRequest() override;
|
||||
explicit PROTOBUF_CONSTEXPR PullConfigRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
|
||||
|
||||
PullConfigRequest(const PullConfigRequest& from);
|
||||
PullConfigRequest(PullConfigRequest&& from) noexcept
|
||||
: PullConfigRequest() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline PullConfigRequest& operator=(const PullConfigRequest& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline PullConfigRequest& operator=(PullConfigRequest&& 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 PullConfigRequest& default_instance() {
|
||||
return *internal_default_instance();
|
||||
}
|
||||
static inline const PullConfigRequest* internal_default_instance() {
|
||||
return reinterpret_cast<const PullConfigRequest*>(
|
||||
&_PullConfigRequest_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
0;
|
||||
|
||||
friend void swap(PullConfigRequest& a, PullConfigRequest& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(PullConfigRequest* 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(PullConfigRequest* other) {
|
||||
if (other == this) return;
|
||||
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
PullConfigRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
|
||||
return CreateMaybeMessage<PullConfigRequest>(arena);
|
||||
}
|
||||
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
|
||||
void CopyFrom(const PullConfigRequest& from);
|
||||
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
|
||||
void MergeFrom( const PullConfigRequest& from) {
|
||||
PullConfigRequest::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(PullConfigRequest* other);
|
||||
|
||||
private:
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "greptime.v1.meta.PullConfigRequest";
|
||||
}
|
||||
protected:
|
||||
explicit PullConfigRequest(::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 {
|
||||
kHeaderFieldNumber = 1,
|
||||
};
|
||||
// .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.PullConfigRequest)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
struct Impl_ {
|
||||
::greptime::v1::meta::RequestHeader* header_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
friend struct ::TableStruct_greptime_2fv1_2fmeta_2fconfig_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class PullConfigResponse final :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.PullConfigResponse) */ {
|
||||
public:
|
||||
inline PullConfigResponse() : PullConfigResponse(nullptr) {}
|
||||
~PullConfigResponse() override;
|
||||
explicit PROTOBUF_CONSTEXPR PullConfigResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
|
||||
|
||||
PullConfigResponse(const PullConfigResponse& from);
|
||||
PullConfigResponse(PullConfigResponse&& from) noexcept
|
||||
: PullConfigResponse() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline PullConfigResponse& operator=(const PullConfigResponse& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline PullConfigResponse& operator=(PullConfigResponse&& 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 PullConfigResponse& default_instance() {
|
||||
return *internal_default_instance();
|
||||
}
|
||||
static inline const PullConfigResponse* internal_default_instance() {
|
||||
return reinterpret_cast<const PullConfigResponse*>(
|
||||
&_PullConfigResponse_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
1;
|
||||
|
||||
friend void swap(PullConfigResponse& a, PullConfigResponse& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(PullConfigResponse* 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(PullConfigResponse* other) {
|
||||
if (other == this) return;
|
||||
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
PullConfigResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
|
||||
return CreateMaybeMessage<PullConfigResponse>(arena);
|
||||
}
|
||||
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
|
||||
void CopyFrom(const PullConfigResponse& from);
|
||||
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
|
||||
void MergeFrom( const PullConfigResponse& from) {
|
||||
PullConfigResponse::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(PullConfigResponse* other);
|
||||
|
||||
private:
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "greptime.v1.meta.PullConfigResponse";
|
||||
}
|
||||
protected:
|
||||
explicit PullConfigResponse(::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 {
|
||||
kPayloadFieldNumber = 2,
|
||||
kHeaderFieldNumber = 1,
|
||||
};
|
||||
// string payload = 2;
|
||||
void clear_payload();
|
||||
const std::string& payload() const;
|
||||
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
void set_payload(ArgT0&& arg0, ArgT... args);
|
||||
std::string* mutable_payload();
|
||||
PROTOBUF_NODISCARD std::string* release_payload();
|
||||
void set_allocated_payload(std::string* payload);
|
||||
private:
|
||||
const std::string& _internal_payload() const;
|
||||
inline PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const std::string& value);
|
||||
std::string* _internal_mutable_payload();
|
||||
public:
|
||||
|
||||
// .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.PullConfigResponse)
|
||||
private:
|
||||
class _Internal;
|
||||
|
||||
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
struct Impl_ {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_;
|
||||
::greptime::v1::meta::ResponseHeader* header_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
friend struct ::TableStruct_greptime_2fv1_2fmeta_2fconfig_2eproto;
|
||||
};
|
||||
// ===================================================================
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif // __GNUC__
|
||||
// PullConfigRequest
|
||||
|
||||
// .greptime.v1.meta.RequestHeader header = 1;
|
||||
inline bool PullConfigRequest::_internal_has_header() const {
|
||||
return this != internal_default_instance() && _impl_.header_ != nullptr;
|
||||
}
|
||||
inline bool PullConfigRequest::has_header() const {
|
||||
return _internal_has_header();
|
||||
}
|
||||
inline const ::greptime::v1::meta::RequestHeader& PullConfigRequest::_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& PullConfigRequest::header() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.meta.PullConfigRequest.header)
|
||||
return _internal_header();
|
||||
}
|
||||
inline void PullConfigRequest::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.PullConfigRequest.header)
|
||||
}
|
||||
inline ::greptime::v1::meta::RequestHeader* PullConfigRequest::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* PullConfigRequest::unsafe_arena_release_header() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.meta.PullConfigRequest.header)
|
||||
|
||||
::greptime::v1::meta::RequestHeader* temp = _impl_.header_;
|
||||
_impl_.header_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline ::greptime::v1::meta::RequestHeader* PullConfigRequest::_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* PullConfigRequest::mutable_header() {
|
||||
::greptime::v1::meta::RequestHeader* _msg = _internal_mutable_header();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.meta.PullConfigRequest.header)
|
||||
return _msg;
|
||||
}
|
||||
inline void PullConfigRequest::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.PullConfigRequest.header)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// PullConfigResponse
|
||||
|
||||
// .greptime.v1.meta.ResponseHeader header = 1;
|
||||
inline bool PullConfigResponse::_internal_has_header() const {
|
||||
return this != internal_default_instance() && _impl_.header_ != nullptr;
|
||||
}
|
||||
inline bool PullConfigResponse::has_header() const {
|
||||
return _internal_has_header();
|
||||
}
|
||||
inline const ::greptime::v1::meta::ResponseHeader& PullConfigResponse::_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& PullConfigResponse::header() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.meta.PullConfigResponse.header)
|
||||
return _internal_header();
|
||||
}
|
||||
inline void PullConfigResponse::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.PullConfigResponse.header)
|
||||
}
|
||||
inline ::greptime::v1::meta::ResponseHeader* PullConfigResponse::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* PullConfigResponse::unsafe_arena_release_header() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.meta.PullConfigResponse.header)
|
||||
|
||||
::greptime::v1::meta::ResponseHeader* temp = _impl_.header_;
|
||||
_impl_.header_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline ::greptime::v1::meta::ResponseHeader* PullConfigResponse::_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* PullConfigResponse::mutable_header() {
|
||||
::greptime::v1::meta::ResponseHeader* _msg = _internal_mutable_header();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.meta.PullConfigResponse.header)
|
||||
return _msg;
|
||||
}
|
||||
inline void PullConfigResponse::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.PullConfigResponse.header)
|
||||
}
|
||||
|
||||
// string payload = 2;
|
||||
inline void PullConfigResponse::clear_payload() {
|
||||
_impl_.payload_.ClearToEmpty();
|
||||
}
|
||||
inline const std::string& PullConfigResponse::payload() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.meta.PullConfigResponse.payload)
|
||||
return _internal_payload();
|
||||
}
|
||||
template <typename ArgT0, typename... ArgT>
|
||||
inline PROTOBUF_ALWAYS_INLINE
|
||||
void PullConfigResponse::set_payload(ArgT0&& arg0, ArgT... args) {
|
||||
|
||||
_impl_.payload_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.meta.PullConfigResponse.payload)
|
||||
}
|
||||
inline std::string* PullConfigResponse::mutable_payload() {
|
||||
std::string* _s = _internal_mutable_payload();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.meta.PullConfigResponse.payload)
|
||||
return _s;
|
||||
}
|
||||
inline const std::string& PullConfigResponse::_internal_payload() const {
|
||||
return _impl_.payload_.Get();
|
||||
}
|
||||
inline void PullConfigResponse::_internal_set_payload(const std::string& value) {
|
||||
|
||||
_impl_.payload_.Set(value, GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* PullConfigResponse::_internal_mutable_payload() {
|
||||
|
||||
return _impl_.payload_.Mutable(GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* PullConfigResponse::release_payload() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.meta.PullConfigResponse.payload)
|
||||
return _impl_.payload_.Release();
|
||||
}
|
||||
inline void PullConfigResponse::set_allocated_payload(std::string* payload) {
|
||||
if (payload != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
_impl_.payload_.SetAllocated(payload, GetArenaForAllocation());
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (_impl_.payload_.IsDefault()) {
|
||||
_impl_.payload_.Set("", GetArenaForAllocation());
|
||||
}
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.PullConfigResponse.payload)
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // __GNUC__
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace meta
|
||||
} // namespace v1
|
||||
} // namespace greptime
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2fmeta_2fconfig_2eproto
|
||||
@@ -0,0 +1,253 @@
|
||||
// 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.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.6
|
||||
// source: greptime/v1/meta/config.proto
|
||||
|
||||
package meta
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type PullConfigRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PullConfigRequest) Reset() {
|
||||
*x = PullConfigRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_config_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PullConfigRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PullConfigRequest) ProtoMessage() {}
|
||||
|
||||
func (x *PullConfigRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_config_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 PullConfigRequest.ProtoReflect.Descriptor instead.
|
||||
func (*PullConfigRequest) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_config_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *PullConfigRequest) GetHeader() *RequestHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type PullConfigResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PullConfigResponse) Reset() {
|
||||
*x = PullConfigResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_config_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PullConfigResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PullConfigResponse) ProtoMessage() {}
|
||||
|
||||
func (x *PullConfigResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_config_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 PullConfigResponse.ProtoReflect.Descriptor instead.
|
||||
func (*PullConfigResponse) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_config_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *PullConfigResponse) GetHeader() *ResponseHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PullConfigResponse) GetPayload() string {
|
||||
if x != nil {
|
||||
return x.Payload
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_greptime_v1_meta_config_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_greptime_v1_meta_config_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x10, 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, 0x4c, 0x0a, 0x11, 0x50, 0x75, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x22, 0x68,
|
||||
0x0a, 0x12, 0x50, 0x75, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x18,
|
||||
0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x32, 0x63, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x12, 0x59, 0x0a, 0x0a, 0x50, 0x75, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x12, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 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,
|
||||
}
|
||||
|
||||
var (
|
||||
file_greptime_v1_meta_config_proto_rawDescOnce sync.Once
|
||||
file_greptime_v1_meta_config_proto_rawDescData = file_greptime_v1_meta_config_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_greptime_v1_meta_config_proto_rawDescGZIP() []byte {
|
||||
file_greptime_v1_meta_config_proto_rawDescOnce.Do(func() {
|
||||
file_greptime_v1_meta_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_meta_config_proto_rawDescData)
|
||||
})
|
||||
return file_greptime_v1_meta_config_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_greptime_v1_meta_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_greptime_v1_meta_config_proto_goTypes = []interface{}{
|
||||
(*PullConfigRequest)(nil), // 0: greptime.v1.meta.PullConfigRequest
|
||||
(*PullConfigResponse)(nil), // 1: greptime.v1.meta.PullConfigResponse
|
||||
(*RequestHeader)(nil), // 2: greptime.v1.meta.RequestHeader
|
||||
(*ResponseHeader)(nil), // 3: greptime.v1.meta.ResponseHeader
|
||||
}
|
||||
var file_greptime_v1_meta_config_proto_depIdxs = []int32{
|
||||
2, // 0: greptime.v1.meta.PullConfigRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
3, // 1: greptime.v1.meta.PullConfigResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
0, // 2: greptime.v1.meta.Config.PullConfig:input_type -> greptime.v1.meta.PullConfigRequest
|
||||
1, // 3: greptime.v1.meta.Config.PullConfig:output_type -> greptime.v1.meta.PullConfigResponse
|
||||
3, // [3:4] is the sub-list for method output_type
|
||||
2, // [2:3] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_greptime_v1_meta_config_proto_init() }
|
||||
func file_greptime_v1_meta_config_proto_init() {
|
||||
if File_greptime_v1_meta_config_proto != nil {
|
||||
return
|
||||
}
|
||||
file_greptime_v1_meta_common_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_greptime_v1_meta_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PullConfigRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PullConfigResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_greptime_v1_meta_config_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_greptime_v1_meta_config_proto_goTypes,
|
||||
DependencyIndexes: file_greptime_v1_meta_config_proto_depIdxs,
|
||||
MessageInfos: file_greptime_v1_meta_config_proto_msgTypes,
|
||||
}.Build()
|
||||
File_greptime_v1_meta_config_proto = out.File
|
||||
file_greptime_v1_meta_config_proto_rawDesc = nil
|
||||
file_greptime_v1_meta_config_proto_goTypes = nil
|
||||
file_greptime_v1_meta_config_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.6
|
||||
// source: greptime/v1/meta/config.proto
|
||||
|
||||
package meta
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// ConfigClient is the client API for Config service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type ConfigClient interface {
|
||||
// Pull configuration from meta server.
|
||||
PullConfig(ctx context.Context, in *PullConfigRequest, opts ...grpc.CallOption) (*PullConfigResponse, error)
|
||||
}
|
||||
|
||||
type configClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewConfigClient(cc grpc.ClientConnInterface) ConfigClient {
|
||||
return &configClient{cc}
|
||||
}
|
||||
|
||||
func (c *configClient) PullConfig(ctx context.Context, in *PullConfigRequest, opts ...grpc.CallOption) (*PullConfigResponse, error) {
|
||||
out := new(PullConfigResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Config/PullConfig", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ConfigServer is the server API for Config service.
|
||||
// All implementations must embed UnimplementedConfigServer
|
||||
// for forward compatibility
|
||||
type ConfigServer interface {
|
||||
// Pull configuration from meta server.
|
||||
PullConfig(context.Context, *PullConfigRequest) (*PullConfigResponse, error)
|
||||
mustEmbedUnimplementedConfigServer()
|
||||
}
|
||||
|
||||
// UnimplementedConfigServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedConfigServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedConfigServer) PullConfig(context.Context, *PullConfigRequest) (*PullConfigResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PullConfig not implemented")
|
||||
}
|
||||
func (UnimplementedConfigServer) mustEmbedUnimplementedConfigServer() {}
|
||||
|
||||
// UnsafeConfigServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ConfigServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeConfigServer interface {
|
||||
mustEmbedUnimplementedConfigServer()
|
||||
}
|
||||
|
||||
func RegisterConfigServer(s grpc.ServiceRegistrar, srv ConfigServer) {
|
||||
s.RegisterService(&Config_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Config_PullConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PullConfigRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ConfigServer).PullConfig(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Config/PullConfig",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ConfigServer).PullConfig(ctx, req.(*PullConfigRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Config_ServiceDesc is the grpc.ServiceDesc for Config service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Config_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "greptime.v1.meta.Config",
|
||||
HandlerType: (*ConfigServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "PullConfig",
|
||||
Handler: _Config_PullConfig_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "greptime/v1/meta/config.proto",
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,35 @@
|
||||
// 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.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package greptime.v1.meta;
|
||||
|
||||
import "greptime/v1/meta/common.proto";
|
||||
|
||||
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
|
||||
|
||||
service Config {
|
||||
// Pull configuration from meta server.
|
||||
rpc PullConfig(PullConfigRequest) returns (PullConfigResponse) {}
|
||||
}
|
||||
|
||||
message PullConfigRequest {
|
||||
RequestHeader header = 1;
|
||||
}
|
||||
|
||||
message PullConfigResponse {
|
||||
ResponseHeader header = 1;
|
||||
string payload = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user