diff --git a/c++/greptime/v1/prom.pb.cc b/c++/greptime/v1/prom.pb.cc index 43760378..e975d292 100644 --- a/c++/greptime/v1/prom.pb.cc +++ b/c++/greptime/v1/prom.pb.cc @@ -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(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(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(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(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 { diff --git a/c++/greptime/v1/prom.pb.h b/c++/greptime/v1/prom.pb.h index b4657be1..d82fd27f 100644 --- a/c++/greptime/v1/prom.pb.h +++ b/c++/greptime/v1/prom.pb.h @@ -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 + 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 + 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 +inline PROTOBUF_ALWAYS_INLINE +void PromInstantQuery::set_lookback(ArgT0&& arg0, ArgT... args) { + + _impl_.lookback_.Set(static_cast(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 +inline PROTOBUF_ALWAYS_INLINE +void PromRangeQuery::set_lookback(ArgT0&& arg0, ArgT... args) { + + _impl_.lookback_.Set(static_cast(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__ diff --git a/go/greptime/v1/prom.pb.go b/go/greptime/v1/prom.pb.go index f4b1ea1a..33f333dd 100644 --- a/go/greptime/v1/prom.pb.go +++ b/go/greptime/v1/prom.pb.go @@ -183,8 +183,9 @@ type PromInstantQuery struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` - Time string `protobuf:"bytes,2,opt,name=time,proto3" json:"time,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"` + Lookback string `protobuf:"bytes,3,opt,name=lookback,proto3" json:"lookback,omitempty"` } func (x *PromInstantQuery) Reset() { @@ -233,15 +234,23 @@ func (x *PromInstantQuery) GetTime() string { return "" } +func (x *PromInstantQuery) GetLookback() string { + if x != nil { + return x.Lookback + } + return "" +} + type PromRangeQuery struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,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"` - Step string `protobuf:"bytes,4,opt,name=step,proto3" json:"step,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"` + End string `protobuf:"bytes,3,opt,name=end,proto3" json:"end,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() { @@ -304,6 +313,13 @@ func (x *PromRangeQuery) GetStep() string { 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_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, 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, - 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, 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, - 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6d, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, 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, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x32, 0x56, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, - 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x41, 0x0a, 0x06, 0x48, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x6d, 0x71, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6d, - 0x71, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x53, 0x0a, 0x0e, 0x69, 0x6f, - 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x50, 0x72, - 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 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, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x22, 0x7e, 0x0a, 0x0e, 0x50, 0x72, + 0x6f, 0x6d, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, 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, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x12, 0x1a, + 0x0a, 0x08, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x32, 0x56, 0x0a, 0x11, 0x50, 0x72, + 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, + 0x41, 0x0a, 0x06, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x71, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x71, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x53, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x50, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, + 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 ( diff --git a/java/src/main/java/io/greptime/v1/Prometheus.java b/java/src/main/java/io/greptime/v1/Prometheus.java index 5a6bc9b9..d7e1a5b6 100644 --- a/java/src/main/java/io/greptime/v1/Prometheus.java +++ b/java/src/main/java/io/greptime/v1/Prometheus.java @@ -1912,6 +1912,18 @@ public interface PromInstantQueryOrBuilder extends */ com.google.protobuf.ByteString getTimeBytes(); + + /** + * string lookback = 3; + * @return The lookback. + */ + java.lang.String getLookback(); + /** + * string lookback = 3; + * @return The bytes for lookback. + */ + com.google.protobuf.ByteString + getLookbackBytes(); } /** * Protobuf type {@code greptime.v1.PromInstantQuery} @@ -1928,6 +1940,7 @@ private PromInstantQuery(com.google.protobuf.GeneratedMessageV3.Builder build private PromInstantQuery() { query_ = ""; time_ = ""; + lookback_ = ""; } @java.lang.Override @@ -1972,6 +1985,12 @@ private PromInstantQuery( time_ = s; break; } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + lookback_ = s; + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -2082,6 +2101,44 @@ public java.lang.String getTime() { } } + public static final int LOOKBACK_FIELD_NUMBER = 3; + private volatile java.lang.Object lookback_; + /** + * string lookback = 3; + * @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; + } + } + /** + * string lookback = 3; + * @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; @java.lang.Override public final boolean isInitialized() { @@ -2102,6 +2159,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(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); } @@ -2117,6 +2177,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(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(); memoizedSize = size; return size; @@ -2136,6 +2199,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getQuery())) return false; if (!getTime() .equals(other.getTime())) return false; + if (!getLookback() + .equals(other.getLookback())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2151,6 +2216,8 @@ public int hashCode() { hash = (53 * hash) + getQuery().hashCode(); hash = (37 * hash) + TIME_FIELD_NUMBER; hash = (53 * hash) + getTime().hashCode(); + hash = (37 * hash) + LOOKBACK_FIELD_NUMBER; + hash = (53 * hash) + getLookback().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2288,6 +2355,8 @@ public Builder clear() { time_ = ""; + lookback_ = ""; + return this; } @@ -2316,6 +2385,7 @@ public io.greptime.v1.Prometheus.PromInstantQuery buildPartial() { io.greptime.v1.Prometheus.PromInstantQuery result = new io.greptime.v1.Prometheus.PromInstantQuery(this); result.query_ = query_; result.time_ = time_; + result.lookback_ = lookback_; onBuilt(); return result; } @@ -2372,6 +2442,10 @@ public Builder mergeFrom(io.greptime.v1.Prometheus.PromInstantQuery other) { time_ = other.time_; onChanged(); } + if (!other.getLookback().isEmpty()) { + lookback_ = other.lookback_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2552,6 +2626,82 @@ public Builder setTimeBytes( onChanged(); return this; } + + private java.lang.Object lookback_ = ""; + /** + * string lookback = 3; + * @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; + } + } + /** + * string lookback = 3; + * @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; + } + } + /** + * string lookback = 3; + * @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; + } + /** + * string lookback = 3; + * @return This builder for chaining. + */ + public Builder clearLookback() { + + lookback_ = getDefaultInstance().getLookback(); + onChanged(); + return this; + } + /** + * string lookback = 3; + * @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 public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2656,6 +2806,18 @@ public interface PromRangeQueryOrBuilder extends */ com.google.protobuf.ByteString getStepBytes(); + + /** + * string lookback = 5; + * @return The lookback. + */ + java.lang.String getLookback(); + /** + * string lookback = 5; + * @return The bytes for lookback. + */ + com.google.protobuf.ByteString + getLookbackBytes(); } /** * Protobuf type {@code greptime.v1.PromRangeQuery} @@ -2674,6 +2836,7 @@ private PromRangeQuery() { start_ = ""; end_ = ""; step_ = ""; + lookback_ = ""; } @java.lang.Override @@ -2730,6 +2893,12 @@ private PromRangeQuery( step_ = s; break; } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + lookback_ = s; + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -2916,6 +3085,44 @@ public java.lang.String getStep() { } } + public static final int LOOKBACK_FIELD_NUMBER = 5; + private volatile java.lang.Object lookback_; + /** + * string lookback = 5; + * @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; + } + } + /** + * string lookback = 5; + * @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; @java.lang.Override public final boolean isInitialized() { @@ -2942,6 +3149,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(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); } @@ -2963,6 +3173,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(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(); memoizedSize = size; return size; @@ -2986,6 +3199,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getEnd())) return false; if (!getStep() .equals(other.getStep())) return false; + if (!getLookback() + .equals(other.getLookback())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -3005,6 +3220,8 @@ public int hashCode() { hash = (53 * hash) + getEnd().hashCode(); hash = (37 * hash) + STEP_FIELD_NUMBER; hash = (53 * hash) + getStep().hashCode(); + hash = (37 * hash) + LOOKBACK_FIELD_NUMBER; + hash = (53 * hash) + getLookback().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -3146,6 +3363,8 @@ public Builder clear() { step_ = ""; + lookback_ = ""; + return this; } @@ -3176,6 +3395,7 @@ public io.greptime.v1.Prometheus.PromRangeQuery buildPartial() { result.start_ = start_; result.end_ = end_; result.step_ = step_; + result.lookback_ = lookback_; onBuilt(); return result; } @@ -3240,6 +3460,10 @@ public Builder mergeFrom(io.greptime.v1.Prometheus.PromRangeQuery other) { step_ = other.step_; onChanged(); } + if (!other.getLookback().isEmpty()) { + lookback_ = other.lookback_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3572,6 +3796,82 @@ public Builder setStepBytes( onChanged(); return this; } + + private java.lang.Object lookback_ = ""; + /** + * string lookback = 5; + * @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; + } + } + /** + * string lookback = 5; + * @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; + } + } + /** + * string lookback = 5; + * @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; + } + /** + * string lookback = 5; + * @return This builder for chaining. + */ + public Builder clearLookback() { + + lookback_ = getDefaultInstance().getLookback(); + onChanged(); + return this; + } + /** + * string lookback = 5; + * @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 public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -3662,14 +3962,15 @@ public io.greptime.v1.Prometheus.PromRangeQuery getDefaultInstanceForType() { "(\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" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -3693,13 +3994,13 @@ public io.greptime.v1.Prometheus.PromRangeQuery getDefaultInstanceForType() { internal_static_greptime_v1_PromInstantQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 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 = getDescriptor().getMessageTypes().get(3); internal_static_greptime_v1_PromRangeQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 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(); } diff --git a/proto/greptime/v1/prom.proto b/proto/greptime/v1/prom.proto index 14599c56..5cd493fa 100644 --- a/proto/greptime/v1/prom.proto +++ b/proto/greptime/v1/prom.proto @@ -43,6 +43,7 @@ message PromqlResponse { message PromInstantQuery { string query = 1; string time = 2; + string lookback = 3; } message PromRangeQuery { @@ -50,4 +51,5 @@ message PromRangeQuery { string start = 2; string end = 3; string step = 4; + string lookback = 5; }