feat(promql): add lookback parameter (#145)
* feat(promql): add lookback parameter * feat(promql): add lookback parameter to InstantQuery
This commit is contained in:
+115
-10
@@ -55,6 +55,7 @@ PROTOBUF_CONSTEXPR PromInstantQuery::PromInstantQuery(
|
||||
::_pbi::ConstantInitialized): _impl_{
|
||||
/*decltype(_impl_.query_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.time_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.lookback_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||
struct PromInstantQueryDefaultTypeInternal {
|
||||
PROTOBUF_CONSTEXPR PromInstantQueryDefaultTypeInternal()
|
||||
@@ -71,6 +72,7 @@ PROTOBUF_CONSTEXPR PromRangeQuery::PromRangeQuery(
|
||||
, /*decltype(_impl_.start_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.end_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.step_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.lookback_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||
struct PromRangeQueryDefaultTypeInternal {
|
||||
PROTOBUF_CONSTEXPR PromRangeQueryDefaultTypeInternal()
|
||||
@@ -114,6 +116,7 @@ const uint32_t TableStruct_greptime_2fv1_2fprom_2eproto::offsets[] PROTOBUF_SECT
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromInstantQuery, _impl_.query_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromInstantQuery, _impl_.time_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromInstantQuery, _impl_.lookback_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromRangeQuery, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
@@ -124,12 +127,13 @@ const uint32_t TableStruct_greptime_2fv1_2fprom_2eproto::offsets[] PROTOBUF_SECT
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromRangeQuery, _impl_.start_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromRangeQuery, _impl_.end_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromRangeQuery, _impl_.step_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromRangeQuery, _impl_.lookback_),
|
||||
};
|
||||
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(::greptime::v1::PromqlRequest)},
|
||||
{ 10, -1, -1, sizeof(::greptime::v1::PromqlResponse)},
|
||||
{ 18, -1, -1, sizeof(::greptime::v1::PromInstantQuery)},
|
||||
{ 26, -1, -1, sizeof(::greptime::v1::PromRangeQuery)},
|
||||
{ 27, -1, -1, sizeof(::greptime::v1::PromRangeQuery)},
|
||||
};
|
||||
|
||||
static const ::_pb::Message* const file_default_instances[] = {
|
||||
@@ -148,21 +152,22 @@ const char descriptor_table_protodef_greptime_2fv1_2fprom_2eproto[] PROTOBUF_SEC
|
||||
"(\0132\033.greptime.v1.PromRangeQueryH\000B\010\n\006pro"
|
||||
"mql\"K\n\016PromqlResponse\022+\n\006header\030\001 \001(\0132\033."
|
||||
"greptime.v1.ResponseHeader\022\014\n\004body\030\002 \001(\014"
|
||||
"\"/\n\020PromInstantQuery\022\r\n\005query\030\001 \001(\t\022\014\n\004t"
|
||||
"ime\030\002 \001(\t\"I\n\016PromRangeQuery\022\r\n\005query\030\001 \001"
|
||||
"(\t\022\r\n\005start\030\002 \001(\t\022\013\n\003end\030\003 \001(\t\022\014\n\004step\030\004"
|
||||
" \001(\t2V\n\021PrometheusGateway\022A\n\006Handle\022\032.gr"
|
||||
"eptime.v1.PromqlRequest\032\033.greptime.v1.Pr"
|
||||
"omqlResponseBS\n\016io.greptime.v1B\nPromethe"
|
||||
"usZ5github.com/GreptimeTeam/greptime-pro"
|
||||
"to/go/greptime/v1b\006proto3"
|
||||
"\"A\n\020PromInstantQuery\022\r\n\005query\030\001 \001(\t\022\014\n\004t"
|
||||
"ime\030\002 \001(\t\022\020\n\010lookback\030\003 \001(\t\"[\n\016PromRange"
|
||||
"Query\022\r\n\005query\030\001 \001(\t\022\r\n\005start\030\002 \001(\t\022\013\n\003e"
|
||||
"nd\030\003 \001(\t\022\014\n\004step\030\004 \001(\t\022\020\n\010lookback\030\005 \001(\t"
|
||||
"2V\n\021PrometheusGateway\022A\n\006Handle\022\032.grepti"
|
||||
"me.v1.PromqlRequest\032\033.greptime.v1.Promql"
|
||||
"ResponseBS\n\016io.greptime.v1B\nPrometheusZ5"
|
||||
"github.com/GreptimeTeam/greptime-proto/g"
|
||||
"o/greptime/v1b\006proto3"
|
||||
;
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fprom_2eproto_deps[1] = {
|
||||
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
|
||||
};
|
||||
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fprom_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fprom_2eproto = {
|
||||
false, false, 625, descriptor_table_protodef_greptime_2fv1_2fprom_2eproto,
|
||||
false, false, 661, descriptor_table_protodef_greptime_2fv1_2fprom_2eproto,
|
||||
"greptime/v1/prom.proto",
|
||||
&descriptor_table_greptime_2fv1_2fprom_2eproto_once, descriptor_table_greptime_2fv1_2fprom_2eproto_deps, 1, 4,
|
||||
schemas, file_default_instances, TableStruct_greptime_2fv1_2fprom_2eproto::offsets,
|
||||
@@ -795,6 +800,7 @@ PromInstantQuery::PromInstantQuery(const PromInstantQuery& from)
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.query_){}
|
||||
, decltype(_impl_.time_){}
|
||||
, decltype(_impl_.lookback_){}
|
||||
, /*decltype(_impl_._cached_size_)*/{}};
|
||||
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
@@ -814,6 +820,14 @@ PromInstantQuery::PromInstantQuery(const PromInstantQuery& from)
|
||||
_this->_impl_.time_.Set(from._internal_time(),
|
||||
_this->GetArenaForAllocation());
|
||||
}
|
||||
_impl_.lookback_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.lookback_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (!from._internal_lookback().empty()) {
|
||||
_this->_impl_.lookback_.Set(from._internal_lookback(),
|
||||
_this->GetArenaForAllocation());
|
||||
}
|
||||
// @@protoc_insertion_point(copy_constructor:greptime.v1.PromInstantQuery)
|
||||
}
|
||||
|
||||
@@ -824,6 +838,7 @@ inline void PromInstantQuery::SharedCtor(
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.query_){}
|
||||
, decltype(_impl_.time_){}
|
||||
, decltype(_impl_.lookback_){}
|
||||
, /*decltype(_impl_._cached_size_)*/{}
|
||||
};
|
||||
_impl_.query_.InitDefault();
|
||||
@@ -834,6 +849,10 @@ inline void PromInstantQuery::SharedCtor(
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.time_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.lookback_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.lookback_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
}
|
||||
|
||||
PromInstantQuery::~PromInstantQuery() {
|
||||
@@ -849,6 +868,7 @@ inline void PromInstantQuery::SharedDtor() {
|
||||
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||
_impl_.query_.Destroy();
|
||||
_impl_.time_.Destroy();
|
||||
_impl_.lookback_.Destroy();
|
||||
}
|
||||
|
||||
void PromInstantQuery::SetCachedSize(int size) const {
|
||||
@@ -863,6 +883,7 @@ void PromInstantQuery::Clear() {
|
||||
|
||||
_impl_.query_.ClearToEmpty();
|
||||
_impl_.time_.ClearToEmpty();
|
||||
_impl_.lookback_.ClearToEmpty();
|
||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
@@ -892,6 +913,16 @@ const char* PromInstantQuery::_InternalParse(const char* ptr, ::_pbi::ParseConte
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// string lookback = 3;
|
||||
case 3:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
||||
auto str = _internal_mutable_lookback();
|
||||
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||||
CHK_(ptr);
|
||||
CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.PromInstantQuery.lookback"));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
default:
|
||||
goto handle_unusual;
|
||||
} // switch
|
||||
@@ -941,6 +972,16 @@ uint8_t* PromInstantQuery::_InternalSerialize(
|
||||
2, this->_internal_time(), target);
|
||||
}
|
||||
|
||||
// string lookback = 3;
|
||||
if (!this->_internal_lookback().empty()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->_internal_lookback().data(), static_cast<int>(this->_internal_lookback().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"greptime.v1.PromInstantQuery.lookback");
|
||||
target = stream->WriteStringMaybeAliased(
|
||||
3, this->_internal_lookback(), 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);
|
||||
@@ -971,6 +1012,13 @@ size_t PromInstantQuery::ByteSizeLong() const {
|
||||
this->_internal_time());
|
||||
}
|
||||
|
||||
// string lookback = 3;
|
||||
if (!this->_internal_lookback().empty()) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->_internal_lookback());
|
||||
}
|
||||
|
||||
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||
}
|
||||
|
||||
@@ -995,6 +1043,9 @@ void PromInstantQuery::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const
|
||||
if (!from._internal_time().empty()) {
|
||||
_this->_internal_set_time(from._internal_time());
|
||||
}
|
||||
if (!from._internal_lookback().empty()) {
|
||||
_this->_internal_set_lookback(from._internal_lookback());
|
||||
}
|
||||
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
}
|
||||
|
||||
@@ -1022,6 +1073,10 @@ void PromInstantQuery::InternalSwap(PromInstantQuery* other) {
|
||||
&_impl_.time_, lhs_arena,
|
||||
&other->_impl_.time_, rhs_arena
|
||||
);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||||
&_impl_.lookback_, lhs_arena,
|
||||
&other->_impl_.lookback_, rhs_arena
|
||||
);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata PromInstantQuery::GetMetadata() const {
|
||||
@@ -1050,6 +1105,7 @@ PromRangeQuery::PromRangeQuery(const PromRangeQuery& from)
|
||||
, decltype(_impl_.start_){}
|
||||
, decltype(_impl_.end_){}
|
||||
, decltype(_impl_.step_){}
|
||||
, decltype(_impl_.lookback_){}
|
||||
, /*decltype(_impl_._cached_size_)*/{}};
|
||||
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
@@ -1085,6 +1141,14 @@ PromRangeQuery::PromRangeQuery(const PromRangeQuery& from)
|
||||
_this->_impl_.step_.Set(from._internal_step(),
|
||||
_this->GetArenaForAllocation());
|
||||
}
|
||||
_impl_.lookback_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.lookback_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (!from._internal_lookback().empty()) {
|
||||
_this->_impl_.lookback_.Set(from._internal_lookback(),
|
||||
_this->GetArenaForAllocation());
|
||||
}
|
||||
// @@protoc_insertion_point(copy_constructor:greptime.v1.PromRangeQuery)
|
||||
}
|
||||
|
||||
@@ -1097,6 +1161,7 @@ inline void PromRangeQuery::SharedCtor(
|
||||
, decltype(_impl_.start_){}
|
||||
, decltype(_impl_.end_){}
|
||||
, decltype(_impl_.step_){}
|
||||
, decltype(_impl_.lookback_){}
|
||||
, /*decltype(_impl_._cached_size_)*/{}
|
||||
};
|
||||
_impl_.query_.InitDefault();
|
||||
@@ -1115,6 +1180,10 @@ inline void PromRangeQuery::SharedCtor(
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.step_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.lookback_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.lookback_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
}
|
||||
|
||||
PromRangeQuery::~PromRangeQuery() {
|
||||
@@ -1132,6 +1201,7 @@ inline void PromRangeQuery::SharedDtor() {
|
||||
_impl_.start_.Destroy();
|
||||
_impl_.end_.Destroy();
|
||||
_impl_.step_.Destroy();
|
||||
_impl_.lookback_.Destroy();
|
||||
}
|
||||
|
||||
void PromRangeQuery::SetCachedSize(int size) const {
|
||||
@@ -1148,6 +1218,7 @@ void PromRangeQuery::Clear() {
|
||||
_impl_.start_.ClearToEmpty();
|
||||
_impl_.end_.ClearToEmpty();
|
||||
_impl_.step_.ClearToEmpty();
|
||||
_impl_.lookback_.ClearToEmpty();
|
||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
@@ -1197,6 +1268,16 @@ const char* PromRangeQuery::_InternalParse(const char* ptr, ::_pbi::ParseContext
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// string lookback = 5;
|
||||
case 5:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
|
||||
auto str = _internal_mutable_lookback();
|
||||
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||||
CHK_(ptr);
|
||||
CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.PromRangeQuery.lookback"));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
default:
|
||||
goto handle_unusual;
|
||||
} // switch
|
||||
@@ -1266,6 +1347,16 @@ uint8_t* PromRangeQuery::_InternalSerialize(
|
||||
4, this->_internal_step(), target);
|
||||
}
|
||||
|
||||
// string lookback = 5;
|
||||
if (!this->_internal_lookback().empty()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->_internal_lookback().data(), static_cast<int>(this->_internal_lookback().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"greptime.v1.PromRangeQuery.lookback");
|
||||
target = stream->WriteStringMaybeAliased(
|
||||
5, this->_internal_lookback(), 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);
|
||||
@@ -1310,6 +1401,13 @@ size_t PromRangeQuery::ByteSizeLong() const {
|
||||
this->_internal_step());
|
||||
}
|
||||
|
||||
// string lookback = 5;
|
||||
if (!this->_internal_lookback().empty()) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->_internal_lookback());
|
||||
}
|
||||
|
||||
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||
}
|
||||
|
||||
@@ -1340,6 +1438,9 @@ void PromRangeQuery::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :
|
||||
if (!from._internal_step().empty()) {
|
||||
_this->_internal_set_step(from._internal_step());
|
||||
}
|
||||
if (!from._internal_lookback().empty()) {
|
||||
_this->_internal_set_lookback(from._internal_lookback());
|
||||
}
|
||||
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
}
|
||||
|
||||
@@ -1375,6 +1476,10 @@ void PromRangeQuery::InternalSwap(PromRangeQuery* other) {
|
||||
&_impl_.step_, lhs_arena,
|
||||
&other->_impl_.step_, rhs_arena
|
||||
);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||||
&_impl_.lookback_, lhs_arena,
|
||||
&other->_impl_.lookback_, rhs_arena
|
||||
);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata PromRangeQuery::GetMetadata() const {
|
||||
|
||||
@@ -584,6 +584,7 @@ class PromInstantQuery final :
|
||||
enum : int {
|
||||
kQueryFieldNumber = 1,
|
||||
kTimeFieldNumber = 2,
|
||||
kLookbackFieldNumber = 3,
|
||||
};
|
||||
// string query = 1;
|
||||
void clear_query();
|
||||
@@ -613,6 +614,20 @@ class PromInstantQuery final :
|
||||
std::string* _internal_mutable_time();
|
||||
public:
|
||||
|
||||
// string lookback = 3;
|
||||
void clear_lookback();
|
||||
const std::string& lookback() const;
|
||||
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
void set_lookback(ArgT0&& arg0, ArgT... args);
|
||||
std::string* mutable_lookback();
|
||||
PROTOBUF_NODISCARD std::string* release_lookback();
|
||||
void set_allocated_lookback(std::string* lookback);
|
||||
private:
|
||||
const std::string& _internal_lookback() const;
|
||||
inline PROTOBUF_ALWAYS_INLINE void _internal_set_lookback(const std::string& value);
|
||||
std::string* _internal_mutable_lookback();
|
||||
public:
|
||||
|
||||
// @@protoc_insertion_point(class_scope:greptime.v1.PromInstantQuery)
|
||||
private:
|
||||
class _Internal;
|
||||
@@ -623,6 +638,7 @@ class PromInstantQuery final :
|
||||
struct Impl_ {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr query_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr time_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr lookback_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
@@ -755,6 +771,7 @@ class PromRangeQuery final :
|
||||
kStartFieldNumber = 2,
|
||||
kEndFieldNumber = 3,
|
||||
kStepFieldNumber = 4,
|
||||
kLookbackFieldNumber = 5,
|
||||
};
|
||||
// string query = 1;
|
||||
void clear_query();
|
||||
@@ -812,6 +829,20 @@ class PromRangeQuery final :
|
||||
std::string* _internal_mutable_step();
|
||||
public:
|
||||
|
||||
// string lookback = 5;
|
||||
void clear_lookback();
|
||||
const std::string& lookback() const;
|
||||
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
void set_lookback(ArgT0&& arg0, ArgT... args);
|
||||
std::string* mutable_lookback();
|
||||
PROTOBUF_NODISCARD std::string* release_lookback();
|
||||
void set_allocated_lookback(std::string* lookback);
|
||||
private:
|
||||
const std::string& _internal_lookback() const;
|
||||
inline PROTOBUF_ALWAYS_INLINE void _internal_set_lookback(const std::string& value);
|
||||
std::string* _internal_mutable_lookback();
|
||||
public:
|
||||
|
||||
// @@protoc_insertion_point(class_scope:greptime.v1.PromRangeQuery)
|
||||
private:
|
||||
class _Internal;
|
||||
@@ -824,6 +855,7 @@ class PromRangeQuery final :
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr start_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr end_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr step_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr lookback_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
@@ -1325,6 +1357,56 @@ inline void PromInstantQuery::set_allocated_time(std::string* time) {
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.PromInstantQuery.time)
|
||||
}
|
||||
|
||||
// string lookback = 3;
|
||||
inline void PromInstantQuery::clear_lookback() {
|
||||
_impl_.lookback_.ClearToEmpty();
|
||||
}
|
||||
inline const std::string& PromInstantQuery::lookback() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.PromInstantQuery.lookback)
|
||||
return _internal_lookback();
|
||||
}
|
||||
template <typename ArgT0, typename... ArgT>
|
||||
inline PROTOBUF_ALWAYS_INLINE
|
||||
void PromInstantQuery::set_lookback(ArgT0&& arg0, ArgT... args) {
|
||||
|
||||
_impl_.lookback_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.PromInstantQuery.lookback)
|
||||
}
|
||||
inline std::string* PromInstantQuery::mutable_lookback() {
|
||||
std::string* _s = _internal_mutable_lookback();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.PromInstantQuery.lookback)
|
||||
return _s;
|
||||
}
|
||||
inline const std::string& PromInstantQuery::_internal_lookback() const {
|
||||
return _impl_.lookback_.Get();
|
||||
}
|
||||
inline void PromInstantQuery::_internal_set_lookback(const std::string& value) {
|
||||
|
||||
_impl_.lookback_.Set(value, GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* PromInstantQuery::_internal_mutable_lookback() {
|
||||
|
||||
return _impl_.lookback_.Mutable(GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* PromInstantQuery::release_lookback() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.PromInstantQuery.lookback)
|
||||
return _impl_.lookback_.Release();
|
||||
}
|
||||
inline void PromInstantQuery::set_allocated_lookback(std::string* lookback) {
|
||||
if (lookback != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
_impl_.lookback_.SetAllocated(lookback, GetArenaForAllocation());
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (_impl_.lookback_.IsDefault()) {
|
||||
_impl_.lookback_.Set("", GetArenaForAllocation());
|
||||
}
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.PromInstantQuery.lookback)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// PromRangeQuery
|
||||
@@ -1529,6 +1611,56 @@ inline void PromRangeQuery::set_allocated_step(std::string* step) {
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.PromRangeQuery.step)
|
||||
}
|
||||
|
||||
// string lookback = 5;
|
||||
inline void PromRangeQuery::clear_lookback() {
|
||||
_impl_.lookback_.ClearToEmpty();
|
||||
}
|
||||
inline const std::string& PromRangeQuery::lookback() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.PromRangeQuery.lookback)
|
||||
return _internal_lookback();
|
||||
}
|
||||
template <typename ArgT0, typename... ArgT>
|
||||
inline PROTOBUF_ALWAYS_INLINE
|
||||
void PromRangeQuery::set_lookback(ArgT0&& arg0, ArgT... args) {
|
||||
|
||||
_impl_.lookback_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.PromRangeQuery.lookback)
|
||||
}
|
||||
inline std::string* PromRangeQuery::mutable_lookback() {
|
||||
std::string* _s = _internal_mutable_lookback();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.PromRangeQuery.lookback)
|
||||
return _s;
|
||||
}
|
||||
inline const std::string& PromRangeQuery::_internal_lookback() const {
|
||||
return _impl_.lookback_.Get();
|
||||
}
|
||||
inline void PromRangeQuery::_internal_set_lookback(const std::string& value) {
|
||||
|
||||
_impl_.lookback_.Set(value, GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* PromRangeQuery::_internal_mutable_lookback() {
|
||||
|
||||
return _impl_.lookback_.Mutable(GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* PromRangeQuery::release_lookback() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.PromRangeQuery.lookback)
|
||||
return _impl_.lookback_.Release();
|
||||
}
|
||||
inline void PromRangeQuery::set_allocated_lookback(std::string* lookback) {
|
||||
if (lookback != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
_impl_.lookback_.SetAllocated(lookback, GetArenaForAllocation());
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (_impl_.lookback_.IsDefault()) {
|
||||
_impl_.lookback_.Set("", GetArenaForAllocation());
|
||||
}
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.PromRangeQuery.lookback)
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // __GNUC__
|
||||
|
||||
Reference in New Issue
Block a user