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_{
|
::_pbi::ConstantInitialized): _impl_{
|
||||||
/*decltype(_impl_.query_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
/*decltype(_impl_.query_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||||
, /*decltype(_impl_.time_)*/{&::_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_)*/{}} {}
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||||
struct PromInstantQueryDefaultTypeInternal {
|
struct PromInstantQueryDefaultTypeInternal {
|
||||||
PROTOBUF_CONSTEXPR PromInstantQueryDefaultTypeInternal()
|
PROTOBUF_CONSTEXPR PromInstantQueryDefaultTypeInternal()
|
||||||
@@ -71,6 +72,7 @@ PROTOBUF_CONSTEXPR PromRangeQuery::PromRangeQuery(
|
|||||||
, /*decltype(_impl_.start_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
, /*decltype(_impl_.start_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||||
, /*decltype(_impl_.end_)*/{&::_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_.step_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||||
|
, /*decltype(_impl_.lookback_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||||
struct PromRangeQueryDefaultTypeInternal {
|
struct PromRangeQueryDefaultTypeInternal {
|
||||||
PROTOBUF_CONSTEXPR PromRangeQueryDefaultTypeInternal()
|
PROTOBUF_CONSTEXPR PromRangeQueryDefaultTypeInternal()
|
||||||
@@ -114,6 +116,7 @@ const uint32_t TableStruct_greptime_2fv1_2fprom_2eproto::offsets[] PROTOBUF_SECT
|
|||||||
~0u, // no _inlined_string_donated_
|
~0u, // no _inlined_string_donated_
|
||||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromInstantQuery, _impl_.query_),
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromInstantQuery, _impl_.query_),
|
||||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromInstantQuery, _impl_.time_),
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromInstantQuery, _impl_.time_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromInstantQuery, _impl_.lookback_),
|
||||||
~0u, // no _has_bits_
|
~0u, // no _has_bits_
|
||||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromRangeQuery, _internal_metadata_),
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromRangeQuery, _internal_metadata_),
|
||||||
~0u, // no _extensions_
|
~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_.start_),
|
||||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromRangeQuery, _impl_.end_),
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromRangeQuery, _impl_.end_),
|
||||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::PromRangeQuery, _impl_.step_),
|
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) = {
|
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||||
{ 0, -1, -1, sizeof(::greptime::v1::PromqlRequest)},
|
{ 0, -1, -1, sizeof(::greptime::v1::PromqlRequest)},
|
||||||
{ 10, -1, -1, sizeof(::greptime::v1::PromqlResponse)},
|
{ 10, -1, -1, sizeof(::greptime::v1::PromqlResponse)},
|
||||||
{ 18, -1, -1, sizeof(::greptime::v1::PromInstantQuery)},
|
{ 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[] = {
|
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"
|
"(\0132\033.greptime.v1.PromRangeQueryH\000B\010\n\006pro"
|
||||||
"mql\"K\n\016PromqlResponse\022+\n\006header\030\001 \001(\0132\033."
|
"mql\"K\n\016PromqlResponse\022+\n\006header\030\001 \001(\0132\033."
|
||||||
"greptime.v1.ResponseHeader\022\014\n\004body\030\002 \001(\014"
|
"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"
|
"\"A\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"
|
"ime\030\002 \001(\t\022\020\n\010lookback\030\003 \001(\t\"[\n\016PromRange"
|
||||||
"(\t\022\r\n\005start\030\002 \001(\t\022\013\n\003end\030\003 \001(\t\022\014\n\004step\030\004"
|
"Query\022\r\n\005query\030\001 \001(\t\022\r\n\005start\030\002 \001(\t\022\013\n\003e"
|
||||||
" \001(\t2V\n\021PrometheusGateway\022A\n\006Handle\022\032.gr"
|
"nd\030\003 \001(\t\022\014\n\004step\030\004 \001(\t\022\020\n\010lookback\030\005 \001(\t"
|
||||||
"eptime.v1.PromqlRequest\032\033.greptime.v1.Pr"
|
"2V\n\021PrometheusGateway\022A\n\006Handle\022\032.grepti"
|
||||||
"omqlResponseBS\n\016io.greptime.v1B\nPromethe"
|
"me.v1.PromqlRequest\032\033.greptime.v1.Promql"
|
||||||
"usZ5github.com/GreptimeTeam/greptime-pro"
|
"ResponseBS\n\016io.greptime.v1B\nPrometheusZ5"
|
||||||
"to/go/greptime/v1b\006proto3"
|
"github.com/GreptimeTeam/greptime-proto/g"
|
||||||
|
"o/greptime/v1b\006proto3"
|
||||||
;
|
;
|
||||||
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fprom_2eproto_deps[1] = {
|
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fprom_2eproto_deps[1] = {
|
||||||
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
|
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
|
||||||
};
|
};
|
||||||
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fprom_2eproto_once;
|
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fprom_2eproto_once;
|
||||||
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fprom_2eproto = {
|
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",
|
"greptime/v1/prom.proto",
|
||||||
&descriptor_table_greptime_2fv1_2fprom_2eproto_once, descriptor_table_greptime_2fv1_2fprom_2eproto_deps, 1, 4,
|
&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,
|
schemas, file_default_instances, TableStruct_greptime_2fv1_2fprom_2eproto::offsets,
|
||||||
@@ -795,6 +800,7 @@ PromInstantQuery::PromInstantQuery(const PromInstantQuery& from)
|
|||||||
new (&_impl_) Impl_{
|
new (&_impl_) Impl_{
|
||||||
decltype(_impl_.query_){}
|
decltype(_impl_.query_){}
|
||||||
, decltype(_impl_.time_){}
|
, decltype(_impl_.time_){}
|
||||||
|
, decltype(_impl_.lookback_){}
|
||||||
, /*decltype(_impl_._cached_size_)*/{}};
|
, /*decltype(_impl_._cached_size_)*/{}};
|
||||||
|
|
||||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
_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->_impl_.time_.Set(from._internal_time(),
|
||||||
_this->GetArenaForAllocation());
|
_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)
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.PromInstantQuery)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -824,6 +838,7 @@ inline void PromInstantQuery::SharedCtor(
|
|||||||
new (&_impl_) Impl_{
|
new (&_impl_) Impl_{
|
||||||
decltype(_impl_.query_){}
|
decltype(_impl_.query_){}
|
||||||
, decltype(_impl_.time_){}
|
, decltype(_impl_.time_){}
|
||||||
|
, decltype(_impl_.lookback_){}
|
||||||
, /*decltype(_impl_._cached_size_)*/{}
|
, /*decltype(_impl_._cached_size_)*/{}
|
||||||
};
|
};
|
||||||
_impl_.query_.InitDefault();
|
_impl_.query_.InitDefault();
|
||||||
@@ -834,6 +849,10 @@ inline void PromInstantQuery::SharedCtor(
|
|||||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
_impl_.time_.Set("", GetArenaForAllocation());
|
_impl_.time_.Set("", GetArenaForAllocation());
|
||||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
#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() {
|
PromInstantQuery::~PromInstantQuery() {
|
||||||
@@ -849,6 +868,7 @@ inline void PromInstantQuery::SharedDtor() {
|
|||||||
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||||
_impl_.query_.Destroy();
|
_impl_.query_.Destroy();
|
||||||
_impl_.time_.Destroy();
|
_impl_.time_.Destroy();
|
||||||
|
_impl_.lookback_.Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PromInstantQuery::SetCachedSize(int size) const {
|
void PromInstantQuery::SetCachedSize(int size) const {
|
||||||
@@ -863,6 +883,7 @@ void PromInstantQuery::Clear() {
|
|||||||
|
|
||||||
_impl_.query_.ClearToEmpty();
|
_impl_.query_.ClearToEmpty();
|
||||||
_impl_.time_.ClearToEmpty();
|
_impl_.time_.ClearToEmpty();
|
||||||
|
_impl_.lookback_.ClearToEmpty();
|
||||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -892,6 +913,16 @@ const char* PromInstantQuery::_InternalParse(const char* ptr, ::_pbi::ParseConte
|
|||||||
} else
|
} else
|
||||||
goto handle_unusual;
|
goto handle_unusual;
|
||||||
continue;
|
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:
|
default:
|
||||||
goto handle_unusual;
|
goto handle_unusual;
|
||||||
} // switch
|
} // switch
|
||||||
@@ -941,6 +972,16 @@ uint8_t* PromInstantQuery::_InternalSerialize(
|
|||||||
2, this->_internal_time(), target);
|
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())) {
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||||
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
||||||
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
_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());
|
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_);
|
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()) {
|
if (!from._internal_time().empty()) {
|
||||||
_this->_internal_set_time(from._internal_time());
|
_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_);
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1022,6 +1073,10 @@ void PromInstantQuery::InternalSwap(PromInstantQuery* other) {
|
|||||||
&_impl_.time_, lhs_arena,
|
&_impl_.time_, lhs_arena,
|
||||||
&other->_impl_.time_, rhs_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 {
|
::PROTOBUF_NAMESPACE_ID::Metadata PromInstantQuery::GetMetadata() const {
|
||||||
@@ -1050,6 +1105,7 @@ PromRangeQuery::PromRangeQuery(const PromRangeQuery& from)
|
|||||||
, decltype(_impl_.start_){}
|
, decltype(_impl_.start_){}
|
||||||
, decltype(_impl_.end_){}
|
, decltype(_impl_.end_){}
|
||||||
, decltype(_impl_.step_){}
|
, decltype(_impl_.step_){}
|
||||||
|
, decltype(_impl_.lookback_){}
|
||||||
, /*decltype(_impl_._cached_size_)*/{}};
|
, /*decltype(_impl_._cached_size_)*/{}};
|
||||||
|
|
||||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
_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->_impl_.step_.Set(from._internal_step(),
|
||||||
_this->GetArenaForAllocation());
|
_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)
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.PromRangeQuery)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1097,6 +1161,7 @@ inline void PromRangeQuery::SharedCtor(
|
|||||||
, decltype(_impl_.start_){}
|
, decltype(_impl_.start_){}
|
||||||
, decltype(_impl_.end_){}
|
, decltype(_impl_.end_){}
|
||||||
, decltype(_impl_.step_){}
|
, decltype(_impl_.step_){}
|
||||||
|
, decltype(_impl_.lookback_){}
|
||||||
, /*decltype(_impl_._cached_size_)*/{}
|
, /*decltype(_impl_._cached_size_)*/{}
|
||||||
};
|
};
|
||||||
_impl_.query_.InitDefault();
|
_impl_.query_.InitDefault();
|
||||||
@@ -1115,6 +1180,10 @@ inline void PromRangeQuery::SharedCtor(
|
|||||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
_impl_.step_.Set("", GetArenaForAllocation());
|
_impl_.step_.Set("", GetArenaForAllocation());
|
||||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
#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() {
|
PromRangeQuery::~PromRangeQuery() {
|
||||||
@@ -1132,6 +1201,7 @@ inline void PromRangeQuery::SharedDtor() {
|
|||||||
_impl_.start_.Destroy();
|
_impl_.start_.Destroy();
|
||||||
_impl_.end_.Destroy();
|
_impl_.end_.Destroy();
|
||||||
_impl_.step_.Destroy();
|
_impl_.step_.Destroy();
|
||||||
|
_impl_.lookback_.Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PromRangeQuery::SetCachedSize(int size) const {
|
void PromRangeQuery::SetCachedSize(int size) const {
|
||||||
@@ -1148,6 +1218,7 @@ void PromRangeQuery::Clear() {
|
|||||||
_impl_.start_.ClearToEmpty();
|
_impl_.start_.ClearToEmpty();
|
||||||
_impl_.end_.ClearToEmpty();
|
_impl_.end_.ClearToEmpty();
|
||||||
_impl_.step_.ClearToEmpty();
|
_impl_.step_.ClearToEmpty();
|
||||||
|
_impl_.lookback_.ClearToEmpty();
|
||||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1197,6 +1268,16 @@ const char* PromRangeQuery::_InternalParse(const char* ptr, ::_pbi::ParseContext
|
|||||||
} else
|
} else
|
||||||
goto handle_unusual;
|
goto handle_unusual;
|
||||||
continue;
|
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:
|
default:
|
||||||
goto handle_unusual;
|
goto handle_unusual;
|
||||||
} // switch
|
} // switch
|
||||||
@@ -1266,6 +1347,16 @@ uint8_t* PromRangeQuery::_InternalSerialize(
|
|||||||
4, this->_internal_step(), target);
|
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())) {
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||||
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
||||||
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
_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());
|
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_);
|
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()) {
|
if (!from._internal_step().empty()) {
|
||||||
_this->_internal_set_step(from._internal_step());
|
_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_);
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1375,6 +1476,10 @@ void PromRangeQuery::InternalSwap(PromRangeQuery* other) {
|
|||||||
&_impl_.step_, lhs_arena,
|
&_impl_.step_, lhs_arena,
|
||||||
&other->_impl_.step_, rhs_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 {
|
::PROTOBUF_NAMESPACE_ID::Metadata PromRangeQuery::GetMetadata() const {
|
||||||
|
|||||||
@@ -584,6 +584,7 @@ class PromInstantQuery final :
|
|||||||
enum : int {
|
enum : int {
|
||||||
kQueryFieldNumber = 1,
|
kQueryFieldNumber = 1,
|
||||||
kTimeFieldNumber = 2,
|
kTimeFieldNumber = 2,
|
||||||
|
kLookbackFieldNumber = 3,
|
||||||
};
|
};
|
||||||
// string query = 1;
|
// string query = 1;
|
||||||
void clear_query();
|
void clear_query();
|
||||||
@@ -613,6 +614,20 @@ class PromInstantQuery final :
|
|||||||
std::string* _internal_mutable_time();
|
std::string* _internal_mutable_time();
|
||||||
public:
|
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)
|
// @@protoc_insertion_point(class_scope:greptime.v1.PromInstantQuery)
|
||||||
private:
|
private:
|
||||||
class _Internal;
|
class _Internal;
|
||||||
@@ -623,6 +638,7 @@ class PromInstantQuery final :
|
|||||||
struct Impl_ {
|
struct Impl_ {
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr query_;
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr query_;
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr time_;
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr time_;
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr lookback_;
|
||||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||||
};
|
};
|
||||||
union { Impl_ _impl_; };
|
union { Impl_ _impl_; };
|
||||||
@@ -755,6 +771,7 @@ class PromRangeQuery final :
|
|||||||
kStartFieldNumber = 2,
|
kStartFieldNumber = 2,
|
||||||
kEndFieldNumber = 3,
|
kEndFieldNumber = 3,
|
||||||
kStepFieldNumber = 4,
|
kStepFieldNumber = 4,
|
||||||
|
kLookbackFieldNumber = 5,
|
||||||
};
|
};
|
||||||
// string query = 1;
|
// string query = 1;
|
||||||
void clear_query();
|
void clear_query();
|
||||||
@@ -812,6 +829,20 @@ class PromRangeQuery final :
|
|||||||
std::string* _internal_mutable_step();
|
std::string* _internal_mutable_step();
|
||||||
public:
|
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)
|
// @@protoc_insertion_point(class_scope:greptime.v1.PromRangeQuery)
|
||||||
private:
|
private:
|
||||||
class _Internal;
|
class _Internal;
|
||||||
@@ -824,6 +855,7 @@ class PromRangeQuery final :
|
|||||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr start_;
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr start_;
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr end_;
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr end_;
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr step_;
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr step_;
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr lookback_;
|
||||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||||
};
|
};
|
||||||
union { Impl_ _impl_; };
|
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)
|
// @@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
|
// PromRangeQuery
|
||||||
@@ -1529,6 +1611,56 @@ inline void PromRangeQuery::set_allocated_step(std::string* step) {
|
|||||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.PromRangeQuery.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__
|
#ifdef __GNUC__
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif // __GNUC__
|
#endif // __GNUC__
|
||||||
|
|||||||
+45
-26
@@ -183,8 +183,9 @@ type PromInstantQuery struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
|
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
|
||||||
Time string `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
|
Time string `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
|
||||||
|
Lookback string `protobuf:"bytes,3,opt,name=lookback,proto3" json:"lookback,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PromInstantQuery) Reset() {
|
func (x *PromInstantQuery) Reset() {
|
||||||
@@ -233,15 +234,23 @@ func (x *PromInstantQuery) GetTime() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *PromInstantQuery) GetLookback() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Lookback
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
type PromRangeQuery struct {
|
type PromRangeQuery struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
|
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
|
||||||
Start string `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"`
|
Start string `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"`
|
||||||
End string `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"`
|
End string `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"`
|
||||||
Step string `protobuf:"bytes,4,opt,name=step,proto3" json:"step,omitempty"`
|
Step string `protobuf:"bytes,4,opt,name=step,proto3" json:"step,omitempty"`
|
||||||
|
Lookback string `protobuf:"bytes,5,opt,name=lookback,proto3" json:"lookback,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PromRangeQuery) Reset() {
|
func (x *PromRangeQuery) Reset() {
|
||||||
@@ -304,6 +313,13 @@ func (x *PromRangeQuery) GetStep() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *PromRangeQuery) GetLookback() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Lookback
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_greptime_v1_prom_proto protoreflect.FileDescriptor
|
var File_greptime_v1_prom_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_greptime_v1_prom_proto_rawDesc = []byte{
|
var file_greptime_v1_prom_proto_rawDesc = []byte{
|
||||||
@@ -330,28 +346,31 @@ var file_greptime_v1_prom_proto_rawDesc = []byte{
|
|||||||
0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65,
|
0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65,
|
||||||
0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04,
|
0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04,
|
||||||
0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79,
|
0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79,
|
||||||
0x22, 0x3c, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x51,
|
0x22, 0x58, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x51,
|
||||||
0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20,
|
0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69,
|
0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69,
|
||||||
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x62,
|
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a,
|
||||||
0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6d, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79,
|
0x0a, 0x08, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x52, 0x08, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x22, 0x7e, 0x0a, 0x0e, 0x50, 0x72,
|
||||||
0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18,
|
0x6f, 0x6d, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03,
|
0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65,
|
||||||
0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x12,
|
0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x74,
|
0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18,
|
||||||
0x65, 0x70, 0x32, 0x56, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73,
|
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74,
|
||||||
0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x41, 0x0a, 0x06, 0x48, 0x61, 0x6e, 0x64, 0x6c,
|
0x65, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x12, 0x1a,
|
||||||
0x65, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
0x0a, 0x08, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x50, 0x72, 0x6f, 0x6d, 0x71, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e,
|
0x52, 0x08, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x32, 0x56, 0x0a, 0x11, 0x50, 0x72,
|
||||||
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6d,
|
0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12,
|
||||||
0x71, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x53, 0x0a, 0x0e, 0x69, 0x6f,
|
0x41, 0x0a, 0x06, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70,
|
||||||
0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x50, 0x72,
|
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x71, 0x6c, 0x52, 0x65,
|
||||||
0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
|
||||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61,
|
0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x71, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x73, 0x65, 0x42, 0x53, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
||||||
0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62,
|
0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x50, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73,
|
||||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x5a, 0x35, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -1912,6 +1912,18 @@ public final class Prometheus {
|
|||||||
*/
|
*/
|
||||||
com.google.protobuf.ByteString
|
com.google.protobuf.ByteString
|
||||||
getTimeBytes();
|
getTimeBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 3;</code>
|
||||||
|
* @return The lookback.
|
||||||
|
*/
|
||||||
|
java.lang.String getLookback();
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 3;</code>
|
||||||
|
* @return The bytes for lookback.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getLookbackBytes();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Protobuf type {@code greptime.v1.PromInstantQuery}
|
* Protobuf type {@code greptime.v1.PromInstantQuery}
|
||||||
@@ -1928,6 +1940,7 @@ public final class Prometheus {
|
|||||||
private PromInstantQuery() {
|
private PromInstantQuery() {
|
||||||
query_ = "";
|
query_ = "";
|
||||||
time_ = "";
|
time_ = "";
|
||||||
|
lookback_ = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@java.lang.Override
|
@java.lang.Override
|
||||||
@@ -1972,6 +1985,12 @@ public final class Prometheus {
|
|||||||
time_ = s;
|
time_ = s;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 26: {
|
||||||
|
java.lang.String s = input.readStringRequireUtf8();
|
||||||
|
|
||||||
|
lookback_ = s;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
if (!parseUnknownField(
|
if (!parseUnknownField(
|
||||||
input, unknownFields, extensionRegistry, tag)) {
|
input, unknownFields, extensionRegistry, tag)) {
|
||||||
@@ -2082,6 +2101,44 @@ public final class Prometheus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final int LOOKBACK_FIELD_NUMBER = 3;
|
||||||
|
private volatile java.lang.Object lookback_;
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 3;</code>
|
||||||
|
* @return The lookback.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getLookback() {
|
||||||
|
java.lang.Object ref = lookback_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
lookback_ = s;
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 3;</code>
|
||||||
|
* @return The bytes for lookback.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getLookbackBytes() {
|
||||||
|
java.lang.Object ref = lookback_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
lookback_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
@java.lang.Override
|
@java.lang.Override
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -2102,6 +2159,9 @@ public final class Prometheus {
|
|||||||
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(time_)) {
|
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(time_)) {
|
||||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, time_);
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, time_);
|
||||||
}
|
}
|
||||||
|
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lookback_)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, lookback_);
|
||||||
|
}
|
||||||
unknownFields.writeTo(output);
|
unknownFields.writeTo(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2117,6 +2177,9 @@ public final class Prometheus {
|
|||||||
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(time_)) {
|
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(time_)) {
|
||||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, time_);
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, time_);
|
||||||
}
|
}
|
||||||
|
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lookback_)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, lookback_);
|
||||||
|
}
|
||||||
size += unknownFields.getSerializedSize();
|
size += unknownFields.getSerializedSize();
|
||||||
memoizedSize = size;
|
memoizedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -2136,6 +2199,8 @@ public final class Prometheus {
|
|||||||
.equals(other.getQuery())) return false;
|
.equals(other.getQuery())) return false;
|
||||||
if (!getTime()
|
if (!getTime()
|
||||||
.equals(other.getTime())) return false;
|
.equals(other.getTime())) return false;
|
||||||
|
if (!getLookback()
|
||||||
|
.equals(other.getLookback())) return false;
|
||||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -2151,6 +2216,8 @@ public final class Prometheus {
|
|||||||
hash = (53 * hash) + getQuery().hashCode();
|
hash = (53 * hash) + getQuery().hashCode();
|
||||||
hash = (37 * hash) + TIME_FIELD_NUMBER;
|
hash = (37 * hash) + TIME_FIELD_NUMBER;
|
||||||
hash = (53 * hash) + getTime().hashCode();
|
hash = (53 * hash) + getTime().hashCode();
|
||||||
|
hash = (37 * hash) + LOOKBACK_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getLookback().hashCode();
|
||||||
hash = (29 * hash) + unknownFields.hashCode();
|
hash = (29 * hash) + unknownFields.hashCode();
|
||||||
memoizedHashCode = hash;
|
memoizedHashCode = hash;
|
||||||
return hash;
|
return hash;
|
||||||
@@ -2288,6 +2355,8 @@ public final class Prometheus {
|
|||||||
|
|
||||||
time_ = "";
|
time_ = "";
|
||||||
|
|
||||||
|
lookback_ = "";
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2316,6 +2385,7 @@ public final class Prometheus {
|
|||||||
io.greptime.v1.Prometheus.PromInstantQuery result = new io.greptime.v1.Prometheus.PromInstantQuery(this);
|
io.greptime.v1.Prometheus.PromInstantQuery result = new io.greptime.v1.Prometheus.PromInstantQuery(this);
|
||||||
result.query_ = query_;
|
result.query_ = query_;
|
||||||
result.time_ = time_;
|
result.time_ = time_;
|
||||||
|
result.lookback_ = lookback_;
|
||||||
onBuilt();
|
onBuilt();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -2372,6 +2442,10 @@ public final class Prometheus {
|
|||||||
time_ = other.time_;
|
time_ = other.time_;
|
||||||
onChanged();
|
onChanged();
|
||||||
}
|
}
|
||||||
|
if (!other.getLookback().isEmpty()) {
|
||||||
|
lookback_ = other.lookback_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
this.mergeUnknownFields(other.unknownFields);
|
this.mergeUnknownFields(other.unknownFields);
|
||||||
onChanged();
|
onChanged();
|
||||||
return this;
|
return this;
|
||||||
@@ -2552,6 +2626,82 @@ public final class Prometheus {
|
|||||||
onChanged();
|
onChanged();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private java.lang.Object lookback_ = "";
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 3;</code>
|
||||||
|
* @return The lookback.
|
||||||
|
*/
|
||||||
|
public java.lang.String getLookback() {
|
||||||
|
java.lang.Object ref = lookback_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
lookback_ = s;
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 3;</code>
|
||||||
|
* @return The bytes for lookback.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getLookbackBytes() {
|
||||||
|
java.lang.Object ref = lookback_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
lookback_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 3;</code>
|
||||||
|
* @param value The lookback to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setLookback(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
|
||||||
|
lookback_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 3;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearLookback() {
|
||||||
|
|
||||||
|
lookback_ = getDefaultInstance().getLookback();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 3;</code>
|
||||||
|
* @param value The bytes for lookback to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setLookbackBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
checkByteStringIsUtf8(value);
|
||||||
|
|
||||||
|
lookback_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
@java.lang.Override
|
@java.lang.Override
|
||||||
public final Builder setUnknownFields(
|
public final Builder setUnknownFields(
|
||||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
@@ -2656,6 +2806,18 @@ public final class Prometheus {
|
|||||||
*/
|
*/
|
||||||
com.google.protobuf.ByteString
|
com.google.protobuf.ByteString
|
||||||
getStepBytes();
|
getStepBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 5;</code>
|
||||||
|
* @return The lookback.
|
||||||
|
*/
|
||||||
|
java.lang.String getLookback();
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 5;</code>
|
||||||
|
* @return The bytes for lookback.
|
||||||
|
*/
|
||||||
|
com.google.protobuf.ByteString
|
||||||
|
getLookbackBytes();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Protobuf type {@code greptime.v1.PromRangeQuery}
|
* Protobuf type {@code greptime.v1.PromRangeQuery}
|
||||||
@@ -2674,6 +2836,7 @@ public final class Prometheus {
|
|||||||
start_ = "";
|
start_ = "";
|
||||||
end_ = "";
|
end_ = "";
|
||||||
step_ = "";
|
step_ = "";
|
||||||
|
lookback_ = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@java.lang.Override
|
@java.lang.Override
|
||||||
@@ -2730,6 +2893,12 @@ public final class Prometheus {
|
|||||||
step_ = s;
|
step_ = s;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 42: {
|
||||||
|
java.lang.String s = input.readStringRequireUtf8();
|
||||||
|
|
||||||
|
lookback_ = s;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
if (!parseUnknownField(
|
if (!parseUnknownField(
|
||||||
input, unknownFields, extensionRegistry, tag)) {
|
input, unknownFields, extensionRegistry, tag)) {
|
||||||
@@ -2916,6 +3085,44 @@ public final class Prometheus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final int LOOKBACK_FIELD_NUMBER = 5;
|
||||||
|
private volatile java.lang.Object lookback_;
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 5;</code>
|
||||||
|
* @return The lookback.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public java.lang.String getLookback() {
|
||||||
|
java.lang.Object ref = lookback_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
} else {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
lookback_ = s;
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 5;</code>
|
||||||
|
* @return The bytes for lookback.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getLookbackBytes() {
|
||||||
|
java.lang.Object ref = lookback_;
|
||||||
|
if (ref instanceof java.lang.String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
lookback_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
@java.lang.Override
|
@java.lang.Override
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -2942,6 +3149,9 @@ public final class Prometheus {
|
|||||||
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(step_)) {
|
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(step_)) {
|
||||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, step_);
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, step_);
|
||||||
}
|
}
|
||||||
|
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lookback_)) {
|
||||||
|
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, lookback_);
|
||||||
|
}
|
||||||
unknownFields.writeTo(output);
|
unknownFields.writeTo(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2963,6 +3173,9 @@ public final class Prometheus {
|
|||||||
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(step_)) {
|
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(step_)) {
|
||||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, step_);
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, step_);
|
||||||
}
|
}
|
||||||
|
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lookback_)) {
|
||||||
|
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, lookback_);
|
||||||
|
}
|
||||||
size += unknownFields.getSerializedSize();
|
size += unknownFields.getSerializedSize();
|
||||||
memoizedSize = size;
|
memoizedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -2986,6 +3199,8 @@ public final class Prometheus {
|
|||||||
.equals(other.getEnd())) return false;
|
.equals(other.getEnd())) return false;
|
||||||
if (!getStep()
|
if (!getStep()
|
||||||
.equals(other.getStep())) return false;
|
.equals(other.getStep())) return false;
|
||||||
|
if (!getLookback()
|
||||||
|
.equals(other.getLookback())) return false;
|
||||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -3005,6 +3220,8 @@ public final class Prometheus {
|
|||||||
hash = (53 * hash) + getEnd().hashCode();
|
hash = (53 * hash) + getEnd().hashCode();
|
||||||
hash = (37 * hash) + STEP_FIELD_NUMBER;
|
hash = (37 * hash) + STEP_FIELD_NUMBER;
|
||||||
hash = (53 * hash) + getStep().hashCode();
|
hash = (53 * hash) + getStep().hashCode();
|
||||||
|
hash = (37 * hash) + LOOKBACK_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getLookback().hashCode();
|
||||||
hash = (29 * hash) + unknownFields.hashCode();
|
hash = (29 * hash) + unknownFields.hashCode();
|
||||||
memoizedHashCode = hash;
|
memoizedHashCode = hash;
|
||||||
return hash;
|
return hash;
|
||||||
@@ -3146,6 +3363,8 @@ public final class Prometheus {
|
|||||||
|
|
||||||
step_ = "";
|
step_ = "";
|
||||||
|
|
||||||
|
lookback_ = "";
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3176,6 +3395,7 @@ public final class Prometheus {
|
|||||||
result.start_ = start_;
|
result.start_ = start_;
|
||||||
result.end_ = end_;
|
result.end_ = end_;
|
||||||
result.step_ = step_;
|
result.step_ = step_;
|
||||||
|
result.lookback_ = lookback_;
|
||||||
onBuilt();
|
onBuilt();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -3240,6 +3460,10 @@ public final class Prometheus {
|
|||||||
step_ = other.step_;
|
step_ = other.step_;
|
||||||
onChanged();
|
onChanged();
|
||||||
}
|
}
|
||||||
|
if (!other.getLookback().isEmpty()) {
|
||||||
|
lookback_ = other.lookback_;
|
||||||
|
onChanged();
|
||||||
|
}
|
||||||
this.mergeUnknownFields(other.unknownFields);
|
this.mergeUnknownFields(other.unknownFields);
|
||||||
onChanged();
|
onChanged();
|
||||||
return this;
|
return this;
|
||||||
@@ -3572,6 +3796,82 @@ public final class Prometheus {
|
|||||||
onChanged();
|
onChanged();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private java.lang.Object lookback_ = "";
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 5;</code>
|
||||||
|
* @return The lookback.
|
||||||
|
*/
|
||||||
|
public java.lang.String getLookback() {
|
||||||
|
java.lang.Object ref = lookback_;
|
||||||
|
if (!(ref instanceof java.lang.String)) {
|
||||||
|
com.google.protobuf.ByteString bs =
|
||||||
|
(com.google.protobuf.ByteString) ref;
|
||||||
|
java.lang.String s = bs.toStringUtf8();
|
||||||
|
lookback_ = s;
|
||||||
|
return s;
|
||||||
|
} else {
|
||||||
|
return (java.lang.String) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 5;</code>
|
||||||
|
* @return The bytes for lookback.
|
||||||
|
*/
|
||||||
|
public com.google.protobuf.ByteString
|
||||||
|
getLookbackBytes() {
|
||||||
|
java.lang.Object ref = lookback_;
|
||||||
|
if (ref instanceof String) {
|
||||||
|
com.google.protobuf.ByteString b =
|
||||||
|
com.google.protobuf.ByteString.copyFromUtf8(
|
||||||
|
(java.lang.String) ref);
|
||||||
|
lookback_ = b;
|
||||||
|
return b;
|
||||||
|
} else {
|
||||||
|
return (com.google.protobuf.ByteString) ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 5;</code>
|
||||||
|
* @param value The lookback to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setLookback(
|
||||||
|
java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
|
||||||
|
lookback_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 5;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearLookback() {
|
||||||
|
|
||||||
|
lookback_ = getDefaultInstance().getLookback();
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>string lookback = 5;</code>
|
||||||
|
* @param value The bytes for lookback to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setLookbackBytes(
|
||||||
|
com.google.protobuf.ByteString value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
checkByteStringIsUtf8(value);
|
||||||
|
|
||||||
|
lookback_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
@java.lang.Override
|
@java.lang.Override
|
||||||
public final Builder setUnknownFields(
|
public final Builder setUnknownFields(
|
||||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
@@ -3662,14 +3962,15 @@ public final class Prometheus {
|
|||||||
"(\0132\033.greptime.v1.PromRangeQueryH\000B\010\n\006pro" +
|
"(\0132\033.greptime.v1.PromRangeQueryH\000B\010\n\006pro" +
|
||||||
"mql\"K\n\016PromqlResponse\022+\n\006header\030\001 \001(\0132\033." +
|
"mql\"K\n\016PromqlResponse\022+\n\006header\030\001 \001(\0132\033." +
|
||||||
"greptime.v1.ResponseHeader\022\014\n\004body\030\002 \001(\014" +
|
"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" +
|
"\"A\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" +
|
"ime\030\002 \001(\t\022\020\n\010lookback\030\003 \001(\t\"[\n\016PromRange" +
|
||||||
"(\t\022\r\n\005start\030\002 \001(\t\022\013\n\003end\030\003 \001(\t\022\014\n\004step\030\004" +
|
"Query\022\r\n\005query\030\001 \001(\t\022\r\n\005start\030\002 \001(\t\022\013\n\003e" +
|
||||||
" \001(\t2V\n\021PrometheusGateway\022A\n\006Handle\022\032.gr" +
|
"nd\030\003 \001(\t\022\014\n\004step\030\004 \001(\t\022\020\n\010lookback\030\005 \001(\t" +
|
||||||
"eptime.v1.PromqlRequest\032\033.greptime.v1.Pr" +
|
"2V\n\021PrometheusGateway\022A\n\006Handle\022\032.grepti" +
|
||||||
"omqlResponseBS\n\016io.greptime.v1B\nPromethe" +
|
"me.v1.PromqlRequest\032\033.greptime.v1.Promql" +
|
||||||
"usZ5github.com/GreptimeTeam/greptime-pro" +
|
"ResponseBS\n\016io.greptime.v1B\nPrometheusZ5" +
|
||||||
"to/go/greptime/v1b\006proto3"
|
"github.com/GreptimeTeam/greptime-proto/g" +
|
||||||
|
"o/greptime/v1b\006proto3"
|
||||||
};
|
};
|
||||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||||
.internalBuildGeneratedFileFrom(descriptorData,
|
.internalBuildGeneratedFileFrom(descriptorData,
|
||||||
@@ -3693,13 +3994,13 @@ public final class Prometheus {
|
|||||||
internal_static_greptime_v1_PromInstantQuery_fieldAccessorTable = new
|
internal_static_greptime_v1_PromInstantQuery_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
internal_static_greptime_v1_PromInstantQuery_descriptor,
|
internal_static_greptime_v1_PromInstantQuery_descriptor,
|
||||||
new java.lang.String[] { "Query", "Time", });
|
new java.lang.String[] { "Query", "Time", "Lookback", });
|
||||||
internal_static_greptime_v1_PromRangeQuery_descriptor =
|
internal_static_greptime_v1_PromRangeQuery_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(3);
|
getDescriptor().getMessageTypes().get(3);
|
||||||
internal_static_greptime_v1_PromRangeQuery_fieldAccessorTable = new
|
internal_static_greptime_v1_PromRangeQuery_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
internal_static_greptime_v1_PromRangeQuery_descriptor,
|
internal_static_greptime_v1_PromRangeQuery_descriptor,
|
||||||
new java.lang.String[] { "Query", "Start", "End", "Step", });
|
new java.lang.String[] { "Query", "Start", "End", "Step", "Lookback", });
|
||||||
io.greptime.v1.Common.getDescriptor();
|
io.greptime.v1.Common.getDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ message PromqlResponse {
|
|||||||
message PromInstantQuery {
|
message PromInstantQuery {
|
||||||
string query = 1;
|
string query = 1;
|
||||||
string time = 2;
|
string time = 2;
|
||||||
|
string lookback = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message PromRangeQuery {
|
message PromRangeQuery {
|
||||||
@@ -50,4 +51,5 @@ message PromRangeQuery {
|
|||||||
string start = 2;
|
string start = 2;
|
||||||
string end = 3;
|
string end = 3;
|
||||||
string step = 4;
|
string step = 4;
|
||||||
|
string lookback = 5;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user