mirror of https://github.com/prometheus/prometheus
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1031 lines
23 KiB
1031 lines
23 KiB
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: remote.proto
|
|
|
|
/*
|
|
Package prompb is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
remote.proto
|
|
rpc.proto
|
|
types.proto
|
|
|
|
It has these top-level messages:
|
|
WriteRequest
|
|
ReadRequest
|
|
ReadResponse
|
|
Query
|
|
QueryResult
|
|
TSDBSnapshotRequest
|
|
TSDBSnapshotResponse
|
|
TSDBCleanTombstonesRequest
|
|
TSDBCleanTombstonesResponse
|
|
SeriesDeleteRequest
|
|
SeriesDeleteResponse
|
|
Sample
|
|
TimeSeries
|
|
Label
|
|
Labels
|
|
LabelMatcher
|
|
ReadHints
|
|
*/
|
|
package prompb
|
|
|
|
import proto "github.com/gogo/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
import io "io"
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type WriteRequest struct {
|
|
Timeseries []*TimeSeries `protobuf:"bytes,1,rep,name=timeseries" json:"timeseries,omitempty"`
|
|
}
|
|
|
|
func (m *WriteRequest) Reset() { *m = WriteRequest{} }
|
|
func (m *WriteRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*WriteRequest) ProtoMessage() {}
|
|
func (*WriteRequest) Descriptor() ([]byte, []int) { return fileDescriptorRemote, []int{0} }
|
|
|
|
func (m *WriteRequest) GetTimeseries() []*TimeSeries {
|
|
if m != nil {
|
|
return m.Timeseries
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ReadRequest struct {
|
|
Queries []*Query `protobuf:"bytes,1,rep,name=queries" json:"queries,omitempty"`
|
|
}
|
|
|
|
func (m *ReadRequest) Reset() { *m = ReadRequest{} }
|
|
func (m *ReadRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ReadRequest) ProtoMessage() {}
|
|
func (*ReadRequest) Descriptor() ([]byte, []int) { return fileDescriptorRemote, []int{1} }
|
|
|
|
func (m *ReadRequest) GetQueries() []*Query {
|
|
if m != nil {
|
|
return m.Queries
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ReadResponse struct {
|
|
// In same order as the request's queries.
|
|
Results []*QueryResult `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
|
|
}
|
|
|
|
func (m *ReadResponse) Reset() { *m = ReadResponse{} }
|
|
func (m *ReadResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*ReadResponse) ProtoMessage() {}
|
|
func (*ReadResponse) Descriptor() ([]byte, []int) { return fileDescriptorRemote, []int{2} }
|
|
|
|
func (m *ReadResponse) GetResults() []*QueryResult {
|
|
if m != nil {
|
|
return m.Results
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Query struct {
|
|
StartTimestampMs int64 `protobuf:"varint,1,opt,name=start_timestamp_ms,json=startTimestampMs,proto3" json:"start_timestamp_ms,omitempty"`
|
|
EndTimestampMs int64 `protobuf:"varint,2,opt,name=end_timestamp_ms,json=endTimestampMs,proto3" json:"end_timestamp_ms,omitempty"`
|
|
Matchers []*LabelMatcher `protobuf:"bytes,3,rep,name=matchers" json:"matchers,omitempty"`
|
|
Hints *ReadHints `protobuf:"bytes,4,opt,name=hints" json:"hints,omitempty"`
|
|
}
|
|
|
|
func (m *Query) Reset() { *m = Query{} }
|
|
func (m *Query) String() string { return proto.CompactTextString(m) }
|
|
func (*Query) ProtoMessage() {}
|
|
func (*Query) Descriptor() ([]byte, []int) { return fileDescriptorRemote, []int{3} }
|
|
|
|
func (m *Query) GetStartTimestampMs() int64 {
|
|
if m != nil {
|
|
return m.StartTimestampMs
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Query) GetEndTimestampMs() int64 {
|
|
if m != nil {
|
|
return m.EndTimestampMs
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Query) GetMatchers() []*LabelMatcher {
|
|
if m != nil {
|
|
return m.Matchers
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Query) GetHints() *ReadHints {
|
|
if m != nil {
|
|
return m.Hints
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type QueryResult struct {
|
|
// Samples within a time series must be ordered by time.
|
|
Timeseries []*TimeSeries `protobuf:"bytes,1,rep,name=timeseries" json:"timeseries,omitempty"`
|
|
}
|
|
|
|
func (m *QueryResult) Reset() { *m = QueryResult{} }
|
|
func (m *QueryResult) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryResult) ProtoMessage() {}
|
|
func (*QueryResult) Descriptor() ([]byte, []int) { return fileDescriptorRemote, []int{4} }
|
|
|
|
func (m *QueryResult) GetTimeseries() []*TimeSeries {
|
|
if m != nil {
|
|
return m.Timeseries
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*WriteRequest)(nil), "prometheus.WriteRequest")
|
|
proto.RegisterType((*ReadRequest)(nil), "prometheus.ReadRequest")
|
|
proto.RegisterType((*ReadResponse)(nil), "prometheus.ReadResponse")
|
|
proto.RegisterType((*Query)(nil), "prometheus.Query")
|
|
proto.RegisterType((*QueryResult)(nil), "prometheus.QueryResult")
|
|
}
|
|
func (m *WriteRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *WriteRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Timeseries) > 0 {
|
|
for _, msg := range m.Timeseries {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintRemote(dAtA, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ReadRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ReadRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Queries) > 0 {
|
|
for _, msg := range m.Queries {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintRemote(dAtA, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *ReadResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ReadResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Results) > 0 {
|
|
for _, msg := range m.Results {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintRemote(dAtA, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *Query) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Query) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.StartTimestampMs != 0 {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
i = encodeVarintRemote(dAtA, i, uint64(m.StartTimestampMs))
|
|
}
|
|
if m.EndTimestampMs != 0 {
|
|
dAtA[i] = 0x10
|
|
i++
|
|
i = encodeVarintRemote(dAtA, i, uint64(m.EndTimestampMs))
|
|
}
|
|
if len(m.Matchers) > 0 {
|
|
for _, msg := range m.Matchers {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintRemote(dAtA, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
if m.Hints != nil {
|
|
dAtA[i] = 0x22
|
|
i++
|
|
i = encodeVarintRemote(dAtA, i, uint64(m.Hints.Size()))
|
|
n1, err := m.Hints.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n1
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *QueryResult) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QueryResult) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Timeseries) > 0 {
|
|
for _, msg := range m.Timeseries {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintRemote(dAtA, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func encodeVarintRemote(dAtA []byte, offset int, v uint64) int {
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return offset + 1
|
|
}
|
|
func (m *WriteRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Timeseries) > 0 {
|
|
for _, e := range m.Timeseries {
|
|
l = e.Size()
|
|
n += 1 + l + sovRemote(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ReadRequest) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Queries) > 0 {
|
|
for _, e := range m.Queries {
|
|
l = e.Size()
|
|
n += 1 + l + sovRemote(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ReadResponse) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Results) > 0 {
|
|
for _, e := range m.Results {
|
|
l = e.Size()
|
|
n += 1 + l + sovRemote(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Query) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.StartTimestampMs != 0 {
|
|
n += 1 + sovRemote(uint64(m.StartTimestampMs))
|
|
}
|
|
if m.EndTimestampMs != 0 {
|
|
n += 1 + sovRemote(uint64(m.EndTimestampMs))
|
|
}
|
|
if len(m.Matchers) > 0 {
|
|
for _, e := range m.Matchers {
|
|
l = e.Size()
|
|
n += 1 + l + sovRemote(uint64(l))
|
|
}
|
|
}
|
|
if m.Hints != nil {
|
|
l = m.Hints.Size()
|
|
n += 1 + l + sovRemote(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryResult) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if len(m.Timeseries) > 0 {
|
|
for _, e := range m.Timeseries {
|
|
l = e.Size()
|
|
n += 1 + l + sovRemote(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovRemote(x uint64) (n int) {
|
|
for {
|
|
n++
|
|
x >>= 7
|
|
if x == 0 {
|
|
break
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
func sozRemote(x uint64) (n int) {
|
|
return sovRemote(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *WriteRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: WriteRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: WriteRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRemote
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Timeseries = append(m.Timeseries, &TimeSeries{})
|
|
if err := m.Timeseries[len(m.Timeseries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRemote(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRemote
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ReadRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ReadRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ReadRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRemote
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Queries = append(m.Queries, &Query{})
|
|
if err := m.Queries[len(m.Queries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRemote(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRemote
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ReadResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ReadResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ReadResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRemote
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Results = append(m.Results, &QueryResult{})
|
|
if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRemote(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRemote
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Query) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Query: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Query: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field StartTimestampMs", wireType)
|
|
}
|
|
m.StartTimestampMs = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.StartTimestampMs |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field EndTimestampMs", wireType)
|
|
}
|
|
m.EndTimestampMs = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.EndTimestampMs |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Matchers", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRemote
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Matchers = append(m.Matchers, &LabelMatcher{})
|
|
if err := m.Matchers[len(m.Matchers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Hints", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRemote
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Hints == nil {
|
|
m.Hints = &ReadHints{}
|
|
}
|
|
if err := m.Hints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRemote(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRemote
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QueryResult) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QueryResult: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryResult: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRemote
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Timeseries = append(m.Timeseries, &TimeSeries{})
|
|
if err := m.Timeseries[len(m.Timeseries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRemote(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRemote
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipRemote(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 1:
|
|
iNdEx += 8
|
|
return iNdEx, nil
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
iNdEx += length
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthRemote
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRemote
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
innerWire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
innerWireType := int(innerWire & 0x7)
|
|
if innerWireType == 4 {
|
|
break
|
|
}
|
|
next, err := skipRemote(dAtA[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
}
|
|
return iNdEx, nil
|
|
case 4:
|
|
return iNdEx, nil
|
|
case 5:
|
|
iNdEx += 4
|
|
return iNdEx, nil
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthRemote = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowRemote = fmt.Errorf("proto: integer overflow")
|
|
)
|
|
|
|
func init() { proto.RegisterFile("remote.proto", fileDescriptorRemote) }
|
|
|
|
var fileDescriptorRemote = []byte{
|
|
// 308 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0x4f, 0x4b, 0xf3, 0x40,
|
|
0x10, 0xc6, 0xd9, 0xb7, 0x6f, 0x5b, 0x99, 0x14, 0xa9, 0x8b, 0x7f, 0x82, 0x87, 0x52, 0x72, 0x0a,
|
|
0x54, 0x0a, 0x56, 0xf1, 0xe0, 0x4d, 0x41, 0xf1, 0x60, 0x0f, 0xae, 0x05, 0xc1, 0x4b, 0x49, 0xed,
|
|
0x40, 0x03, 0xdd, 0x64, 0xbb, 0x33, 0x39, 0xf4, 0xeb, 0x79, 0xf2, 0xe8, 0x47, 0x90, 0x7c, 0x12,
|
|
0xc9, 0x86, 0xe8, 0x8a, 0x37, 0xcf, 0xbf, 0xdf, 0xf3, 0xf0, 0x0c, 0x03, 0x3d, 0x8b, 0x3a, 0x67,
|
|
0x1c, 0x1b, 0x9b, 0x73, 0x2e, 0xc1, 0xd8, 0x5c, 0x23, 0xaf, 0xb0, 0xa0, 0xe3, 0x80, 0xb7, 0x06,
|
|
0xa9, 0x06, 0xd1, 0x2d, 0xf4, 0x9e, 0x6c, 0xca, 0xa8, 0x70, 0x53, 0x20, 0xb1, 0xbc, 0x00, 0xe0,
|
|
0x54, 0x23, 0xa1, 0x4d, 0x91, 0x42, 0x31, 0x6c, 0xc5, 0xc1, 0xe4, 0x70, 0xfc, 0x9d, 0x1e, 0xcf,
|
|
0x52, 0x8d, 0x8f, 0x8e, 0x2a, 0xcf, 0x8c, 0x2e, 0x21, 0x50, 0x98, 0x2c, 0x9b, 0x9a, 0x11, 0x74,
|
|
0x37, 0x85, 0xdf, 0xb1, 0xe7, 0x77, 0x3c, 0x14, 0x68, 0xb7, 0xaa, 0x31, 0xa2, 0x2b, 0xe8, 0xd5,
|
|
0x59, 0x32, 0x79, 0x46, 0x28, 0x4f, 0xa1, 0x6b, 0x91, 0x8a, 0x35, 0x37, 0xe1, 0xa3, 0xdf, 0x61,
|
|
0xc7, 0x55, 0xe3, 0x45, 0xaf, 0x02, 0xda, 0x0e, 0xc8, 0x13, 0x90, 0xc4, 0x89, 0xe5, 0xb9, 0x1b,
|
|
0xc7, 0x89, 0x36, 0x73, 0x5d, 0xf5, 0x88, 0xb8, 0xa5, 0xfa, 0x8e, 0xcc, 0x1a, 0x30, 0x25, 0x19,
|
|
0x43, 0x1f, 0xb3, 0xe5, 0x4f, 0xf7, 0x9f, 0x73, 0x77, 0x31, 0x5b, 0xfa, 0xe6, 0x39, 0xec, 0xe8,
|
|
0x84, 0x5f, 0x56, 0x68, 0x29, 0x6c, 0xb9, 0x55, 0xa1, 0xbf, 0xea, 0x3e, 0x59, 0xe0, 0x7a, 0x5a,
|
|
0x0b, 0xea, 0xcb, 0x94, 0x23, 0x68, 0xaf, 0xd2, 0x8c, 0x29, 0xfc, 0x3f, 0x14, 0x71, 0x30, 0x39,
|
|
0xf0, 0x23, 0xd5, 0xcd, 0x77, 0x15, 0x54, 0xb5, 0x13, 0xdd, 0x40, 0xe0, 0x1d, 0xf7, 0xd7, 0x57,
|
|
0x5c, 0xef, 0xbf, 0x95, 0x03, 0xf1, 0x5e, 0x0e, 0xc4, 0x47, 0x39, 0x10, 0xcf, 0x9d, 0x2a, 0x60,
|
|
0x16, 0x8b, 0x8e, 0xfb, 0xf7, 0xd9, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x81, 0x1e, 0xc0, 0x24,
|
|
0x18, 0x02, 0x00, 0x00,
|
|
}
|