feat: add mailbox message header (#310)
Signed-off-by: WenyXu <wenymedia@gmail.com>
This commit is contained in:
@@ -305,11 +305,36 @@ struct AskLeaderResponseDefaultTypeInternal {
|
||||
};
|
||||
};
|
||||
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AskLeaderResponseDefaultTypeInternal _AskLeaderResponse_default_instance_;
|
||||
PROTOBUF_CONSTEXPR MailboxMessageHeader_TracingContextEntry_DoNotUse::MailboxMessageHeader_TracingContextEntry_DoNotUse(
|
||||
::_pbi::ConstantInitialized) {}
|
||||
struct MailboxMessageHeader_TracingContextEntry_DoNotUseDefaultTypeInternal {
|
||||
PROTOBUF_CONSTEXPR MailboxMessageHeader_TracingContextEntry_DoNotUseDefaultTypeInternal()
|
||||
: _instance(::_pbi::ConstantInitialized{}) {}
|
||||
~MailboxMessageHeader_TracingContextEntry_DoNotUseDefaultTypeInternal() {}
|
||||
union {
|
||||
MailboxMessageHeader_TracingContextEntry_DoNotUse _instance;
|
||||
};
|
||||
};
|
||||
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MailboxMessageHeader_TracingContextEntry_DoNotUseDefaultTypeInternal _MailboxMessageHeader_TracingContextEntry_DoNotUse_default_instance_;
|
||||
PROTOBUF_CONSTEXPR MailboxMessageHeader::MailboxMessageHeader(
|
||||
::_pbi::ConstantInitialized): _impl_{
|
||||
/*decltype(_impl_.tracing_context_)*/{::_pbi::ConstantInitialized()}
|
||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||
struct MailboxMessageHeaderDefaultTypeInternal {
|
||||
PROTOBUF_CONSTEXPR MailboxMessageHeaderDefaultTypeInternal()
|
||||
: _instance(::_pbi::ConstantInitialized{}) {}
|
||||
~MailboxMessageHeaderDefaultTypeInternal() {}
|
||||
union {
|
||||
MailboxMessageHeader _instance;
|
||||
};
|
||||
};
|
||||
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MailboxMessageHeaderDefaultTypeInternal _MailboxMessageHeader_default_instance_;
|
||||
PROTOBUF_CONSTEXPR MailboxMessage::MailboxMessage(
|
||||
::_pbi::ConstantInitialized): _impl_{
|
||||
/*decltype(_impl_.subject_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.from_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.to_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.header_)*/nullptr
|
||||
, /*decltype(_impl_.id_)*/uint64_t{0u}
|
||||
, /*decltype(_impl_.timestamp_millis_)*/int64_t{0}
|
||||
, /*decltype(_impl_.payload_)*/{}
|
||||
@@ -327,7 +352,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT
|
||||
} // namespace meta
|
||||
} // namespace v1
|
||||
} // namespace greptime
|
||||
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[20];
|
||||
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[22];
|
||||
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fmeta_2fheartbeat_2eproto[1];
|
||||
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fmeta_2fheartbeat_2eproto = nullptr;
|
||||
|
||||
@@ -523,12 +548,30 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto::offsets[] P
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::AskLeaderResponse, _impl_.header_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::AskLeaderResponse, _impl_.leader_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MailboxMessageHeader_TracingContextEntry_DoNotUse, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MailboxMessageHeader_TracingContextEntry_DoNotUse, _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::MailboxMessageHeader_TracingContextEntry_DoNotUse, key_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MailboxMessageHeader_TracingContextEntry_DoNotUse, value_),
|
||||
0,
|
||||
1,
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MailboxMessageHeader, _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::MailboxMessageHeader, _impl_.tracing_context_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MailboxMessage, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MailboxMessage, _impl_._oneof_case_[0]),
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MailboxMessage, _impl_.header_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MailboxMessage, _impl_.id_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MailboxMessage, _impl_.subject_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MailboxMessage, _impl_.from_),
|
||||
@@ -557,7 +600,9 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
|
||||
{ 166, -1, -1, sizeof(::greptime::v1::meta::RegionLease)},
|
||||
{ 176, -1, -1, sizeof(::greptime::v1::meta::AskLeaderRequest)},
|
||||
{ 183, -1, -1, sizeof(::greptime::v1::meta::AskLeaderResponse)},
|
||||
{ 191, -1, -1, sizeof(::greptime::v1::meta::MailboxMessage)},
|
||||
{ 191, 199, -1, sizeof(::greptime::v1::meta::MailboxMessageHeader_TracingContextEntry_DoNotUse)},
|
||||
{ 201, -1, -1, sizeof(::greptime::v1::meta::MailboxMessageHeader)},
|
||||
{ 208, -1, -1, sizeof(::greptime::v1::meta::MailboxMessage)},
|
||||
};
|
||||
|
||||
static const ::_pb::Message* const file_default_instances[] = {
|
||||
@@ -580,6 +625,8 @@ static const ::_pb::Message* const file_default_instances[] = {
|
||||
&::greptime::v1::meta::_RegionLease_default_instance_._instance,
|
||||
&::greptime::v1::meta::_AskLeaderRequest_default_instance_._instance,
|
||||
&::greptime::v1::meta::_AskLeaderResponse_default_instance_._instance,
|
||||
&::greptime::v1::meta::_MailboxMessageHeader_TracingContextEntry_DoNotUse_default_instance_._instance,
|
||||
&::greptime::v1::meta::_MailboxMessageHeader_default_instance_._instance,
|
||||
&::greptime::v1::meta::_MailboxMessage_default_instance_._instance,
|
||||
};
|
||||
|
||||
@@ -651,28 +698,33 @@ const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto[]
|
||||
"\n\006header\030\001 \001(\0132\037.greptime.v1.meta.Reques"
|
||||
"tHeader\"m\n\021AskLeaderResponse\0220\n\006header\030\001"
|
||||
" \001(\0132 .greptime.v1.meta.ResponseHeader\022&"
|
||||
"\n\006leader\030\002 \001(\0132\026.greptime.v1.meta.Peer\"|"
|
||||
"\n\016MailboxMessage\022\n\n\002id\030\001 \001(\004\022\017\n\007subject\030"
|
||||
"\002 \001(\t\022\014\n\004from\030\003 \001(\t\022\n\n\002to\030\004 \001(\t\022\030\n\020times"
|
||||
"tamp_millis\030\005 \001(\003\022\016\n\004json\030\006 \001(\tH\000B\t\n\007pay"
|
||||
"load*=\n\nRegionRole\022\n\n\006Leader\020\000\022\014\n\010Follow"
|
||||
"er\020\001\022\025\n\021DowngradingLeader\020\0022\277\001\n\tHeartbea"
|
||||
"t\022Z\n\tHeartbeat\022\".greptime.v1.meta.Heartb"
|
||||
"eatRequest\032#.greptime.v1.meta.HeartbeatR"
|
||||
"esponse\"\000(\0010\001\022V\n\tAskLeader\022\".greptime.v1"
|
||||
".meta.AskLeaderRequest\032#.greptime.v1.met"
|
||||
"a.AskLeaderResponse\"\000B<Z:github.com/Grep"
|
||||
"timeTeam/greptime-proto/go/greptime/v1/m"
|
||||
"etab\006proto3"
|
||||
"\n\006leader\030\002 \001(\0132\026.greptime.v1.meta.Peer\"\242"
|
||||
"\001\n\024MailboxMessageHeader\022S\n\017tracing_conte"
|
||||
"xt\030\001 \003(\0132:.greptime.v1.meta.MailboxMessa"
|
||||
"geHeader.TracingContextEntry\0325\n\023TracingC"
|
||||
"ontextEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:"
|
||||
"\0028\001\"\264\001\n\016MailboxMessage\0226\n\006header\030@ \001(\0132&"
|
||||
".greptime.v1.meta.MailboxMessageHeader\022\n"
|
||||
"\n\002id\030\001 \001(\004\022\017\n\007subject\030\002 \001(\t\022\014\n\004from\030\003 \001("
|
||||
"\t\022\n\n\002to\030\004 \001(\t\022\030\n\020timestamp_millis\030\005 \001(\003\022"
|
||||
"\016\n\004json\030\006 \001(\tH\000B\t\n\007payload*=\n\nRegionRole"
|
||||
"\022\n\n\006Leader\020\000\022\014\n\010Follower\020\001\022\025\n\021Downgradin"
|
||||
"gLeader\020\0022\277\001\n\tHeartbeat\022Z\n\tHeartbeat\022\".g"
|
||||
"reptime.v1.meta.HeartbeatRequest\032#.grept"
|
||||
"ime.v1.meta.HeartbeatResponse\"\000(\0010\001\022V\n\tA"
|
||||
"skLeader\022\".greptime.v1.meta.AskLeaderReq"
|
||||
"uest\032#.greptime.v1.meta.AskLeaderRespons"
|
||||
"e\"\000B<Z:github.com/GreptimeTeam/greptime-"
|
||||
"proto/go/greptime/v1/metab\006proto3"
|
||||
;
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_deps[1] = {
|
||||
&::descriptor_table_greptime_2fv1_2fmeta_2fcommon_2eproto,
|
||||
};
|
||||
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto = {
|
||||
false, false, 3171, descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto,
|
||||
false, false, 3393, descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto,
|
||||
"greptime/v1/meta/heartbeat.proto",
|
||||
&descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once, descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_deps, 1, 20,
|
||||
&descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once, descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_deps, 1, 22,
|
||||
schemas, file_default_instances, TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto::offsets,
|
||||
file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto, file_level_enum_descriptors_greptime_2fv1_2fmeta_2fheartbeat_2eproto,
|
||||
file_level_service_descriptors_greptime_2fv1_2fmeta_2fheartbeat_2eproto,
|
||||
@@ -5151,10 +5203,248 @@ void AskLeaderResponse::InternalSwap(AskLeaderResponse* other) {
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class MailboxMessage::_Internal {
|
||||
MailboxMessageHeader_TracingContextEntry_DoNotUse::MailboxMessageHeader_TracingContextEntry_DoNotUse() {}
|
||||
MailboxMessageHeader_TracingContextEntry_DoNotUse::MailboxMessageHeader_TracingContextEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
|
||||
: SuperType(arena) {}
|
||||
void MailboxMessageHeader_TracingContextEntry_DoNotUse::MergeFrom(const MailboxMessageHeader_TracingContextEntry_DoNotUse& other) {
|
||||
MergeFromInternal(other);
|
||||
}
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata MailboxMessageHeader_TracingContextEntry_DoNotUse::GetMetadata() const {
|
||||
return ::_pbi::AssignDescriptors(
|
||||
&descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once,
|
||||
file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[19]);
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class MailboxMessageHeader::_Internal {
|
||||
public:
|
||||
};
|
||||
|
||||
MailboxMessageHeader::MailboxMessageHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||
bool is_message_owned)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
||||
SharedCtor(arena, is_message_owned);
|
||||
if (arena != nullptr && !is_message_owned) {
|
||||
arena->OwnCustomDestructor(this, &MailboxMessageHeader::ArenaDtor);
|
||||
}
|
||||
// @@protoc_insertion_point(arena_constructor:greptime.v1.meta.MailboxMessageHeader)
|
||||
}
|
||||
MailboxMessageHeader::MailboxMessageHeader(const MailboxMessageHeader& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
||||
MailboxMessageHeader* const _this = this; (void)_this;
|
||||
new (&_impl_) Impl_{
|
||||
/*decltype(_impl_.tracing_context_)*/{}
|
||||
, /*decltype(_impl_._cached_size_)*/{}};
|
||||
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
_this->_impl_.tracing_context_.MergeFrom(from._impl_.tracing_context_);
|
||||
// @@protoc_insertion_point(copy_constructor:greptime.v1.meta.MailboxMessageHeader)
|
||||
}
|
||||
|
||||
inline void MailboxMessageHeader::SharedCtor(
|
||||
::_pb::Arena* arena, bool is_message_owned) {
|
||||
(void)arena;
|
||||
(void)is_message_owned;
|
||||
new (&_impl_) Impl_{
|
||||
/*decltype(_impl_.tracing_context_)*/{::_pbi::ArenaInitialized(), arena}
|
||||
, /*decltype(_impl_._cached_size_)*/{}
|
||||
};
|
||||
}
|
||||
|
||||
MailboxMessageHeader::~MailboxMessageHeader() {
|
||||
// @@protoc_insertion_point(destructor:greptime.v1.meta.MailboxMessageHeader)
|
||||
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
||||
(void)arena;
|
||||
ArenaDtor(this);
|
||||
return;
|
||||
}
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
inline void MailboxMessageHeader::SharedDtor() {
|
||||
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||
_impl_.tracing_context_.Destruct();
|
||||
_impl_.tracing_context_.~MapField();
|
||||
}
|
||||
|
||||
void MailboxMessageHeader::ArenaDtor(void* object) {
|
||||
MailboxMessageHeader* _this = reinterpret_cast< MailboxMessageHeader* >(object);
|
||||
_this->_impl_.tracing_context_.Destruct();
|
||||
}
|
||||
void MailboxMessageHeader::SetCachedSize(int size) const {
|
||||
_impl_._cached_size_.Set(size);
|
||||
}
|
||||
|
||||
void MailboxMessageHeader::Clear() {
|
||||
// @@protoc_insertion_point(message_clear_start:greptime.v1.meta.MailboxMessageHeader)
|
||||
uint32_t cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
_impl_.tracing_context_.Clear();
|
||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
const char* MailboxMessageHeader::_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) {
|
||||
// map<string, string> tracing_context = 1;
|
||||
case 1:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
||||
ptr -= 1;
|
||||
do {
|
||||
ptr += 1;
|
||||
ptr = ctx->ParseMessage(&_impl_.tracing_context_, ptr);
|
||||
CHK_(ptr);
|
||||
if (!ctx->DataAvailable(ptr)) break;
|
||||
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* MailboxMessageHeader::_InternalSerialize(
|
||||
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.meta.MailboxMessageHeader)
|
||||
uint32_t cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// map<string, string> tracing_context = 1;
|
||||
if (!this->_internal_tracing_context().empty()) {
|
||||
using MapType = ::_pb::Map<std::string, std::string>;
|
||||
using WireHelper = MailboxMessageHeader_TracingContextEntry_DoNotUse::Funcs;
|
||||
const auto& map_field = this->_internal_tracing_context();
|
||||
auto check_utf8 = [](const MapType::value_type& entry) {
|
||||
(void)entry;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
entry.first.data(), static_cast<int>(entry.first.length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"greptime.v1.meta.MailboxMessageHeader.TracingContextEntry.key");
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
entry.second.data(), static_cast<int>(entry.second.length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"greptime.v1.meta.MailboxMessageHeader.TracingContextEntry.value");
|
||||
};
|
||||
|
||||
if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
|
||||
for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
|
||||
target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream);
|
||||
check_utf8(entry);
|
||||
}
|
||||
} else {
|
||||
for (const auto& entry : map_field) {
|
||||
target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream);
|
||||
check_utf8(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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.MailboxMessageHeader)
|
||||
return target;
|
||||
}
|
||||
|
||||
size_t MailboxMessageHeader::ByteSizeLong() const {
|
||||
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.meta.MailboxMessageHeader)
|
||||
size_t total_size = 0;
|
||||
|
||||
uint32_t cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// map<string, string> tracing_context = 1;
|
||||
total_size += 1 *
|
||||
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_tracing_context_size());
|
||||
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
|
||||
it = this->_internal_tracing_context().begin();
|
||||
it != this->_internal_tracing_context().end(); ++it) {
|
||||
total_size += MailboxMessageHeader_TracingContextEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
|
||||
}
|
||||
|
||||
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||
}
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MailboxMessageHeader::_class_data_ = {
|
||||
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
||||
MailboxMessageHeader::MergeImpl
|
||||
};
|
||||
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*MailboxMessageHeader::GetClassData() const { return &_class_data_; }
|
||||
|
||||
|
||||
void MailboxMessageHeader::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
||||
auto* const _this = static_cast<MailboxMessageHeader*>(&to_msg);
|
||||
auto& from = static_cast<const MailboxMessageHeader&>(from_msg);
|
||||
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.meta.MailboxMessageHeader)
|
||||
GOOGLE_DCHECK_NE(&from, _this);
|
||||
uint32_t cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
_this->_impl_.tracing_context_.MergeFrom(from._impl_.tracing_context_);
|
||||
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
}
|
||||
|
||||
void MailboxMessageHeader::CopyFrom(const MailboxMessageHeader& from) {
|
||||
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.meta.MailboxMessageHeader)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool MailboxMessageHeader::IsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void MailboxMessageHeader::InternalSwap(MailboxMessageHeader* other) {
|
||||
using std::swap;
|
||||
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||||
_impl_.tracing_context_.InternalSwap(&other->_impl_.tracing_context_);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata MailboxMessageHeader::GetMetadata() const {
|
||||
return ::_pbi::AssignDescriptors(
|
||||
&descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once,
|
||||
file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[20]);
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class MailboxMessage::_Internal {
|
||||
public:
|
||||
static const ::greptime::v1::meta::MailboxMessageHeader& header(const MailboxMessage* msg);
|
||||
};
|
||||
|
||||
const ::greptime::v1::meta::MailboxMessageHeader&
|
||||
MailboxMessage::_Internal::header(const MailboxMessage* msg) {
|
||||
return *msg->_impl_.header_;
|
||||
}
|
||||
MailboxMessage::MailboxMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||
bool is_message_owned)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
||||
@@ -5168,6 +5458,7 @@ MailboxMessage::MailboxMessage(const MailboxMessage& from)
|
||||
decltype(_impl_.subject_){}
|
||||
, decltype(_impl_.from_){}
|
||||
, decltype(_impl_.to_){}
|
||||
, decltype(_impl_.header_){nullptr}
|
||||
, decltype(_impl_.id_){}
|
||||
, decltype(_impl_.timestamp_millis_){}
|
||||
, decltype(_impl_.payload_){}
|
||||
@@ -5199,6 +5490,9 @@ MailboxMessage::MailboxMessage(const MailboxMessage& from)
|
||||
_this->_impl_.to_.Set(from._internal_to(),
|
||||
_this->GetArenaForAllocation());
|
||||
}
|
||||
if (from._internal_has_header()) {
|
||||
_this->_impl_.header_ = new ::greptime::v1::meta::MailboxMessageHeader(*from._impl_.header_);
|
||||
}
|
||||
::memcpy(&_impl_.id_, &from._impl_.id_,
|
||||
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.timestamp_millis_) -
|
||||
reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.timestamp_millis_));
|
||||
@@ -5223,6 +5517,7 @@ inline void MailboxMessage::SharedCtor(
|
||||
decltype(_impl_.subject_){}
|
||||
, decltype(_impl_.from_){}
|
||||
, decltype(_impl_.to_){}
|
||||
, decltype(_impl_.header_){nullptr}
|
||||
, decltype(_impl_.id_){uint64_t{0u}}
|
||||
, decltype(_impl_.timestamp_millis_){int64_t{0}}
|
||||
, decltype(_impl_.payload_){}
|
||||
@@ -5258,6 +5553,7 @@ inline void MailboxMessage::SharedDtor() {
|
||||
_impl_.subject_.Destroy();
|
||||
_impl_.from_.Destroy();
|
||||
_impl_.to_.Destroy();
|
||||
if (this != internal_default_instance()) delete _impl_.header_;
|
||||
if (has_payload()) {
|
||||
clear_payload();
|
||||
}
|
||||
@@ -5291,6 +5587,10 @@ void MailboxMessage::Clear() {
|
||||
_impl_.subject_.ClearToEmpty();
|
||||
_impl_.from_.ClearToEmpty();
|
||||
_impl_.to_.ClearToEmpty();
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
|
||||
delete _impl_.header_;
|
||||
}
|
||||
_impl_.header_ = nullptr;
|
||||
::memset(&_impl_.id_, 0, static_cast<size_t>(
|
||||
reinterpret_cast<char*>(&_impl_.timestamp_millis_) -
|
||||
reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.timestamp_millis_));
|
||||
@@ -5360,6 +5660,14 @@ const char* MailboxMessage::_InternalParse(const char* ptr, ::_pbi::ParseContext
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// .greptime.v1.meta.MailboxMessageHeader header = 64;
|
||||
case 64:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 2)) {
|
||||
ptr = ctx->ParseMessage(_internal_mutable_header(), ptr);
|
||||
CHK_(ptr);
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
default:
|
||||
goto handle_unusual;
|
||||
} // switch
|
||||
@@ -5441,6 +5749,13 @@ uint8_t* MailboxMessage::_InternalSerialize(
|
||||
6, this->_internal_json(), target);
|
||||
}
|
||||
|
||||
// .greptime.v1.meta.MailboxMessageHeader header = 64;
|
||||
if (this->_internal_has_header()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||
InternalWriteMessage(64, _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);
|
||||
@@ -5478,6 +5793,13 @@ size_t MailboxMessage::ByteSizeLong() const {
|
||||
this->_internal_to());
|
||||
}
|
||||
|
||||
// .greptime.v1.meta.MailboxMessageHeader header = 64;
|
||||
if (this->_internal_has_header()) {
|
||||
total_size += 2 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
||||
*_impl_.header_);
|
||||
}
|
||||
|
||||
// uint64 id = 1;
|
||||
if (this->_internal_id() != 0) {
|
||||
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_id());
|
||||
@@ -5527,6 +5849,10 @@ void MailboxMessage::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :
|
||||
if (!from._internal_to().empty()) {
|
||||
_this->_internal_set_to(from._internal_to());
|
||||
}
|
||||
if (from._internal_has_header()) {
|
||||
_this->_internal_mutable_header()->::greptime::v1::meta::MailboxMessageHeader::MergeFrom(
|
||||
from._internal_header());
|
||||
}
|
||||
if (from._internal_id() != 0) {
|
||||
_this->_internal_set_id(from._internal_id());
|
||||
}
|
||||
@@ -5576,9 +5902,9 @@ void MailboxMessage::InternalSwap(MailboxMessage* other) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
||||
PROTOBUF_FIELD_OFFSET(MailboxMessage, _impl_.timestamp_millis_)
|
||||
+ sizeof(MailboxMessage::_impl_.timestamp_millis_)
|
||||
- PROTOBUF_FIELD_OFFSET(MailboxMessage, _impl_.id_)>(
|
||||
reinterpret_cast<char*>(&_impl_.id_),
|
||||
reinterpret_cast<char*>(&other->_impl_.id_));
|
||||
- PROTOBUF_FIELD_OFFSET(MailboxMessage, _impl_.header_)>(
|
||||
reinterpret_cast<char*>(&_impl_.header_),
|
||||
reinterpret_cast<char*>(&other->_impl_.header_));
|
||||
swap(_impl_.payload_, other->_impl_.payload_);
|
||||
swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
|
||||
}
|
||||
@@ -5586,7 +5912,7 @@ void MailboxMessage::InternalSwap(MailboxMessage* other) {
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata MailboxMessage::GetMetadata() const {
|
||||
return ::_pbi::AssignDescriptors(
|
||||
&descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once,
|
||||
file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[19]);
|
||||
file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[21]);
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
@@ -5670,6 +5996,14 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::meta::AskLeaderResponse*
|
||||
Arena::CreateMaybeMessage< ::greptime::v1::meta::AskLeaderResponse >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::greptime::v1::meta::AskLeaderResponse >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE ::greptime::v1::meta::MailboxMessageHeader_TracingContextEntry_DoNotUse*
|
||||
Arena::CreateMaybeMessage< ::greptime::v1::meta::MailboxMessageHeader_TracingContextEntry_DoNotUse >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::greptime::v1::meta::MailboxMessageHeader_TracingContextEntry_DoNotUse >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE ::greptime::v1::meta::MailboxMessageHeader*
|
||||
Arena::CreateMaybeMessage< ::greptime::v1::meta::MailboxMessageHeader >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::greptime::v1::meta::MailboxMessageHeader >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE ::greptime::v1::meta::MailboxMessage*
|
||||
Arena::CreateMaybeMessage< ::greptime::v1::meta::MailboxMessage >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::greptime::v1::meta::MailboxMessage >(arena);
|
||||
|
||||
@@ -97,6 +97,12 @@ extern HeartbeatResponseDefaultTypeInternal _HeartbeatResponse_default_instance_
|
||||
class MailboxMessage;
|
||||
struct MailboxMessageDefaultTypeInternal;
|
||||
extern MailboxMessageDefaultTypeInternal _MailboxMessage_default_instance_;
|
||||
class MailboxMessageHeader;
|
||||
struct MailboxMessageHeaderDefaultTypeInternal;
|
||||
extern MailboxMessageHeaderDefaultTypeInternal _MailboxMessageHeader_default_instance_;
|
||||
class MailboxMessageHeader_TracingContextEntry_DoNotUse;
|
||||
struct MailboxMessageHeader_TracingContextEntry_DoNotUseDefaultTypeInternal;
|
||||
extern MailboxMessageHeader_TracingContextEntry_DoNotUseDefaultTypeInternal _MailboxMessageHeader_TracingContextEntry_DoNotUse_default_instance_;
|
||||
class NodeInfo;
|
||||
struct NodeInfoDefaultTypeInternal;
|
||||
extern NodeInfoDefaultTypeInternal _NodeInfo_default_instance_;
|
||||
@@ -131,6 +137,8 @@ template<> ::greptime::v1::meta::HeartbeatRequest* Arena::CreateMaybeMessage<::g
|
||||
template<> ::greptime::v1::meta::HeartbeatRequest_ExtensionsEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::meta::HeartbeatRequest_ExtensionsEntry_DoNotUse>(Arena*);
|
||||
template<> ::greptime::v1::meta::HeartbeatResponse* Arena::CreateMaybeMessage<::greptime::v1::meta::HeartbeatResponse>(Arena*);
|
||||
template<> ::greptime::v1::meta::MailboxMessage* Arena::CreateMaybeMessage<::greptime::v1::meta::MailboxMessage>(Arena*);
|
||||
template<> ::greptime::v1::meta::MailboxMessageHeader* Arena::CreateMaybeMessage<::greptime::v1::meta::MailboxMessageHeader>(Arena*);
|
||||
template<> ::greptime::v1::meta::MailboxMessageHeader_TracingContextEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::meta::MailboxMessageHeader_TracingContextEntry_DoNotUse>(Arena*);
|
||||
template<> ::greptime::v1::meta::NodeInfo* Arena::CreateMaybeMessage<::greptime::v1::meta::NodeInfo>(Arena*);
|
||||
template<> ::greptime::v1::meta::RegionLease* Arena::CreateMaybeMessage<::greptime::v1::meta::RegionLease>(Arena*);
|
||||
template<> ::greptime::v1::meta::RegionStat* Arena::CreateMaybeMessage<::greptime::v1::meta::RegionStat>(Arena*);
|
||||
@@ -3174,6 +3182,197 @@ class AskLeaderResponse final :
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class MailboxMessageHeader_TracingContextEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<MailboxMessageHeader_TracingContextEntry_DoNotUse,
|
||||
std::string, std::string,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> {
|
||||
public:
|
||||
typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<MailboxMessageHeader_TracingContextEntry_DoNotUse,
|
||||
std::string, std::string,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> SuperType;
|
||||
MailboxMessageHeader_TracingContextEntry_DoNotUse();
|
||||
explicit PROTOBUF_CONSTEXPR MailboxMessageHeader_TracingContextEntry_DoNotUse(
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
|
||||
explicit MailboxMessageHeader_TracingContextEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena);
|
||||
void MergeFrom(const MailboxMessageHeader_TracingContextEntry_DoNotUse& other);
|
||||
static const MailboxMessageHeader_TracingContextEntry_DoNotUse* internal_default_instance() { return reinterpret_cast<const MailboxMessageHeader_TracingContextEntry_DoNotUse*>(&_MailboxMessageHeader_TracingContextEntry_DoNotUse_default_instance_); }
|
||||
static bool ValidateKey(std::string* s) {
|
||||
return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast<int>(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "greptime.v1.meta.MailboxMessageHeader.TracingContextEntry.key");
|
||||
}
|
||||
static bool ValidateValue(std::string* s) {
|
||||
return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast<int>(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "greptime.v1.meta.MailboxMessageHeader.TracingContextEntry.value");
|
||||
}
|
||||
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||
friend struct ::TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto;
|
||||
};
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class MailboxMessageHeader final :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.MailboxMessageHeader) */ {
|
||||
public:
|
||||
inline MailboxMessageHeader() : MailboxMessageHeader(nullptr) {}
|
||||
~MailboxMessageHeader() override;
|
||||
explicit PROTOBUF_CONSTEXPR MailboxMessageHeader(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
|
||||
|
||||
MailboxMessageHeader(const MailboxMessageHeader& from);
|
||||
MailboxMessageHeader(MailboxMessageHeader&& from) noexcept
|
||||
: MailboxMessageHeader() {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
|
||||
inline MailboxMessageHeader& operator=(const MailboxMessageHeader& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline MailboxMessageHeader& operator=(MailboxMessageHeader&& 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 MailboxMessageHeader& default_instance() {
|
||||
return *internal_default_instance();
|
||||
}
|
||||
static inline const MailboxMessageHeader* internal_default_instance() {
|
||||
return reinterpret_cast<const MailboxMessageHeader*>(
|
||||
&_MailboxMessageHeader_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
20;
|
||||
|
||||
friend void swap(MailboxMessageHeader& a, MailboxMessageHeader& b) {
|
||||
a.Swap(&b);
|
||||
}
|
||||
inline void Swap(MailboxMessageHeader* 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(MailboxMessageHeader* other) {
|
||||
if (other == this) return;
|
||||
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
MailboxMessageHeader* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
|
||||
return CreateMaybeMessage<MailboxMessageHeader>(arena);
|
||||
}
|
||||
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
|
||||
void CopyFrom(const MailboxMessageHeader& from);
|
||||
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
|
||||
void MergeFrom( const MailboxMessageHeader& from) {
|
||||
MailboxMessageHeader::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(MailboxMessageHeader* other);
|
||||
|
||||
private:
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||
return "greptime.v1.meta.MailboxMessageHeader";
|
||||
}
|
||||
protected:
|
||||
explicit MailboxMessageHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||
bool is_message_owned = false);
|
||||
private:
|
||||
static void ArenaDtor(void* object);
|
||||
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 {
|
||||
kTracingContextFieldNumber = 1,
|
||||
};
|
||||
// map<string, string> tracing_context = 1;
|
||||
int tracing_context_size() const;
|
||||
private:
|
||||
int _internal_tracing_context_size() const;
|
||||
public:
|
||||
void clear_tracing_context();
|
||||
private:
|
||||
const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >&
|
||||
_internal_tracing_context() const;
|
||||
::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >*
|
||||
_internal_mutable_tracing_context();
|
||||
public:
|
||||
const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >&
|
||||
tracing_context() const;
|
||||
::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >*
|
||||
mutable_tracing_context();
|
||||
|
||||
// @@protoc_insertion_point(class_scope:greptime.v1.meta.MailboxMessageHeader)
|
||||
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::MapField<
|
||||
MailboxMessageHeader_TracingContextEntry_DoNotUse,
|
||||
std::string, std::string,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> tracing_context_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
friend struct ::TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class MailboxMessage final :
|
||||
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.MailboxMessage) */ {
|
||||
public:
|
||||
@@ -3227,7 +3426,7 @@ class MailboxMessage final :
|
||||
&_MailboxMessage_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages =
|
||||
19;
|
||||
21;
|
||||
|
||||
friend void swap(MailboxMessage& a, MailboxMessage& b) {
|
||||
a.Swap(&b);
|
||||
@@ -3303,6 +3502,7 @@ class MailboxMessage final :
|
||||
kSubjectFieldNumber = 2,
|
||||
kFromFieldNumber = 3,
|
||||
kToFieldNumber = 4,
|
||||
kHeaderFieldNumber = 64,
|
||||
kIdFieldNumber = 1,
|
||||
kTimestampMillisFieldNumber = 5,
|
||||
kJsonFieldNumber = 6,
|
||||
@@ -3349,6 +3549,24 @@ class MailboxMessage final :
|
||||
std::string* _internal_mutable_to();
|
||||
public:
|
||||
|
||||
// .greptime.v1.meta.MailboxMessageHeader header = 64;
|
||||
bool has_header() const;
|
||||
private:
|
||||
bool _internal_has_header() const;
|
||||
public:
|
||||
void clear_header();
|
||||
const ::greptime::v1::meta::MailboxMessageHeader& header() const;
|
||||
PROTOBUF_NODISCARD ::greptime::v1::meta::MailboxMessageHeader* release_header();
|
||||
::greptime::v1::meta::MailboxMessageHeader* mutable_header();
|
||||
void set_allocated_header(::greptime::v1::meta::MailboxMessageHeader* header);
|
||||
private:
|
||||
const ::greptime::v1::meta::MailboxMessageHeader& _internal_header() const;
|
||||
::greptime::v1::meta::MailboxMessageHeader* _internal_mutable_header();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_header(
|
||||
::greptime::v1::meta::MailboxMessageHeader* header);
|
||||
::greptime::v1::meta::MailboxMessageHeader* unsafe_arena_release_header();
|
||||
|
||||
// uint64 id = 1;
|
||||
void clear_id();
|
||||
uint64_t id() const;
|
||||
@@ -3402,6 +3620,7 @@ class MailboxMessage final :
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr subject_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr from_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr to_;
|
||||
::greptime::v1::meta::MailboxMessageHeader* header_;
|
||||
uint64_t id_;
|
||||
int64_t timestamp_millis_;
|
||||
union PayloadUnion {
|
||||
@@ -6020,8 +6239,133 @@ inline void AskLeaderResponse::set_allocated_leader(::greptime::v1::meta::Peer*
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// MailboxMessageHeader
|
||||
|
||||
// map<string, string> tracing_context = 1;
|
||||
inline int MailboxMessageHeader::_internal_tracing_context_size() const {
|
||||
return _impl_.tracing_context_.size();
|
||||
}
|
||||
inline int MailboxMessageHeader::tracing_context_size() const {
|
||||
return _internal_tracing_context_size();
|
||||
}
|
||||
inline void MailboxMessageHeader::clear_tracing_context() {
|
||||
_impl_.tracing_context_.Clear();
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >&
|
||||
MailboxMessageHeader::_internal_tracing_context() const {
|
||||
return _impl_.tracing_context_.GetMap();
|
||||
}
|
||||
inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >&
|
||||
MailboxMessageHeader::tracing_context() const {
|
||||
// @@protoc_insertion_point(field_map:greptime.v1.meta.MailboxMessageHeader.tracing_context)
|
||||
return _internal_tracing_context();
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >*
|
||||
MailboxMessageHeader::_internal_mutable_tracing_context() {
|
||||
return _impl_.tracing_context_.MutableMap();
|
||||
}
|
||||
inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >*
|
||||
MailboxMessageHeader::mutable_tracing_context() {
|
||||
// @@protoc_insertion_point(field_mutable_map:greptime.v1.meta.MailboxMessageHeader.tracing_context)
|
||||
return _internal_mutable_tracing_context();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// MailboxMessage
|
||||
|
||||
// .greptime.v1.meta.MailboxMessageHeader header = 64;
|
||||
inline bool MailboxMessage::_internal_has_header() const {
|
||||
return this != internal_default_instance() && _impl_.header_ != nullptr;
|
||||
}
|
||||
inline bool MailboxMessage::has_header() const {
|
||||
return _internal_has_header();
|
||||
}
|
||||
inline void MailboxMessage::clear_header() {
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
|
||||
delete _impl_.header_;
|
||||
}
|
||||
_impl_.header_ = nullptr;
|
||||
}
|
||||
inline const ::greptime::v1::meta::MailboxMessageHeader& MailboxMessage::_internal_header() const {
|
||||
const ::greptime::v1::meta::MailboxMessageHeader* p = _impl_.header_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const ::greptime::v1::meta::MailboxMessageHeader&>(
|
||||
::greptime::v1::meta::_MailboxMessageHeader_default_instance_);
|
||||
}
|
||||
inline const ::greptime::v1::meta::MailboxMessageHeader& MailboxMessage::header() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.meta.MailboxMessage.header)
|
||||
return _internal_header();
|
||||
}
|
||||
inline void MailboxMessage::unsafe_arena_set_allocated_header(
|
||||
::greptime::v1::meta::MailboxMessageHeader* 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.MailboxMessage.header)
|
||||
}
|
||||
inline ::greptime::v1::meta::MailboxMessageHeader* MailboxMessage::release_header() {
|
||||
|
||||
::greptime::v1::meta::MailboxMessageHeader* 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::MailboxMessageHeader* MailboxMessage::unsafe_arena_release_header() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.meta.MailboxMessage.header)
|
||||
|
||||
::greptime::v1::meta::MailboxMessageHeader* temp = _impl_.header_;
|
||||
_impl_.header_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline ::greptime::v1::meta::MailboxMessageHeader* MailboxMessage::_internal_mutable_header() {
|
||||
|
||||
if (_impl_.header_ == nullptr) {
|
||||
auto* p = CreateMaybeMessage<::greptime::v1::meta::MailboxMessageHeader>(GetArenaForAllocation());
|
||||
_impl_.header_ = p;
|
||||
}
|
||||
return _impl_.header_;
|
||||
}
|
||||
inline ::greptime::v1::meta::MailboxMessageHeader* MailboxMessage::mutable_header() {
|
||||
::greptime::v1::meta::MailboxMessageHeader* _msg = _internal_mutable_header();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.meta.MailboxMessage.header)
|
||||
return _msg;
|
||||
}
|
||||
inline void MailboxMessage::set_allocated_header(::greptime::v1::meta::MailboxMessageHeader* header) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
if (message_arena == nullptr) {
|
||||
delete _impl_.header_;
|
||||
}
|
||||
if (header) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
||||
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(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.MailboxMessage.header)
|
||||
}
|
||||
|
||||
// uint64 id = 1;
|
||||
inline void MailboxMessage::clear_id() {
|
||||
_impl_.id_ = uint64_t{0u};
|
||||
@@ -6339,6 +6683,10 @@ inline MailboxMessage::PayloadCase MailboxMessage::payload_case() const {
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
|
||||
@@ -1159,11 +1159,62 @@ func (x *AskLeaderResponse) GetLeader() *Peer {
|
||||
return nil
|
||||
}
|
||||
|
||||
type MailboxMessageHeader struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Encoded trace_id & span_id, follow the w3c Trace Context
|
||||
// https://www.w3.org/TR/trace-context/#header-name
|
||||
TracingContext map[string]string `protobuf:"bytes,1,rep,name=tracing_context,json=tracingContext,proto3" json:"tracing_context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (x *MailboxMessageHeader) Reset() {
|
||||
*x = MailboxMessageHeader{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MailboxMessageHeader) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MailboxMessageHeader) ProtoMessage() {}
|
||||
|
||||
func (x *MailboxMessageHeader) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[14]
|
||||
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 MailboxMessageHeader.ProtoReflect.Descriptor instead.
|
||||
func (*MailboxMessageHeader) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *MailboxMessageHeader) GetTracingContext() map[string]string {
|
||||
if x != nil {
|
||||
return x.TracingContext
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type MailboxMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// / The header of the mailbox message.
|
||||
Header *MailboxMessageHeader `protobuf:"bytes,64,opt,name=header,proto3" json:"header,omitempty"`
|
||||
// The id is used to associate request and response.
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// The following information plays a bigger role in making messages traceable
|
||||
@@ -1184,7 +1235,7 @@ type MailboxMessage struct {
|
||||
func (x *MailboxMessage) Reset() {
|
||||
*x = MailboxMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[14]
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -1197,7 +1248,7 @@ func (x *MailboxMessage) String() string {
|
||||
func (*MailboxMessage) ProtoMessage() {}
|
||||
|
||||
func (x *MailboxMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[14]
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[15]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -1210,7 +1261,14 @@ func (x *MailboxMessage) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use MailboxMessage.ProtoReflect.Descriptor instead.
|
||||
func (*MailboxMessage) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{14}
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
func (x *MailboxMessage) GetHeader() *MailboxMessageHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *MailboxMessage) GetId() uint64 {
|
||||
@@ -1491,38 +1549,54 @@ var file_greptime_v1_meta_heartbeat_proto_rawDesc = []byte{
|
||||
0x2e, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22,
|
||||
0xaa, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f,
|
||||
0x12, 0x29, 0x0a, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d, 0x69,
|
||||
0x6c, 0x6c, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x14, 0x0a, 0x04, 0x6a,
|
||||
0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6a, 0x73, 0x6f,
|
||||
0x6e, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x3d, 0x0a, 0x0a,
|
||||
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x65,
|
||||
0x61, 0x64, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77,
|
||||
0x65, 0x72, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x6f, 0x77, 0x6e, 0x67, 0x72, 0x61, 0x64,
|
||||
0x69, 0x6e, 0x67, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x02, 0x32, 0xbf, 0x01, 0x0a, 0x09,
|
||||
0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x48, 0x65, 0x61,
|
||||
0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62,
|
||||
0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65,
|
||||
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65,
|
||||
0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x09, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61,
|
||||
0x64, 0x65, 0x72, 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,
|
||||
0xbe, 0x01, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x63, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x63,
|
||||
0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e,
|
||||
0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x74,
|
||||
0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0x41, 0x0a,
|
||||
0x13, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
|
||||
0x22, 0xea, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x40, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x4d, 0x65,
|
||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61,
|
||||
0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f,
|
||||
0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74,
|
||||
0x6f, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d,
|
||||
0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x14, 0x0a, 0x04,
|
||||
0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6a, 0x73,
|
||||
0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x3d, 0x0a,
|
||||
0x0a, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4c,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x6f, 0x6c, 0x6c, 0x6f,
|
||||
0x77, 0x65, 0x72, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x6f, 0x77, 0x6e, 0x67, 0x72, 0x61,
|
||||
0x64, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x02, 0x32, 0xbf, 0x01, 0x0a,
|
||||
0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x48, 0x65,
|
||||
0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74,
|
||||
0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72,
|
||||
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48,
|
||||
0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x09, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61,
|
||||
0x64, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65,
|
||||
0x61, 0x64, 0x65, 0x72, 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 (
|
||||
@@ -1538,7 +1612,7 @@ func file_greptime_v1_meta_heartbeat_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_greptime_v1_meta_heartbeat_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_greptime_v1_meta_heartbeat_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
|
||||
var file_greptime_v1_meta_heartbeat_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
|
||||
var file_greptime_v1_meta_heartbeat_proto_goTypes = []interface{}{
|
||||
(RegionRole)(0), // 0: greptime.v1.meta.RegionRole
|
||||
(*HeartbeatRequest)(nil), // 1: greptime.v1.meta.HeartbeatRequest
|
||||
@@ -1555,53 +1629,57 @@ var file_greptime_v1_meta_heartbeat_proto_goTypes = []interface{}{
|
||||
(*RegionLease)(nil), // 12: greptime.v1.meta.RegionLease
|
||||
(*AskLeaderRequest)(nil), // 13: greptime.v1.meta.AskLeaderRequest
|
||||
(*AskLeaderResponse)(nil), // 14: greptime.v1.meta.AskLeaderResponse
|
||||
(*MailboxMessage)(nil), // 15: greptime.v1.meta.MailboxMessage
|
||||
nil, // 16: greptime.v1.meta.HeartbeatRequest.ExtensionsEntry
|
||||
nil, // 17: greptime.v1.meta.RegionStat.ExtensionsEntry
|
||||
nil, // 18: greptime.v1.meta.FlowStat.FlowStatSizeEntry
|
||||
nil, // 19: greptime.v1.meta.FlowStat.FlowLastExecTimeMapEntry
|
||||
nil, // 20: greptime.v1.meta.GrantedRegion.ExtensionsEntry
|
||||
(*RequestHeader)(nil), // 21: greptime.v1.meta.RequestHeader
|
||||
(*Peer)(nil), // 22: greptime.v1.meta.Peer
|
||||
(*TimeInterval)(nil), // 23: greptime.v1.meta.TimeInterval
|
||||
(*ResponseHeader)(nil), // 24: greptime.v1.meta.ResponseHeader
|
||||
(*MailboxMessageHeader)(nil), // 15: greptime.v1.meta.MailboxMessageHeader
|
||||
(*MailboxMessage)(nil), // 16: greptime.v1.meta.MailboxMessage
|
||||
nil, // 17: greptime.v1.meta.HeartbeatRequest.ExtensionsEntry
|
||||
nil, // 18: greptime.v1.meta.RegionStat.ExtensionsEntry
|
||||
nil, // 19: greptime.v1.meta.FlowStat.FlowStatSizeEntry
|
||||
nil, // 20: greptime.v1.meta.FlowStat.FlowLastExecTimeMapEntry
|
||||
nil, // 21: greptime.v1.meta.GrantedRegion.ExtensionsEntry
|
||||
nil, // 22: greptime.v1.meta.MailboxMessageHeader.TracingContextEntry
|
||||
(*RequestHeader)(nil), // 23: greptime.v1.meta.RequestHeader
|
||||
(*Peer)(nil), // 24: greptime.v1.meta.Peer
|
||||
(*TimeInterval)(nil), // 25: greptime.v1.meta.TimeInterval
|
||||
(*ResponseHeader)(nil), // 26: greptime.v1.meta.ResponseHeader
|
||||
}
|
||||
var file_greptime_v1_meta_heartbeat_proto_depIdxs = []int32{
|
||||
21, // 0: greptime.v1.meta.HeartbeatRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
22, // 1: greptime.v1.meta.HeartbeatRequest.peer:type_name -> greptime.v1.meta.Peer
|
||||
23, // 2: greptime.v1.meta.HeartbeatRequest.report_interval:type_name -> greptime.v1.meta.TimeInterval
|
||||
23, // 0: greptime.v1.meta.HeartbeatRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
24, // 1: greptime.v1.meta.HeartbeatRequest.peer:type_name -> greptime.v1.meta.Peer
|
||||
25, // 2: greptime.v1.meta.HeartbeatRequest.report_interval:type_name -> greptime.v1.meta.TimeInterval
|
||||
6, // 3: greptime.v1.meta.HeartbeatRequest.region_stats:type_name -> greptime.v1.meta.RegionStat
|
||||
15, // 4: greptime.v1.meta.HeartbeatRequest.mailbox_message:type_name -> greptime.v1.meta.MailboxMessage
|
||||
16, // 4: greptime.v1.meta.HeartbeatRequest.mailbox_message:type_name -> greptime.v1.meta.MailboxMessage
|
||||
5, // 5: greptime.v1.meta.HeartbeatRequest.info:type_name -> greptime.v1.meta.NodeInfo
|
||||
8, // 6: greptime.v1.meta.HeartbeatRequest.flow_stat:type_name -> greptime.v1.meta.FlowStat
|
||||
2, // 7: greptime.v1.meta.HeartbeatRequest.datanode:type_name -> greptime.v1.meta.DatanodeWorkloads
|
||||
3, // 8: greptime.v1.meta.HeartbeatRequest.frontend:type_name -> greptime.v1.meta.FrontendWorkloads
|
||||
4, // 9: greptime.v1.meta.HeartbeatRequest.flownode:type_name -> greptime.v1.meta.FlownodeWorkloads
|
||||
7, // 10: greptime.v1.meta.HeartbeatRequest.topic_stats:type_name -> greptime.v1.meta.TopicStat
|
||||
16, // 11: greptime.v1.meta.HeartbeatRequest.extensions:type_name -> greptime.v1.meta.HeartbeatRequest.ExtensionsEntry
|
||||
17, // 11: greptime.v1.meta.HeartbeatRequest.extensions:type_name -> greptime.v1.meta.HeartbeatRequest.ExtensionsEntry
|
||||
0, // 12: greptime.v1.meta.RegionStat.role:type_name -> greptime.v1.meta.RegionRole
|
||||
17, // 13: greptime.v1.meta.RegionStat.extensions:type_name -> greptime.v1.meta.RegionStat.ExtensionsEntry
|
||||
18, // 14: greptime.v1.meta.FlowStat.flow_stat_size:type_name -> greptime.v1.meta.FlowStat.FlowStatSizeEntry
|
||||
19, // 15: greptime.v1.meta.FlowStat.flow_last_exec_time_map:type_name -> greptime.v1.meta.FlowStat.FlowLastExecTimeMapEntry
|
||||
24, // 16: greptime.v1.meta.HeartbeatResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
15, // 17: greptime.v1.meta.HeartbeatResponse.mailbox_message:type_name -> greptime.v1.meta.MailboxMessage
|
||||
18, // 13: greptime.v1.meta.RegionStat.extensions:type_name -> greptime.v1.meta.RegionStat.ExtensionsEntry
|
||||
19, // 14: greptime.v1.meta.FlowStat.flow_stat_size:type_name -> greptime.v1.meta.FlowStat.FlowStatSizeEntry
|
||||
20, // 15: greptime.v1.meta.FlowStat.flow_last_exec_time_map:type_name -> greptime.v1.meta.FlowStat.FlowLastExecTimeMapEntry
|
||||
26, // 16: greptime.v1.meta.HeartbeatResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
16, // 17: greptime.v1.meta.HeartbeatResponse.mailbox_message:type_name -> greptime.v1.meta.MailboxMessage
|
||||
12, // 18: greptime.v1.meta.HeartbeatResponse.region_lease:type_name -> greptime.v1.meta.RegionLease
|
||||
10, // 19: greptime.v1.meta.HeartbeatResponse.heartbeat_config:type_name -> greptime.v1.meta.HeartbeatConfig
|
||||
0, // 20: greptime.v1.meta.GrantedRegion.role:type_name -> greptime.v1.meta.RegionRole
|
||||
20, // 21: greptime.v1.meta.GrantedRegion.extensions:type_name -> greptime.v1.meta.GrantedRegion.ExtensionsEntry
|
||||
21, // 21: greptime.v1.meta.GrantedRegion.extensions:type_name -> greptime.v1.meta.GrantedRegion.ExtensionsEntry
|
||||
11, // 22: greptime.v1.meta.RegionLease.regions:type_name -> greptime.v1.meta.GrantedRegion
|
||||
21, // 23: greptime.v1.meta.AskLeaderRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
24, // 24: greptime.v1.meta.AskLeaderResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
22, // 25: greptime.v1.meta.AskLeaderResponse.leader:type_name -> greptime.v1.meta.Peer
|
||||
1, // 26: greptime.v1.meta.Heartbeat.Heartbeat:input_type -> greptime.v1.meta.HeartbeatRequest
|
||||
13, // 27: greptime.v1.meta.Heartbeat.AskLeader:input_type -> greptime.v1.meta.AskLeaderRequest
|
||||
9, // 28: greptime.v1.meta.Heartbeat.Heartbeat:output_type -> greptime.v1.meta.HeartbeatResponse
|
||||
14, // 29: greptime.v1.meta.Heartbeat.AskLeader:output_type -> greptime.v1.meta.AskLeaderResponse
|
||||
28, // [28:30] is the sub-list for method output_type
|
||||
26, // [26:28] is the sub-list for method input_type
|
||||
26, // [26:26] is the sub-list for extension type_name
|
||||
26, // [26:26] is the sub-list for extension extendee
|
||||
0, // [0:26] is the sub-list for field type_name
|
||||
23, // 23: greptime.v1.meta.AskLeaderRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
26, // 24: greptime.v1.meta.AskLeaderResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
24, // 25: greptime.v1.meta.AskLeaderResponse.leader:type_name -> greptime.v1.meta.Peer
|
||||
22, // 26: greptime.v1.meta.MailboxMessageHeader.tracing_context:type_name -> greptime.v1.meta.MailboxMessageHeader.TracingContextEntry
|
||||
15, // 27: greptime.v1.meta.MailboxMessage.header:type_name -> greptime.v1.meta.MailboxMessageHeader
|
||||
1, // 28: greptime.v1.meta.Heartbeat.Heartbeat:input_type -> greptime.v1.meta.HeartbeatRequest
|
||||
13, // 29: greptime.v1.meta.Heartbeat.AskLeader:input_type -> greptime.v1.meta.AskLeaderRequest
|
||||
9, // 30: greptime.v1.meta.Heartbeat.Heartbeat:output_type -> greptime.v1.meta.HeartbeatResponse
|
||||
14, // 31: greptime.v1.meta.Heartbeat.AskLeader:output_type -> greptime.v1.meta.AskLeaderResponse
|
||||
30, // [30:32] is the sub-list for method output_type
|
||||
28, // [28:30] is the sub-list for method input_type
|
||||
28, // [28:28] is the sub-list for extension type_name
|
||||
28, // [28:28] is the sub-list for extension extendee
|
||||
0, // [0:28] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_greptime_v1_meta_heartbeat_proto_init() }
|
||||
@@ -1780,6 +1858,18 @@ func file_greptime_v1_meta_heartbeat_proto_init() {
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MailboxMessageHeader); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MailboxMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1797,7 +1887,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() {
|
||||
(*HeartbeatRequest_Frontend)(nil),
|
||||
(*HeartbeatRequest_Flownode)(nil),
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[14].OneofWrappers = []interface{}{
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[15].OneofWrappers = []interface{}{
|
||||
(*MailboxMessage_Json)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
@@ -1806,7 +1896,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_greptime_v1_meta_heartbeat_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 20,
|
||||
NumMessages: 22,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -180,7 +180,15 @@ message AskLeaderResponse {
|
||||
Peer leader = 2;
|
||||
}
|
||||
|
||||
message MailboxMessageHeader {
|
||||
// Encoded trace_id & span_id, follow the w3c Trace Context
|
||||
// https://www.w3.org/TR/trace-context/#header-name
|
||||
map<string, string> tracing_context = 1;
|
||||
}
|
||||
|
||||
message MailboxMessage {
|
||||
/// The header of the mailbox message.
|
||||
MailboxMessageHeader header = 64;
|
||||
// The id is used to associate request and response.
|
||||
uint64 id = 1;
|
||||
// The following information plays a bigger role in making messages traceable
|
||||
|
||||
+10
-2
@@ -12,11 +12,14 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::v1::meta::mailbox_message::Payload;
|
||||
use crate::v1::meta::MailboxMessage;
|
||||
use crate::v1::meta::{mailbox_message::Payload, MailboxMessageHeader};
|
||||
use serde::Serialize;
|
||||
use serde_json::Result;
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
fmt::{Display, Formatter},
|
||||
};
|
||||
|
||||
impl MailboxMessage {
|
||||
pub fn json_message<T>(
|
||||
@@ -25,12 +28,17 @@ impl MailboxMessage {
|
||||
to: &str,
|
||||
timestamp_millis: i64,
|
||||
payload: &T,
|
||||
tracing_context: Option<HashMap<String, String>>,
|
||||
) -> Result<MailboxMessage>
|
||||
where
|
||||
T: ?Sized + Serialize + Display,
|
||||
{
|
||||
let payload = serde_json::to_string(payload)?;
|
||||
let header = MailboxMessageHeader {
|
||||
tracing_context: tracing_context.unwrap_or_default(),
|
||||
};
|
||||
Ok(MailboxMessage {
|
||||
header: Some(header),
|
||||
id: 0, // "id" will be set by the mailbox.
|
||||
subject: subject.to_string(),
|
||||
from: from.to_string(),
|
||||
|
||||
Reference in New Issue
Block a user