mirror of https://github.com/grafana/loki
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.
1227 lines
30 KiB
1227 lines
30 KiB
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: pkg/dataobj/compaction/v2/proto/compactionv2.proto
|
|
|
|
package proto
|
|
|
|
import (
|
|
fmt "fmt"
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
reflect "reflect"
|
|
strings "strings"
|
|
)
|
|
|
|
// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// SectionRef identifies one section in object storage with its sort-key bounds.
|
|
//
|
|
// The section's sort-key is the tuple (sort_schema_label_values, __timestamp__)
|
|
// per the tenant's sort_schema. To order sections correctly without imposing
|
|
// encoding contracts on the caller, the proto splits this tuple across two
|
|
// field categories:
|
|
//
|
|
// - min_key / max_key carry the sort_schema LABEL columns only, in schema
|
|
// order. Each element is one column value. - min_timestamp / max_timestamp
|
|
// carry the __timestamp__ column as a typed int64 (nanoseconds since epoch).
|
|
// Storing as int64 -- rather than as a trailing string element of
|
|
// min_key/max_key -- avoids lexicographic sorting problems that can arise
|
|
// from comparing timestamps as strings.
|
|
//
|
|
// The composite sort key compared across sections is (min_key, min_timestamp)
|
|
// and (max_key, max_timestamp) -- label tuple first, then timestamp.
|
|
type SectionRef struct {
|
|
ObjectPath string `protobuf:"bytes,1,opt,name=object_path,json=objectPath,proto3" json:"object_path"`
|
|
SectionIndex int32 `protobuf:"varint,2,opt,name=section_index,json=sectionIndex,proto3" json:"section_index"`
|
|
MinKey []string `protobuf:"bytes,3,rep,name=min_key,json=minKey,proto3" json:"min_key"`
|
|
MaxKey []string `protobuf:"bytes,4,rep,name=max_key,json=maxKey,proto3" json:"max_key"`
|
|
MinTimestamp int64 `protobuf:"varint,5,opt,name=min_timestamp,json=minTimestamp,proto3" json:"min_timestamp"`
|
|
MaxTimestamp int64 `protobuf:"varint,6,opt,name=max_timestamp,json=maxTimestamp,proto3" json:"max_timestamp"`
|
|
}
|
|
|
|
func (m *SectionRef) Reset() { *m = SectionRef{} }
|
|
func (*SectionRef) ProtoMessage() {}
|
|
func (*SectionRef) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f32d9e22d0d4ec3, []int{0}
|
|
}
|
|
func (m *SectionRef) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *SectionRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_SectionRef.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *SectionRef) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SectionRef.Merge(m, src)
|
|
}
|
|
func (m *SectionRef) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *SectionRef) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SectionRef.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SectionRef proto.InternalMessageInfo
|
|
|
|
func (m *SectionRef) GetObjectPath() string {
|
|
if m != nil {
|
|
return m.ObjectPath
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *SectionRef) GetSectionIndex() int32 {
|
|
if m != nil {
|
|
return m.SectionIndex
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SectionRef) GetMinKey() []string {
|
|
if m != nil {
|
|
return m.MinKey
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SectionRef) GetMaxKey() []string {
|
|
if m != nil {
|
|
return m.MaxKey
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SectionRef) GetMinTimestamp() int64 {
|
|
if m != nil {
|
|
return m.MinTimestamp
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SectionRef) GetMaxTimestamp() int64 {
|
|
if m != nil {
|
|
return m.MaxTimestamp
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// RunRef is one pile: a sorted, non-overlapping section sequence.
|
|
type RunRef struct {
|
|
Sections []*SectionRef `protobuf:"bytes,1,rep,name=sections,proto3" json:"sections"`
|
|
}
|
|
|
|
func (m *RunRef) Reset() { *m = RunRef{} }
|
|
func (*RunRef) ProtoMessage() {}
|
|
func (*RunRef) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f32d9e22d0d4ec3, []int{1}
|
|
}
|
|
func (m *RunRef) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *RunRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_RunRef.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *RunRef) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RunRef.Merge(m, src)
|
|
}
|
|
func (m *RunRef) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *RunRef) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RunRef.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RunRef proto.InternalMessageInfo
|
|
|
|
func (m *RunRef) GetSections() []*SectionRef {
|
|
if m != nil {
|
|
return m.Sections
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// TaskSpec is one K-way merge task: K piles bundled together for one worker.
|
|
type TaskSpec struct {
|
|
Tenant string `protobuf:"bytes,1,opt,name=tenant,proto3" json:"tenant"`
|
|
Runs []*RunRef `protobuf:"bytes,2,rep,name=runs,proto3" json:"runs"`
|
|
}
|
|
|
|
func (m *TaskSpec) Reset() { *m = TaskSpec{} }
|
|
func (*TaskSpec) ProtoMessage() {}
|
|
func (*TaskSpec) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f32d9e22d0d4ec3, []int{2}
|
|
}
|
|
func (m *TaskSpec) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TaskSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TaskSpec.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *TaskSpec) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TaskSpec.Merge(m, src)
|
|
}
|
|
func (m *TaskSpec) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TaskSpec) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TaskSpec.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TaskSpec proto.InternalMessageInfo
|
|
|
|
func (m *TaskSpec) GetTenant() string {
|
|
if m != nil {
|
|
return m.Tenant
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *TaskSpec) GetRuns() []*RunRef {
|
|
if m != nil {
|
|
return m.Runs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*SectionRef)(nil), "proto.SectionRef")
|
|
proto.RegisterType((*RunRef)(nil), "proto.RunRef")
|
|
proto.RegisterType((*TaskSpec)(nil), "proto.TaskSpec")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("pkg/dataobj/compaction/v2/proto/compactionv2.proto", fileDescriptor_7f32d9e22d0d4ec3)
|
|
}
|
|
|
|
var fileDescriptor_7f32d9e22d0d4ec3 = []byte{
|
|
// 434 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xbf, 0x8e, 0xd3, 0x30,
|
|
0x18, 0x8f, 0xdb, 0x6b, 0xe8, 0xb9, 0xad, 0xd0, 0x45, 0x0c, 0x11, 0x83, 0x13, 0x55, 0x0c, 0x91,
|
|
0x90, 0x6a, 0xd4, 0x93, 0x6e, 0x80, 0x2d, 0x12, 0x03, 0x62, 0x41, 0xbe, 0x9b, 0x60, 0xa8, 0xdc,
|
|
0x9c, 0x2f, 0xf5, 0x15, 0xdb, 0x51, 0xe3, 0x56, 0xb9, 0x8d, 0x47, 0xe0, 0x31, 0x98, 0x79, 0x0a,
|
|
0xc6, 0x8e, 0x37, 0x45, 0x34, 0x5d, 0x50, 0xa6, 0x7b, 0x04, 0x54, 0x3b, 0x57, 0x72, 0x13, 0x4b,
|
|
0x3e, 0xff, 0xfe, 0xc9, 0x5f, 0x7e, 0x32, 0x9c, 0x66, 0xcb, 0x14, 0x5f, 0x53, 0x4d, 0xd5, 0xfc,
|
|
0x16, 0x27, 0x4a, 0x64, 0x34, 0xd1, 0x5c, 0x49, 0xbc, 0x99, 0xe2, 0x6c, 0xa5, 0xb4, 0x6a, 0x71,
|
|
0x9b, 0xe9, 0xc4, 0x50, 0x5e, 0xcf, 0x8c, 0x97, 0x2f, 0x52, 0x95, 0x2a, 0x6b, 0x3a, 0x9c, 0xac,
|
|
0x38, 0xfe, 0xd9, 0x81, 0xf0, 0x92, 0x99, 0x00, 0x61, 0x37, 0xde, 0x1b, 0x38, 0x50, 0xf3, 0x5b,
|
|
0x96, 0xe8, 0x59, 0x46, 0xf5, 0xc2, 0x07, 0x21, 0x88, 0x4e, 0xe3, 0xe7, 0x75, 0x19, 0xb4, 0x69,
|
|
0x02, 0x2d, 0xf8, 0x44, 0xf5, 0xc2, 0xbb, 0x80, 0xa3, 0xdc, 0xe6, 0x67, 0x5c, 0x5e, 0xb3, 0xc2,
|
|
0xef, 0x84, 0x20, 0xea, 0xc5, 0x67, 0x75, 0x19, 0x3c, 0x15, 0xc8, 0xb0, 0x81, 0x1f, 0x0e, 0xc8,
|
|
0x7b, 0x05, 0x9f, 0x09, 0x2e, 0x67, 0x4b, 0x76, 0xe7, 0x77, 0xc3, 0x6e, 0x74, 0x1a, 0x0f, 0xea,
|
|
0x32, 0x78, 0xa4, 0x88, 0x2b, 0xb8, 0xfc, 0xc8, 0xee, 0x8c, 0x8b, 0x16, 0xc6, 0x75, 0xd2, 0x72,
|
|
0x59, 0x8a, 0xb8, 0x82, 0x16, 0x07, 0xd7, 0x05, 0x1c, 0x1d, 0x82, 0x9a, 0x0b, 0x96, 0x6b, 0x2a,
|
|
0x32, 0xbf, 0x17, 0x82, 0xa8, 0x6b, 0x77, 0x78, 0x22, 0x90, 0xa1, 0xe0, 0xf2, 0xea, 0x11, 0x99,
|
|
0x1c, 0x2d, 0x5a, 0x39, 0xb7, 0x95, 0x6b, 0x0b, 0x64, 0x28, 0x68, 0x71, 0xcc, 0x8d, 0xdf, 0x43,
|
|
0x97, 0xac, 0x4d, 0x5f, 0xef, 0x60, 0xbf, 0xf9, 0xab, 0xdc, 0x07, 0x61, 0x37, 0x1a, 0x4c, 0xcf,
|
|
0x6c, 0xb1, 0x93, 0x7f, 0xa5, 0xc6, 0xc3, 0xba, 0x0c, 0x8e, 0x36, 0x72, 0x3c, 0x8d, 0xbf, 0xc0,
|
|
0xfe, 0x15, 0xcd, 0x97, 0x97, 0x19, 0x4b, 0xbc, 0x31, 0x74, 0x35, 0x93, 0x54, 0xea, 0xa6, 0x73,
|
|
0x58, 0x97, 0x41, 0xc3, 0x90, 0x66, 0x7a, 0xaf, 0xe1, 0xc9, 0x6a, 0x2d, 0x73, 0xbf, 0x63, 0x2e,
|
|
0x1a, 0x35, 0x17, 0xd9, 0x4d, 0xe2, 0x7e, 0x5d, 0x06, 0x46, 0x26, 0xe6, 0x1b, 0x67, 0xdb, 0x1d,
|
|
0x72, 0xee, 0x77, 0xc8, 0x79, 0xd8, 0x21, 0xf0, 0xad, 0x42, 0xe0, 0x47, 0x85, 0xc0, 0xaf, 0x0a,
|
|
0x81, 0x6d, 0x85, 0xc0, 0xef, 0x0a, 0x81, 0x3f, 0x15, 0x72, 0x1e, 0x2a, 0x04, 0xbe, 0xef, 0x91,
|
|
0xb3, 0xdd, 0x23, 0xe7, 0x7e, 0x8f, 0x9c, 0xcf, 0x6f, 0x53, 0xae, 0x17, 0xeb, 0xf9, 0x24, 0x51,
|
|
0x02, 0xa7, 0x2b, 0x7a, 0x43, 0x25, 0xc5, 0x5f, 0xd5, 0x92, 0xe3, 0xcd, 0x39, 0xfe, 0xcf, 0xd3,
|
|
0x9b, 0xbb, 0x66, 0x9c, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x10, 0x51, 0xa1, 0xa4, 0x02,
|
|
0x00, 0x00,
|
|
}
|
|
|
|
func (this *SectionRef) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*SectionRef)
|
|
if !ok {
|
|
that2, ok := that.(SectionRef)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.ObjectPath != that1.ObjectPath {
|
|
return false
|
|
}
|
|
if this.SectionIndex != that1.SectionIndex {
|
|
return false
|
|
}
|
|
if len(this.MinKey) != len(that1.MinKey) {
|
|
return false
|
|
}
|
|
for i := range this.MinKey {
|
|
if this.MinKey[i] != that1.MinKey[i] {
|
|
return false
|
|
}
|
|
}
|
|
if len(this.MaxKey) != len(that1.MaxKey) {
|
|
return false
|
|
}
|
|
for i := range this.MaxKey {
|
|
if this.MaxKey[i] != that1.MaxKey[i] {
|
|
return false
|
|
}
|
|
}
|
|
if this.MinTimestamp != that1.MinTimestamp {
|
|
return false
|
|
}
|
|
if this.MaxTimestamp != that1.MaxTimestamp {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *RunRef) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*RunRef)
|
|
if !ok {
|
|
that2, ok := that.(RunRef)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if len(this.Sections) != len(that1.Sections) {
|
|
return false
|
|
}
|
|
for i := range this.Sections {
|
|
if !this.Sections[i].Equal(that1.Sections[i]) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
func (this *TaskSpec) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*TaskSpec)
|
|
if !ok {
|
|
that2, ok := that.(TaskSpec)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.Tenant != that1.Tenant {
|
|
return false
|
|
}
|
|
if len(this.Runs) != len(that1.Runs) {
|
|
return false
|
|
}
|
|
for i := range this.Runs {
|
|
if !this.Runs[i].Equal(that1.Runs[i]) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
func (this *SectionRef) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 10)
|
|
s = append(s, "&proto.SectionRef{")
|
|
s = append(s, "ObjectPath: "+fmt.Sprintf("%#v", this.ObjectPath)+",\n")
|
|
s = append(s, "SectionIndex: "+fmt.Sprintf("%#v", this.SectionIndex)+",\n")
|
|
s = append(s, "MinKey: "+fmt.Sprintf("%#v", this.MinKey)+",\n")
|
|
s = append(s, "MaxKey: "+fmt.Sprintf("%#v", this.MaxKey)+",\n")
|
|
s = append(s, "MinTimestamp: "+fmt.Sprintf("%#v", this.MinTimestamp)+",\n")
|
|
s = append(s, "MaxTimestamp: "+fmt.Sprintf("%#v", this.MaxTimestamp)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RunRef) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&proto.RunRef{")
|
|
if this.Sections != nil {
|
|
s = append(s, "Sections: "+fmt.Sprintf("%#v", this.Sections)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *TaskSpec) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 6)
|
|
s = append(s, "&proto.TaskSpec{")
|
|
s = append(s, "Tenant: "+fmt.Sprintf("%#v", this.Tenant)+",\n")
|
|
if this.Runs != nil {
|
|
s = append(s, "Runs: "+fmt.Sprintf("%#v", this.Runs)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func valueToGoStringCompactionv2(v interface{}, typ string) string {
|
|
rv := reflect.ValueOf(v)
|
|
if rv.IsNil() {
|
|
return "nil"
|
|
}
|
|
pv := reflect.Indirect(rv).Interface()
|
|
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
|
}
|
|
func (m *SectionRef) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *SectionRef) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *SectionRef) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.MaxTimestamp != 0 {
|
|
i = encodeVarintCompactionv2(dAtA, i, uint64(m.MaxTimestamp))
|
|
i--
|
|
dAtA[i] = 0x30
|
|
}
|
|
if m.MinTimestamp != 0 {
|
|
i = encodeVarintCompactionv2(dAtA, i, uint64(m.MinTimestamp))
|
|
i--
|
|
dAtA[i] = 0x28
|
|
}
|
|
if len(m.MaxKey) > 0 {
|
|
for iNdEx := len(m.MaxKey) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.MaxKey[iNdEx])
|
|
copy(dAtA[i:], m.MaxKey[iNdEx])
|
|
i = encodeVarintCompactionv2(dAtA, i, uint64(len(m.MaxKey[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
}
|
|
if len(m.MinKey) > 0 {
|
|
for iNdEx := len(m.MinKey) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.MinKey[iNdEx])
|
|
copy(dAtA[i:], m.MinKey[iNdEx])
|
|
i = encodeVarintCompactionv2(dAtA, i, uint64(len(m.MinKey[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
}
|
|
if m.SectionIndex != 0 {
|
|
i = encodeVarintCompactionv2(dAtA, i, uint64(m.SectionIndex))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if len(m.ObjectPath) > 0 {
|
|
i -= len(m.ObjectPath)
|
|
copy(dAtA[i:], m.ObjectPath)
|
|
i = encodeVarintCompactionv2(dAtA, i, uint64(len(m.ObjectPath)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *RunRef) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *RunRef) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *RunRef) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Sections) > 0 {
|
|
for iNdEx := len(m.Sections) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Sections[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintCompactionv2(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *TaskSpec) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *TaskSpec) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TaskSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Runs) > 0 {
|
|
for iNdEx := len(m.Runs) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Runs[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintCompactionv2(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
}
|
|
if len(m.Tenant) > 0 {
|
|
i -= len(m.Tenant)
|
|
copy(dAtA[i:], m.Tenant)
|
|
i = encodeVarintCompactionv2(dAtA, i, uint64(len(m.Tenant)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintCompactionv2(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovCompactionv2(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *SectionRef) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.ObjectPath)
|
|
if l > 0 {
|
|
n += 1 + l + sovCompactionv2(uint64(l))
|
|
}
|
|
if m.SectionIndex != 0 {
|
|
n += 1 + sovCompactionv2(uint64(m.SectionIndex))
|
|
}
|
|
if len(m.MinKey) > 0 {
|
|
for _, s := range m.MinKey {
|
|
l = len(s)
|
|
n += 1 + l + sovCompactionv2(uint64(l))
|
|
}
|
|
}
|
|
if len(m.MaxKey) > 0 {
|
|
for _, s := range m.MaxKey {
|
|
l = len(s)
|
|
n += 1 + l + sovCompactionv2(uint64(l))
|
|
}
|
|
}
|
|
if m.MinTimestamp != 0 {
|
|
n += 1 + sovCompactionv2(uint64(m.MinTimestamp))
|
|
}
|
|
if m.MaxTimestamp != 0 {
|
|
n += 1 + sovCompactionv2(uint64(m.MaxTimestamp))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RunRef) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Sections) > 0 {
|
|
for _, e := range m.Sections {
|
|
l = e.Size()
|
|
n += 1 + l + sovCompactionv2(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *TaskSpec) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Tenant)
|
|
if l > 0 {
|
|
n += 1 + l + sovCompactionv2(uint64(l))
|
|
}
|
|
if len(m.Runs) > 0 {
|
|
for _, e := range m.Runs {
|
|
l = e.Size()
|
|
n += 1 + l + sovCompactionv2(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovCompactionv2(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozCompactionv2(x uint64) (n int) {
|
|
return sovCompactionv2(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (this *SectionRef) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&SectionRef{`,
|
|
`ObjectPath:` + fmt.Sprintf("%v", this.ObjectPath) + `,`,
|
|
`SectionIndex:` + fmt.Sprintf("%v", this.SectionIndex) + `,`,
|
|
`MinKey:` + fmt.Sprintf("%v", this.MinKey) + `,`,
|
|
`MaxKey:` + fmt.Sprintf("%v", this.MaxKey) + `,`,
|
|
`MinTimestamp:` + fmt.Sprintf("%v", this.MinTimestamp) + `,`,
|
|
`MaxTimestamp:` + fmt.Sprintf("%v", this.MaxTimestamp) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RunRef) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
repeatedStringForSections := "[]*SectionRef{"
|
|
for _, f := range this.Sections {
|
|
repeatedStringForSections += strings.Replace(f.String(), "SectionRef", "SectionRef", 1) + ","
|
|
}
|
|
repeatedStringForSections += "}"
|
|
s := strings.Join([]string{`&RunRef{`,
|
|
`Sections:` + repeatedStringForSections + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *TaskSpec) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
repeatedStringForRuns := "[]*RunRef{"
|
|
for _, f := range this.Runs {
|
|
repeatedStringForRuns += strings.Replace(f.String(), "RunRef", "RunRef", 1) + ","
|
|
}
|
|
repeatedStringForRuns += "}"
|
|
s := strings.Join([]string{`&TaskSpec{`,
|
|
`Tenant:` + fmt.Sprintf("%v", this.Tenant) + `,`,
|
|
`Runs:` + repeatedStringForRuns + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func valueToStringCompactionv2(v interface{}) string {
|
|
rv := reflect.ValueOf(v)
|
|
if rv.IsNil() {
|
|
return "nil"
|
|
}
|
|
pv := reflect.Indirect(rv).Interface()
|
|
return fmt.Sprintf("*%v", pv)
|
|
}
|
|
func (m *SectionRef) 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 ErrIntOverflowCompactionv2
|
|
}
|
|
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: SectionRef: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: SectionRef: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ObjectPath", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCompactionv2
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ObjectPath = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SectionIndex", wireType)
|
|
}
|
|
m.SectionIndex = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCompactionv2
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.SectionIndex |= int32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MinKey", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCompactionv2
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.MinKey = append(m.MinKey, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxKey", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCompactionv2
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.MaxKey = append(m.MaxKey, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MinTimestamp", wireType)
|
|
}
|
|
m.MinTimestamp = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCompactionv2
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.MinTimestamp |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 6:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxTimestamp", wireType)
|
|
}
|
|
m.MaxTimestamp = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCompactionv2
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.MaxTimestamp |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipCompactionv2(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RunRef) 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 ErrIntOverflowCompactionv2
|
|
}
|
|
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: RunRef: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RunRef: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Sections", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCompactionv2
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Sections = append(m.Sections, &SectionRef{})
|
|
if err := m.Sections[len(m.Sections)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipCompactionv2(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *TaskSpec) 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 ErrIntOverflowCompactionv2
|
|
}
|
|
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: TaskSpec: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: TaskSpec: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Tenant", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCompactionv2
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Tenant = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Runs", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowCompactionv2
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Runs = append(m.Runs, &RunRef{})
|
|
if err := m.Runs[len(m.Runs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipCompactionv2(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthCompactionv2
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipCompactionv2(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, ErrIntOverflowCompactionv2
|
|
}
|
|
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, ErrIntOverflowCompactionv2
|
|
}
|
|
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, ErrIntOverflowCompactionv2
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthCompactionv2
|
|
}
|
|
iNdEx += length
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthCompactionv2
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowCompactionv2
|
|
}
|
|
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 := skipCompactionv2(dAtA[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthCompactionv2
|
|
}
|
|
}
|
|
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 (
|
|
ErrInvalidLengthCompactionv2 = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowCompactionv2 = fmt.Errorf("proto: integer overflow")
|
|
)
|
|
|