diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 12ed82dc28..1439a6aaa0 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -54,28 +54,26 @@ env: # Buildkite pipeline is currently broken, and we are working on fixing it. In the meantime, we are temporarily # disabling steps until it is fixed. ISSUE: https://github.com/m3db/m3/issues/4274 steps: -# - name: "Codegen" -# env: -# CGO_ENABLED: 0 -# GIMME_GO_VERSION: 1.22.x -# plugins: -# gopath-checkout#v1.0.1: -# import: github.com/m3db/m3 -# docker#v3.0.1: -# image: us-west1-docker.pkg.dev/ci-compute/buildkite-images/buildkite-dind:v1 -# volumes: -# - .:/go/src/github.com/m3db/m3 -# - /var/run/docker.sock:/var/run/docker.sock -# kubernetes: -# <<: *kubernetes -# podSpec: -# <<: *podSpec -# containers: -# - <<: *commandContainer -# command: -# - |- -# make clean install-vendor-m3 test-all-gen -# <<: *common + - name: "Codegen" + env: + CGO_ENABLED: 0 + GIMME_GO_VERSION: 1.22.x + plugins: + docker-compose#v2.5.1: + run: app + workdir: /go/src/github.com/m3db/m3 + gopath-checkout#v1.0.1: + import: github.com/m3db/m3 + kubernetes: + <<: *kubernetes + podSpec: + <<: *podSpec + containers: + - <<: *commandContainer + command: + - |- + make clean install-vendor-m3 test-all-gen + <<: *common - name: "Unit %n" parallelism: 4 plugins: diff --git a/Dockerfile b/Dockerfile index 98b67e1b25..2b7507a497 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,8 @@ FROM golang:1.22-bullseye -RUN apt-get update && apt-get install -y lsof netcat-openbsd docker.io jq +RUN apt-get update && apt-get install -y lsof netcat-openbsd docker.io jq protobuf-compiler thrift-compiler + +RUN go install github.com/gogo/protobuf/protoc-gen-gogofaster@latest + +ENV GOBIN=/go/bin +ENV PATH=$PATH:/go/bin \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 26a76cdbe5..c2a3bfaae6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: # Support running docker within docker. That is, buildkite jobs themselves run in a container; that container # needs to be able to spin up functioning docker containers. - /var/run/docker.sock:/var/run/docker.sock + working_dir: /go/src/github.com/m3db/m3 extra_hosts: # Allow routing from the buildkite container to the host machine, as host.docker.internal. This allows us to do # the following: diff --git a/go.mod b/go.mod index ed10b1a75f..3bb7440c2e 100644 --- a/go.mod +++ b/go.mod @@ -92,6 +92,7 @@ require ( ) require ( + github.com/apache/thrift v0.13.0 github.com/twmb/murmur3 v1.1.6 golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 ) diff --git a/go.sum b/go.sum index 6467f0df4b..e593681842 100644 --- a/go.sum +++ b/go.sum @@ -181,6 +181,7 @@ github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VT github.com/apache/arrow/go/arrow v0.0.0-20200601151325-b2287a20f230/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= github.com/apache/arrow/go/arrow v0.0.0-20200923215132-ac86123a3f01/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= diff --git a/scripts/proto-gen.sh b/scripts/proto-gen.sh index d108b15fed..8dafbbb3c2 100755 --- a/scripts/proto-gen.sh +++ b/scripts/proto-gen.sh @@ -4,17 +4,7 @@ source $(dirname $0)/realpath.sh # paranoia, ftw -set -e - -PROTOC_IMAGE_VERSION=${PROTOC_IMAGE_VERSION:-"znly/protoc:0.2.0"} - -# ensure docker is running -docker run --platform linux/amd64 --rm hello-world >/dev/null - -UID_FLAGS="-u $(id -u)" -if [[ -n "$BUILDKITE" ]]; then - UID_FLAGS="-u root" -fi +set -ex PROTO_SRC=$1 for i in "${GOPATH}/src/${PROTO_SRC}"/*; do @@ -23,15 +13,11 @@ for i in "${GOPATH}/src/${PROTO_SRC}"/*; do fi if ls $i/*.proto > /dev/null 2>&1; then - proto_files=$(ls $i/*.proto | sed -e "s@${GOPATH}@@g") + proto_files=$(ls $i/*.proto | sed -e "s@${GOPATH}@${GOPATH}@g") echo "generating from ${proto_files}" - # need the additional m3db_path mount in docker because it's a symlink on the CI. - m3db_path=$(realpath $GOPATH/src/github.com/m3db/m3) resolve_protos="Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types" - docker run --platform linux/amd64 --rm -w /src -v $GOPATH/src:/src -v ${m3db_path}:/src/github.com/m3db/m3 \ - $UID_FLAGS $PROTOC_IMAGE_VERSION \ - --gogofaster_out=${resolve_protos},plugins=grpc:/src \ - -I/src -I/src/github.com/m3db/m3/vendor ${proto_files} + protoc --gogofaster_out=${resolve_protos},plugins=grpc:${GOPATH}/src \ + -I${GOPATH}/src -I${GOPATH}/src/github.com/m3db/m3/vendor ${proto_files} fi done diff --git a/src/aggregator/aggregator/counter_elem_gen.go b/src/aggregator/aggregator/counter_elem_gen.go index 6d409673ed..1fa9636d80 100644 --- a/src/aggregator/aggregator/counter_elem_gen.go +++ b/src/aggregator/aggregator/counter_elem_gen.go @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -174,7 +174,7 @@ func (e *CounterElem) AddValue(timestamp time.Time, value float64, annotation [] // AddUnique adds a metric value from a given source at a given timestamp. // If previous values from the same source have already been added to the // same aggregation, the incoming value is discarded. -//nolint: dupl +// nolint: dupl func (e *CounterElem) AddUnique( timestamp time.Time, metric aggregated.ForwardedMetric, @@ -619,7 +619,7 @@ func (e *CounterElem) insertDirty(alignedStart xtime.UnixNano) { } // find finds the aggregation for a given time, or returns nil. -//nolint: dupl +// nolint: dupl func (e *CounterElem) find(alignedStartNanos xtime.UnixNano) (timedCounter, error) { e.RLock() if e.closed { @@ -637,7 +637,7 @@ func (e *CounterElem) find(alignedStartNanos xtime.UnixNano) (timedCounter, erro // findOrCreate finds the aggregation for a given time, or creates one // if it doesn't exist. -//nolint: dupl +// nolint: dupl func (e *CounterElem) findOrCreate( alignedStartNanos int64, createOpts createAggregationOptions, diff --git a/src/aggregator/aggregator/gauge_elem_gen.go b/src/aggregator/aggregator/gauge_elem_gen.go index 8a3774cb9d..7b790d21ee 100644 --- a/src/aggregator/aggregator/gauge_elem_gen.go +++ b/src/aggregator/aggregator/gauge_elem_gen.go @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -174,7 +174,7 @@ func (e *GaugeElem) AddValue(timestamp time.Time, value float64, annotation []by // AddUnique adds a metric value from a given source at a given timestamp. // If previous values from the same source have already been added to the // same aggregation, the incoming value is discarded. -//nolint: dupl +// nolint: dupl func (e *GaugeElem) AddUnique( timestamp time.Time, metric aggregated.ForwardedMetric, @@ -619,7 +619,7 @@ func (e *GaugeElem) insertDirty(alignedStart xtime.UnixNano) { } // find finds the aggregation for a given time, or returns nil. -//nolint: dupl +// nolint: dupl func (e *GaugeElem) find(alignedStartNanos xtime.UnixNano) (timedGauge, error) { e.RLock() if e.closed { @@ -637,7 +637,7 @@ func (e *GaugeElem) find(alignedStartNanos xtime.UnixNano) (timedGauge, error) { // findOrCreate finds the aggregation for a given time, or creates one // if it doesn't exist. -//nolint: dupl +// nolint: dupl func (e *GaugeElem) findOrCreate( alignedStartNanos int64, createOpts createAggregationOptions, diff --git a/src/aggregator/aggregator/timer_elem_gen.go b/src/aggregator/aggregator/timer_elem_gen.go index ac559a7150..6b3a02417c 100644 --- a/src/aggregator/aggregator/timer_elem_gen.go +++ b/src/aggregator/aggregator/timer_elem_gen.go @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -174,7 +174,7 @@ func (e *TimerElem) AddValue(timestamp time.Time, value float64, annotation []by // AddUnique adds a metric value from a given source at a given timestamp. // If previous values from the same source have already been added to the // same aggregation, the incoming value is discarded. -//nolint: dupl +// nolint: dupl func (e *TimerElem) AddUnique( timestamp time.Time, metric aggregated.ForwardedMetric, @@ -619,7 +619,7 @@ func (e *TimerElem) insertDirty(alignedStart xtime.UnixNano) { } // find finds the aggregation for a given time, or returns nil. -//nolint: dupl +// nolint: dupl func (e *TimerElem) find(alignedStartNanos xtime.UnixNano) (timedTimer, error) { e.RLock() if e.closed { @@ -637,7 +637,7 @@ func (e *TimerElem) find(alignedStartNanos xtime.UnixNano) (timedTimer, error) { // findOrCreate finds the aggregation for a given time, or creates one // if it doesn't exist. -//nolint: dupl +// nolint: dupl func (e *TimerElem) findOrCreate( alignedStartNanos int64, createOpts createAggregationOptions, diff --git a/src/aggregator/generated/proto/flush/flush.pb.go b/src/aggregator/generated/proto/flush/flush.pb.go index bb5d850de0..5e39f72380 100644 --- a/src/aggregator/generated/proto/flush/flush.pb.go +++ b/src/aggregator/generated/proto/flush/flush.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/aggregator/generated/proto/flush/flush.proto -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,24 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package flush is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/aggregator/generated/proto/flush/flush.proto - - It has these top-level messages: - ShardSetFlushTimes - ShardFlushTimes - ForwardedFlushTimesForResolution -*/ package flush -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -49,16 +40,44 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ShardSetFlushTimes struct { - ByShard map[uint32]*ShardFlushTimes `protobuf:"bytes,1,rep,name=by_shard,json=byShard" json:"by_shard,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + ByShard map[uint32]*ShardFlushTimes `protobuf:"bytes,1,rep,name=by_shard,json=byShard,proto3" json:"by_shard,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *ShardSetFlushTimes) Reset() { *m = ShardSetFlushTimes{} } -func (m *ShardSetFlushTimes) String() string { return proto.CompactTextString(m) } -func (*ShardSetFlushTimes) ProtoMessage() {} -func (*ShardSetFlushTimes) Descriptor() ([]byte, []int) { return fileDescriptorFlush, []int{0} } +func (m *ShardSetFlushTimes) Reset() { *m = ShardSetFlushTimes{} } +func (m *ShardSetFlushTimes) String() string { return proto.CompactTextString(m) } +func (*ShardSetFlushTimes) ProtoMessage() {} +func (*ShardSetFlushTimes) Descriptor() ([]byte, []int) { + return fileDescriptor_30db4a002ab848d6, []int{0} +} +func (m *ShardSetFlushTimes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ShardSetFlushTimes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ShardSetFlushTimes.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 *ShardSetFlushTimes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ShardSetFlushTimes.Merge(m, src) +} +func (m *ShardSetFlushTimes) XXX_Size() int { + return m.Size() +} +func (m *ShardSetFlushTimes) XXX_DiscardUnknown() { + xxx_messageInfo_ShardSetFlushTimes.DiscardUnknown(m) +} + +var xxx_messageInfo_ShardSetFlushTimes proto.InternalMessageInfo func (m *ShardSetFlushTimes) GetByShard() map[uint32]*ShardFlushTimes { if m != nil { @@ -68,16 +87,44 @@ func (m *ShardSetFlushTimes) GetByShard() map[uint32]*ShardFlushTimes { } type ShardFlushTimes struct { - StandardByResolution map[int64]int64 `protobuf:"bytes,1,rep,name=standard_by_resolution,json=standardByResolution" json:"standard_by_resolution,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StandardByResolution map[int64]int64 `protobuf:"bytes,1,rep,name=standard_by_resolution,json=standardByResolution,proto3" json:"standard_by_resolution,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` Tombstoned bool `protobuf:"varint,2,opt,name=tombstoned,proto3" json:"tombstoned,omitempty"` - ForwardedByResolution map[int64]*ForwardedFlushTimesForResolution `protobuf:"bytes,3,rep,name=forwarded_by_resolution,json=forwardedByResolution" json:"forwarded_by_resolution,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - TimedByResolution map[int64]int64 `protobuf:"bytes,4,rep,name=timed_by_resolution,json=timedByResolution" json:"timed_by_resolution,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + ForwardedByResolution map[int64]*ForwardedFlushTimesForResolution `protobuf:"bytes,3,rep,name=forwarded_by_resolution,json=forwardedByResolution,proto3" json:"forwarded_by_resolution,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TimedByResolution map[int64]int64 `protobuf:"bytes,4,rep,name=timed_by_resolution,json=timedByResolution,proto3" json:"timed_by_resolution,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (m *ShardFlushTimes) Reset() { *m = ShardFlushTimes{} } +func (m *ShardFlushTimes) String() string { return proto.CompactTextString(m) } +func (*ShardFlushTimes) ProtoMessage() {} +func (*ShardFlushTimes) Descriptor() ([]byte, []int) { + return fileDescriptor_30db4a002ab848d6, []int{1} +} +func (m *ShardFlushTimes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ShardFlushTimes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ShardFlushTimes.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 *ShardFlushTimes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ShardFlushTimes.Merge(m, src) +} +func (m *ShardFlushTimes) XXX_Size() int { + return m.Size() +} +func (m *ShardFlushTimes) XXX_DiscardUnknown() { + xxx_messageInfo_ShardFlushTimes.DiscardUnknown(m) } -func (m *ShardFlushTimes) Reset() { *m = ShardFlushTimes{} } -func (m *ShardFlushTimes) String() string { return proto.CompactTextString(m) } -func (*ShardFlushTimes) ProtoMessage() {} -func (*ShardFlushTimes) Descriptor() ([]byte, []int) { return fileDescriptorFlush, []int{1} } +var xxx_messageInfo_ShardFlushTimes proto.InternalMessageInfo func (m *ShardFlushTimes) GetStandardByResolution() map[int64]int64 { if m != nil { @@ -108,15 +155,41 @@ func (m *ShardFlushTimes) GetTimedByResolution() map[int64]int64 { } type ForwardedFlushTimesForResolution struct { - ByNumForwardedTimes map[int32]int64 `protobuf:"bytes,1,rep,name=by_num_forwarded_times,json=byNumForwardedTimes" json:"by_num_forwarded_times,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + ByNumForwardedTimes map[int32]int64 `protobuf:"bytes,1,rep,name=by_num_forwarded_times,json=byNumForwardedTimes,proto3" json:"by_num_forwarded_times,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` } func (m *ForwardedFlushTimesForResolution) Reset() { *m = ForwardedFlushTimesForResolution{} } func (m *ForwardedFlushTimesForResolution) String() string { return proto.CompactTextString(m) } func (*ForwardedFlushTimesForResolution) ProtoMessage() {} func (*ForwardedFlushTimesForResolution) Descriptor() ([]byte, []int) { - return fileDescriptorFlush, []int{2} + return fileDescriptor_30db4a002ab848d6, []int{2} +} +func (m *ForwardedFlushTimesForResolution) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ForwardedFlushTimesForResolution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ForwardedFlushTimesForResolution.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 *ForwardedFlushTimesForResolution) XXX_Merge(src proto.Message) { + xxx_messageInfo_ForwardedFlushTimesForResolution.Merge(m, src) } +func (m *ForwardedFlushTimesForResolution) XXX_Size() int { + return m.Size() +} +func (m *ForwardedFlushTimesForResolution) XXX_DiscardUnknown() { + xxx_messageInfo_ForwardedFlushTimesForResolution.DiscardUnknown(m) +} + +var xxx_messageInfo_ForwardedFlushTimesForResolution proto.InternalMessageInfo func (m *ForwardedFlushTimesForResolution) GetByNumForwardedTimes() map[int32]int64 { if m != nil { @@ -127,13 +200,56 @@ func (m *ForwardedFlushTimesForResolution) GetByNumForwardedTimes() map[int32]in func init() { proto.RegisterType((*ShardSetFlushTimes)(nil), "ShardSetFlushTimes") + proto.RegisterMapType((map[uint32]*ShardFlushTimes)(nil), "ShardSetFlushTimes.ByShardEntry") proto.RegisterType((*ShardFlushTimes)(nil), "ShardFlushTimes") + proto.RegisterMapType((map[int64]*ForwardedFlushTimesForResolution)(nil), "ShardFlushTimes.ForwardedByResolutionEntry") + proto.RegisterMapType((map[int64]int64)(nil), "ShardFlushTimes.StandardByResolutionEntry") + proto.RegisterMapType((map[int64]int64)(nil), "ShardFlushTimes.TimedByResolutionEntry") proto.RegisterType((*ForwardedFlushTimesForResolution)(nil), "ForwardedFlushTimesForResolution") + proto.RegisterMapType((map[int32]int64)(nil), "ForwardedFlushTimesForResolution.ByNumForwardedTimesEntry") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/aggregator/generated/proto/flush/flush.proto", fileDescriptor_30db4a002ab848d6) +} + +var fileDescriptor_30db4a002ab848d6 = []byte{ + // 454 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xc1, 0x8e, 0xd3, 0x30, + 0x10, 0xad, 0x37, 0xbb, 0xb0, 0x9a, 0x05, 0xb1, 0x78, 0x97, 0x12, 0x72, 0x88, 0x42, 0x0f, 0x50, + 0x81, 0x94, 0x48, 0xdb, 0x03, 0x68, 0xb9, 0x15, 0x28, 0x17, 0xc4, 0x21, 0x45, 0xe2, 0x18, 0xec, + 0xc6, 0x4d, 0xab, 0xad, 0x63, 0x64, 0x3b, 0x20, 0xff, 0x05, 0x7f, 0xc0, 0xef, 0x70, 0x41, 0xda, + 0x23, 0x12, 0x17, 0xd4, 0xfe, 0x08, 0x4a, 0x52, 0x9a, 0xd0, 0xa4, 0xaa, 0xb8, 0x58, 0xc9, 0xbc, + 0x97, 0x37, 0x6f, 0xe6, 0xc5, 0xf0, 0x32, 0x99, 0xeb, 0x59, 0x46, 0xfd, 0x89, 0xe0, 0x01, 0x1f, + 0xc4, 0x34, 0xe0, 0x83, 0x40, 0xc9, 0x49, 0x40, 0x92, 0x44, 0xb2, 0x84, 0x68, 0x21, 0x83, 0x84, + 0xa5, 0x4c, 0x12, 0xcd, 0xe2, 0xe0, 0x93, 0x14, 0x5a, 0x04, 0xd3, 0x45, 0xa6, 0x66, 0xe5, 0xe9, + 0x17, 0x95, 0xde, 0x37, 0x04, 0x78, 0x3c, 0x23, 0x32, 0x1e, 0x33, 0x3d, 0xca, 0xeb, 0xef, 0xe7, + 0x9c, 0x29, 0xfc, 0x02, 0x8e, 0xa9, 0x89, 0x54, 0x0e, 0xd8, 0xc8, 0xb3, 0xfa, 0x27, 0x17, 0x9e, + 0xdf, 0xa4, 0xf9, 0x43, 0x53, 0x14, 0x5f, 0xa7, 0x5a, 0x9a, 0xf0, 0x26, 0x2d, 0xdf, 0x9c, 0xb7, + 0x70, 0xab, 0x0e, 0xe0, 0x53, 0xb0, 0xae, 0x98, 0xb1, 0x91, 0x87, 0xfa, 0xb7, 0xc3, 0xfc, 0x11, + 0x3f, 0x82, 0xa3, 0xcf, 0x64, 0x91, 0x31, 0xfb, 0xc0, 0x43, 0xfd, 0x93, 0x8b, 0xd3, 0x52, 0xbb, + 0x12, 0x0e, 0x4b, 0xf8, 0xf2, 0xe0, 0x39, 0xea, 0xfd, 0x38, 0x84, 0x3b, 0x5b, 0x30, 0xfe, 0x08, + 0x5d, 0xa5, 0x49, 0x1a, 0x13, 0x19, 0x47, 0xd4, 0x44, 0x92, 0x29,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+ 0x74, 0xd1, 0xf5, 0xd2, 0x45, 0xbf, 0x97, 0x2e, 0xfa, 0xba, 0x72, 0x3b, 0xd7, 0x2b, 0xb7, 0xf3, + 0x73, 0xe5, 0x76, 0xe8, 0x8d, 0xe2, 0xc2, 0x0f, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x48, 0x45, + 0xf3, 0xf6, 0x37, 0x04, 0x00, 0x00, +} + func (m *ShardSetFlushTimes) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -141,44 +257,46 @@ func (m *ShardSetFlushTimes) Marshal() (dAtA []byte, err error) { } func (m *ShardSetFlushTimes) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ShardSetFlushTimes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.ByShard) > 0 { - for k, _ := range m.ByShard { - dAtA[i] = 0xa - i++ + for k := range m.ByShard { v := m.ByShard[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovFlush(uint64(msgSize)) - } - mapSize := 1 + sovFlush(uint64(k)) + msgSize - i = encodeVarintFlush(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintFlush(dAtA, i, uint64(k)) + baseI := i if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintFlush(dAtA, i, uint64(v.Size())) - n1, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFlush(dAtA, i, uint64(size)) } - i += n1 + i-- + dAtA[i] = 0x12 } + i = encodeVarintFlush(dAtA, i, uint64(k)) + i-- + dAtA[i] = 0x8 + i = encodeVarintFlush(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *ShardFlushTimes) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -186,84 +304,86 @@ func (m *ShardFlushTimes) Marshal() (dAtA []byte, err error) { } func (m *ShardFlushTimes) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ShardFlushTimes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.StandardByResolution) > 0 { - for k, _ := range m.StandardByResolution { - dAtA[i] = 0xa - i++ - v := m.StandardByResolution[k] - mapSize := 1 + sovFlush(uint64(k)) + 1 + sovFlush(uint64(v)) - i = encodeVarintFlush(dAtA, i, uint64(mapSize)) + if len(m.TimedByResolution) > 0 { + for k := range m.TimedByResolution { + v := m.TimedByResolution[k] + baseI := i + i = encodeVarintFlush(dAtA, i, uint64(v)) + i-- + dAtA[i] = 0x10 + i = encodeVarintFlush(dAtA, i, uint64(k)) + i-- dAtA[i] = 0x8 - i++ + i = encodeVarintFlush(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.ForwardedByResolution) > 0 { + for k := range m.ForwardedByResolution { + v := m.ForwardedByResolution[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFlush(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } i = encodeVarintFlush(dAtA, i, uint64(k)) - dAtA[i] = 0x10 - i++ - i = encodeVarintFlush(dAtA, i, uint64(v)) + i-- + dAtA[i] = 0x8 + i = encodeVarintFlush(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a } } if m.Tombstoned { - dAtA[i] = 0x10 - i++ + i-- if m.Tombstoned { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if len(m.ForwardedByResolution) > 0 { - for k, _ := range m.ForwardedByResolution { - dAtA[i] = 0x1a - i++ - v := m.ForwardedByResolution[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovFlush(uint64(msgSize)) - } - mapSize := 1 + sovFlush(uint64(k)) + msgSize - i = encodeVarintFlush(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ + if len(m.StandardByResolution) > 0 { + for k := range m.StandardByResolution { + v := m.StandardByResolution[k] + baseI := i + i = encodeVarintFlush(dAtA, i, uint64(v)) + i-- + dAtA[i] = 0x10 i = encodeVarintFlush(dAtA, i, uint64(k)) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintFlush(dAtA, i, uint64(v.Size())) - n2, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - } - if len(m.TimedByResolution) > 0 { - for k, _ := range m.TimedByResolution { - dAtA[i] = 0x22 - i++ - v := m.TimedByResolution[k] - mapSize := 1 + sovFlush(uint64(k)) + 1 + sovFlush(uint64(v)) - i = encodeVarintFlush(dAtA, i, uint64(mapSize)) + i-- dAtA[i] = 0x8 - i++ - i = encodeVarintFlush(dAtA, i, uint64(k)) - dAtA[i] = 0x10 - i++ - i = encodeVarintFlush(dAtA, i, uint64(v)) + i = encodeVarintFlush(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *ForwardedFlushTimesForResolution) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -271,38 +391,48 @@ func (m *ForwardedFlushTimesForResolution) Marshal() (dAtA []byte, err error) { } func (m *ForwardedFlushTimesForResolution) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ForwardedFlushTimesForResolution) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.ByNumForwardedTimes) > 0 { - for k, _ := range m.ByNumForwardedTimes { - dAtA[i] = 0xa - i++ + for k := range m.ByNumForwardedTimes { v := m.ByNumForwardedTimes[k] - mapSize := 1 + sovFlush(uint64(k)) + 1 + sovFlush(uint64(v)) - i = encodeVarintFlush(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintFlush(dAtA, i, uint64(k)) - dAtA[i] = 0x10 - i++ + baseI := i i = encodeVarintFlush(dAtA, i, uint64(v)) + i-- + dAtA[i] = 0x10 + i = encodeVarintFlush(dAtA, i, uint64(k)) + i-- + dAtA[i] = 0x8 + i = encodeVarintFlush(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func encodeVarintFlush(dAtA []byte, offset int, v uint64) int { + offset -= sovFlush(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *ShardSetFlushTimes) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.ByShard) > 0 { @@ -322,6 +452,9 @@ func (m *ShardSetFlushTimes) Size() (n int) { } func (m *ShardFlushTimes) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.StandardByResolution) > 0 { @@ -360,6 +493,9 @@ func (m *ShardFlushTimes) Size() (n int) { } func (m *ForwardedFlushTimesForResolution) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.ByNumForwardedTimes) > 0 { @@ -374,14 +510,7 @@ func (m *ForwardedFlushTimesForResolution) Size() (n int) { } func sovFlush(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozFlush(x uint64) (n int) { return sovFlush(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -401,7 +530,7 @@ func (m *ShardSetFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -429,7 +558,7 @@ func (m *ShardSetFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -438,6 +567,9 @@ func (m *ShardSetFlushTimes) Unmarshal(dAtA []byte) error { return ErrInvalidLengthFlush } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFlush + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -458,7 +590,7 @@ func (m *ShardSetFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -474,7 +606,7 @@ func (m *ShardSetFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkey |= (uint32(b) & 0x7F) << shift + mapkey |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -490,7 +622,7 @@ func (m *ShardSetFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift + mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -499,7 +631,7 @@ func (m *ShardSetFlushTimes) Unmarshal(dAtA []byte) error { return ErrInvalidLengthFlush } postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { + if postmsgIndex < 0 { return ErrInvalidLengthFlush } if postmsgIndex > l { @@ -516,7 +648,7 @@ func (m *ShardSetFlushTimes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFlush } if (iNdEx + skippy) > postIndex { @@ -533,7 +665,7 @@ func (m *ShardSetFlushTimes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFlush } if (iNdEx + skippy) > l { @@ -563,7 +695,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -591,7 +723,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -600,6 +732,9 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { return ErrInvalidLengthFlush } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFlush + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -620,7 +755,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -636,7 +771,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift + mapkey |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -651,7 +786,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift + mapvalue |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -662,7 +797,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFlush } if (iNdEx + skippy) > postIndex { @@ -687,7 +822,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -707,7 +842,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -716,6 +851,9 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { return ErrInvalidLengthFlush } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFlush + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -736,7 +874,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -752,7 +890,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift + mapkey |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -768,7 +906,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift + mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -777,7 +915,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { return ErrInvalidLengthFlush } postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { + if postmsgIndex < 0 { return ErrInvalidLengthFlush } if postmsgIndex > l { @@ -794,7 +932,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFlush } if (iNdEx + skippy) > postIndex { @@ -819,7 +957,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -828,6 +966,9 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { return ErrInvalidLengthFlush } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFlush + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -848,7 +989,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -864,7 +1005,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkey |= (int64(b) & 0x7F) << shift + mapkey |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -879,7 +1020,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift + mapvalue |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -890,7 +1031,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFlush } if (iNdEx + skippy) > postIndex { @@ -907,7 +1048,7 @@ func (m *ShardFlushTimes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFlush } if (iNdEx + skippy) > l { @@ -937,7 +1078,7 @@ func (m *ForwardedFlushTimesForResolution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -965,7 +1106,7 @@ func (m *ForwardedFlushTimesForResolution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -974,6 +1115,9 @@ func (m *ForwardedFlushTimesForResolution) Unmarshal(dAtA []byte) error { return ErrInvalidLengthFlush } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFlush + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -994,7 +1138,7 @@ func (m *ForwardedFlushTimesForResolution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1010,7 +1154,7 @@ func (m *ForwardedFlushTimesForResolution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift + mapkey |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -1025,7 +1169,7 @@ func (m *ForwardedFlushTimesForResolution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift + mapvalue |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1036,7 +1180,7 @@ func (m *ForwardedFlushTimesForResolution) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFlush } if (iNdEx + skippy) > postIndex { @@ -1053,7 +1197,7 @@ func (m *ForwardedFlushTimesForResolution) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFlush } if (iNdEx + skippy) > l { @@ -1071,6 +1215,7 @@ func (m *ForwardedFlushTimesForResolution) Unmarshal(dAtA []byte) error { func skipFlush(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1102,10 +1247,8 @@ func skipFlush(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1122,89 +1265,34 @@ func skipFlush(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthFlush } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFlush - } - 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 := skipFlush(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFlush + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthFlush + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthFlush = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFlush = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthFlush = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFlush = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFlush = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/aggregator/generated/proto/flush/flush.proto", fileDescriptorFlush) -} - -var fileDescriptorFlush = []byte{ - // 445 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xc1, 0x8e, 0xd3, 0x30, - 0x10, 0xc5, 0x9b, 0x5d, 0x58, 0xcd, 0x82, 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xcc, 0xbc, 0xcd, 0xf9, 0x15, 0xab, 0x24, 0x54, 0x79, 0x9c, 0xd2, 0x2e, 0x62, - 0x07, 0x30, 0xda, 0xf5, 0x41, 0x73, 0xba, 0xa3, 0x3d, 0xd3, 0xcd, 0x06, 0xdf, 0x36, 0x0e, 0xfa, - 0xb1, 0x71, 0xd0, 0xaf, 0x8d, 0x83, 0xbe, 0xfc, 0x76, 0xae, 0xd1, 0xeb, 0xe5, 0x45, 0x9f, 0xfe, - 0x09, 0x00, 0x00, 0xff, 0xff, 0x79, 0x43, 0x3d, 0x62, 0x2f, 0x04, 0x00, 0x00, -} diff --git a/src/cluster/generated/proto/changesetpb/changeset.pb.go b/src/cluster/generated/proto/changesetpb/changeset.pb.go index a84a882454..7d0f05872c 100644 --- a/src/cluster/generated/proto/changesetpb/changeset.pb.go +++ b/src/cluster/generated/proto/changesetpb/changeset.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/cluster/generated/proto/changesetpb/changeset.proto -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,22 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package changesetpb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/cluster/generated/proto/changesetpb/changeset.proto - - It has these top-level messages: - ChangeSet -*/ package changesetpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -47,7 +40,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // ChangeSetState tracks the stateof a changeset type ChangeSetState int32 @@ -63,6 +56,7 @@ var ChangeSetState_name = map[int32]string{ 1: "OPEN", 2: "CLOSED", } + var ChangeSetState_value = map[string]int32{ "UNKNOWN": 0, "OPEN": 1, @@ -72,7 +66,10 @@ var ChangeSetState_value = map[string]int32{ func (x ChangeSetState) String() string { return proto.EnumName(ChangeSetState_name, int32(x)) } -func (ChangeSetState) EnumDescriptor() ([]byte, []int) { return fileDescriptorChangeset, []int{0} } + +func (ChangeSetState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_74a9b95e5dd52c9a, []int{0} +} // A ChangeSet is a set of changes that are applied together. The exact // format of the changes is up to the application; the ChangeSet simply @@ -86,10 +83,38 @@ type ChangeSet struct { Changes []byte `protobuf:"bytes,3,opt,name=changes,proto3" json:"changes,omitempty"` } -func (m *ChangeSet) Reset() { *m = ChangeSet{} } -func (m *ChangeSet) String() string { return proto.CompactTextString(m) } -func (*ChangeSet) ProtoMessage() {} -func (*ChangeSet) Descriptor() ([]byte, []int) { return fileDescriptorChangeset, []int{0} } +func (m *ChangeSet) Reset() { *m = ChangeSet{} } +func (m *ChangeSet) String() string { return proto.CompactTextString(m) } +func (*ChangeSet) ProtoMessage() {} +func (*ChangeSet) Descriptor() ([]byte, []int) { + return fileDescriptor_74a9b95e5dd52c9a, []int{0} +} +func (m *ChangeSet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChangeSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChangeSet.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 *ChangeSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangeSet.Merge(m, src) +} +func (m *ChangeSet) XXX_Size() int { + return m.Size() +} +func (m *ChangeSet) XXX_DiscardUnknown() { + xxx_messageInfo_ChangeSet.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangeSet proto.InternalMessageInfo func (m *ChangeSet) GetForVersion() int32 { if m != nil { @@ -113,13 +138,38 @@ func (m *ChangeSet) GetChanges() []byte { } func init() { - proto.RegisterType((*ChangeSet)(nil), "changesetpb.ChangeSet") proto.RegisterEnum("changesetpb.ChangeSetState", ChangeSetState_name, ChangeSetState_value) + proto.RegisterType((*ChangeSet)(nil), "changesetpb.ChangeSet") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/changesetpb/changeset.proto", fileDescriptor_74a9b95e5dd52c9a) +} + +var fileDescriptor_74a9b95e5dd52c9a = []byte{ + // 249 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0x4a, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, + 0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, + 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x4f, 0xce, 0x48, 0xcc, 0x4b, + 0x4f, 0x2d, 0x4e, 0x2d, 0x29, 0x48, 0x42, 0xb0, 0xf5, 0xc0, 0x72, 0x42, 0xdc, 0x48, 0x92, 0x4a, + 0x95, 0x5c, 0x9c, 0xce, 0x60, 0x6e, 0x70, 0x6a, 0x89, 0x90, 0x3c, 0x17, 0x77, 0x5a, 0x7e, 0x51, + 0x7c, 0x59, 0x6a, 0x51, 0x71, 0x66, 0x7e, 0x9e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x57, + 0x5a, 0x7e, 0x51, 0x18, 0x44, 0x44, 0xc8, 0x90, 0x8b, 0xb5, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0x82, + 0x49, 0x81, 0x51, 0x83, 0xcf, 0x48, 0x5a, 0x0f, 0xc9, 0x28, 0x3d, 0xb8, 0x39, 0xc1, 0x20, 0x25, + 0x41, 0x10, 0x95, 0x42, 0x12, 0x5c, 0xec, 0x50, 0x45, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, + 0x30, 0xae, 0x96, 0x31, 0x17, 0x1f, 0xaa, 0x16, 0x21, 0x6e, 0x2e, 0xf6, 0x50, 0x3f, 0x6f, 0x3f, + 0xff, 0x70, 0x3f, 0x01, 0x06, 0x21, 0x0e, 0x2e, 0x16, 0xff, 0x00, 0x57, 0x3f, 0x01, 0x46, 0x21, + 0x2e, 0x2e, 0x36, 0x67, 0x1f, 0xff, 0x60, 0x57, 0x17, 0x01, 0x26, 0x27, 0x89, 0x13, 0x8f, 0xe4, + 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, + 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x48, 0x62, 0x03, 0xfb, 0xce, 0x18, 0x10, 0x00, 0x00, 0xff, + 0xff, 0x51, 0x59, 0x6d, 0x1a, 0x2b, 0x01, 0x00, 0x00, +} + func (m *ChangeSet) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -127,39 +177,50 @@ func (m *ChangeSet) Marshal() (dAtA []byte, err error) { } func (m *ChangeSet) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChangeSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ForVersion != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintChangeset(dAtA, i, uint64(m.ForVersion)) + if len(m.Changes) > 0 { + i -= len(m.Changes) + copy(dAtA[i:], m.Changes) + i = encodeVarintChangeset(dAtA, i, uint64(len(m.Changes))) + i-- + dAtA[i] = 0x1a } if m.State != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintChangeset(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 } - if len(m.Changes) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintChangeset(dAtA, i, uint64(len(m.Changes))) - i += copy(dAtA[i:], m.Changes) + if m.ForVersion != 0 { + i = encodeVarintChangeset(dAtA, i, uint64(m.ForVersion)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintChangeset(dAtA []byte, offset int, v uint64) int { + offset -= sovChangeset(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *ChangeSet) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.ForVersion != 0 { @@ -176,14 +237,7 @@ func (m *ChangeSet) Size() (n int) { } func sovChangeset(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozChangeset(x uint64) (n int) { return sovChangeset(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -203,7 +257,7 @@ func (m *ChangeSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -231,7 +285,7 @@ func (m *ChangeSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ForVersion |= (int32(b) & 0x7F) << shift + m.ForVersion |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -250,7 +304,7 @@ func (m *ChangeSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= (ChangeSetState(b) & 0x7F) << shift + m.State |= ChangeSetState(b&0x7F) << shift if b < 0x80 { break } @@ -269,7 +323,7 @@ func (m *ChangeSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -278,6 +332,9 @@ func (m *ChangeSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthChangeset } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthChangeset + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -292,7 +349,7 @@ func (m *ChangeSet) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthChangeset } if (iNdEx + skippy) > l { @@ -310,6 +367,7 @@ func (m *ChangeSet) Unmarshal(dAtA []byte) error { func skipChangeset(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -341,10 +399,8 @@ func skipChangeset(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -361,77 +417,34 @@ func skipChangeset(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthChangeset } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowChangeset - } - 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 := skipChangeset(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupChangeset + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthChangeset + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthChangeset = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowChangeset = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthChangeset = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowChangeset = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupChangeset = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/changesetpb/changeset.proto", fileDescriptorChangeset) -} - -var fileDescriptorChangeset = []byte{ - // 241 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0x4a, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, - 0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, - 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x4f, 0xce, 0x48, 0xcc, 0x4b, - 0x4f, 0x2d, 0x4e, 0x2d, 0x29, 0x48, 0x42, 0xb0, 0xf5, 0xc0, 0x72, 0x42, 0xdc, 0x48, 0x92, 0x4a, - 0x95, 0x5c, 0x9c, 0xce, 0x60, 0x6e, 0x70, 0x6a, 0x89, 0x90, 0x3c, 0x17, 0x77, 0x5a, 0x7e, 0x51, - 0x7c, 0x59, 0x6a, 0x51, 0x71, 0x66, 0x7e, 0x9e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x57, - 0x5a, 0x7e, 0x51, 0x18, 0x44, 0x44, 0xc8, 0x90, 0x8b, 0xb5, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0x82, - 0x49, 0x81, 0x51, 0x83, 0xcf, 0x48, 0x5a, 0x0f, 0xc9, 0x28, 0x3d, 0xb8, 0x39, 0xc1, 0x20, 0x25, - 0x41, 0x10, 0x95, 0x42, 0x12, 0x5c, 0xec, 0x50, 0x45, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, - 0x30, 0xae, 0x96, 0x31, 0x17, 0x1f, 0xaa, 0x16, 0x21, 0x6e, 0x2e, 0xf6, 0x50, 0x3f, 0x6f, 0x3f, - 0xff, 0x70, 0x3f, 0x01, 0x06, 0x21, 0x0e, 0x2e, 0x16, 0xff, 0x00, 0x57, 0x3f, 0x01, 0x46, 0x21, - 0x2e, 0x2e, 0x36, 0x67, 0x1f, 0xff, 0x60, 0x57, 0x17, 0x01, 0x26, 0x27, 0x81, 0x13, 0x8f, 0xe4, - 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x24, 0x36, - 0xb0, 0xaf, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xed, 0x57, 0x5c, 0x23, 0x01, 0x00, - 0x00, -} diff --git a/src/cluster/generated/proto/changesettest/changesettest.pb.go b/src/cluster/generated/proto/changesettest/changesettest.pb.go index 6aa4457d64..b50e5df50a 100644 --- a/src/cluster/generated/proto/changesettest/changesettest.pb.go +++ b/src/cluster/generated/proto/changesettest/changesettest.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/cluster/generated/proto/changesettest/changesettest.proto -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,23 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* -Package changesettest is a generated protocol buffer package. - -It is generated from these files: - github.com/m3db/m3/src/cluster/generated/proto/changesettest/changesettest.proto - -It has these top-level messages: - Config - Changes -*/ package changesettest -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -48,16 +40,44 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Config struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` } -func (m *Config) Reset() { *m = Config{} } -func (m *Config) String() string { return proto.CompactTextString(m) } -func (*Config) ProtoMessage() {} -func (*Config) Descriptor() ([]byte, []int) { return fileDescriptorChangesettest, []int{0} } +func (m *Config) Reset() { *m = Config{} } +func (m *Config) String() string { return proto.CompactTextString(m) } +func (*Config) ProtoMessage() {} +func (*Config) Descriptor() ([]byte, []int) { + return fileDescriptor_7edb9f28b83e6485, []int{0} +} +func (m *Config) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Config.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 *Config) XXX_Merge(src proto.Message) { + xxx_messageInfo_Config.Merge(m, src) +} +func (m *Config) XXX_Size() int { + return m.Size() +} +func (m *Config) XXX_DiscardUnknown() { + xxx_messageInfo_Config.DiscardUnknown(m) +} + +var xxx_messageInfo_Config proto.InternalMessageInfo func (m *Config) GetText() string { if m != nil { @@ -67,13 +87,41 @@ func (m *Config) GetText() string { } type Changes struct { - Lines []string `protobuf:"bytes,1,rep,name=lines" json:"lines,omitempty"` + Lines []string `protobuf:"bytes,1,rep,name=lines,proto3" json:"lines,omitempty"` +} + +func (m *Changes) Reset() { *m = Changes{} } +func (m *Changes) String() string { return proto.CompactTextString(m) } +func (*Changes) ProtoMessage() {} +func (*Changes) Descriptor() ([]byte, []int) { + return fileDescriptor_7edb9f28b83e6485, []int{1} +} +func (m *Changes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Changes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Changes.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 *Changes) XXX_Merge(src proto.Message) { + xxx_messageInfo_Changes.Merge(m, src) +} +func (m *Changes) XXX_Size() int { + return m.Size() +} +func (m *Changes) XXX_DiscardUnknown() { + xxx_messageInfo_Changes.DiscardUnknown(m) } -func (m *Changes) Reset() { *m = Changes{} } -func (m *Changes) String() string { return proto.CompactTextString(m) } -func (*Changes) ProtoMessage() {} -func (*Changes) Descriptor() ([]byte, []int) { return fileDescriptorChangesettest, []int{1} } +var xxx_messageInfo_Changes proto.InternalMessageInfo func (m *Changes) GetLines() []string { if m != nil { @@ -86,10 +134,31 @@ func init() { proto.RegisterType((*Config)(nil), "changesettest.Config") proto.RegisterType((*Changes)(nil), "changesettest.Changes") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/changesettest/changesettest.proto", fileDescriptor_7edb9f28b83e6485) +} + +var fileDescriptor_7edb9f28b83e6485 = []byte{ + // 179 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x0a, 0x48, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, + 0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, + 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x4f, 0xce, 0x48, 0xcc, 0x4b, + 0x4f, 0x2d, 0x4e, 0x2d, 0x29, 0x49, 0x2d, 0x2e, 0x41, 0xe5, 0xe9, 0x81, 0x55, 0x08, 0xf1, 0xa2, + 0x08, 0x2a, 0xc9, 0x70, 0xb1, 0x39, 0xe7, 0xe7, 0xa5, 0x65, 0xa6, 0x0b, 0x09, 0x71, 0xb1, 0x94, + 0xa4, 0x56, 0x94, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0xd9, 0x4a, 0xf2, 0x5c, 0xec, + 0xce, 0x10, 0xe5, 0x42, 0x22, 0x5c, 0xac, 0x39, 0x99, 0x79, 0xa9, 0xc5, 0x12, 0x8c, 0x0a, 0xcc, + 0x1a, 0x9c, 0x41, 0x10, 0x8e, 0x93, 0xc4, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, + 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, + 0x24, 0xb1, 0x81, 0xad, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x13, 0x25, 0xa3, 0xbe, 0xc2, + 0x00, 0x00, 0x00, +} + func (m *Config) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -97,23 +166,29 @@ func (m *Config) Marshal() (dAtA []byte, err error) { } func (m *Config) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Config) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Text) > 0 { - dAtA[i] = 0xa - i++ + i -= len(m.Text) + copy(dAtA[i:], m.Text) i = encodeVarintChangesettest(dAtA, i, uint64(len(m.Text))) - i += copy(dAtA[i:], m.Text) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Changes) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -121,38 +196,42 @@ func (m *Changes) Marshal() (dAtA []byte, err error) { } func (m *Changes) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Changes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Lines) > 0 { - for _, s := range m.Lines { + for iNdEx := len(m.Lines) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Lines[iNdEx]) + copy(dAtA[i:], m.Lines[iNdEx]) + i = encodeVarintChangesettest(dAtA, i, uint64(len(m.Lines[iNdEx]))) + i-- dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - return i, nil + return len(dAtA) - i, nil } func encodeVarintChangesettest(dAtA []byte, offset int, v uint64) int { + offset -= sovChangesettest(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Config) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Text) @@ -163,6 +242,9 @@ func (m *Config) Size() (n int) { } func (m *Changes) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Lines) > 0 { @@ -175,14 +257,7 @@ func (m *Changes) Size() (n int) { } func sovChangesettest(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozChangesettest(x uint64) (n int) { return sovChangesettest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -202,7 +277,7 @@ func (m *Config) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -230,7 +305,7 @@ func (m *Config) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -240,6 +315,9 @@ func (m *Config) Unmarshal(dAtA []byte) error { return ErrInvalidLengthChangesettest } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChangesettest + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -251,7 +329,7 @@ func (m *Config) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthChangesettest } if (iNdEx + skippy) > l { @@ -281,7 +359,7 @@ func (m *Changes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -309,7 +387,7 @@ func (m *Changes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -319,6 +397,9 @@ func (m *Changes) Unmarshal(dAtA []byte) error { return ErrInvalidLengthChangesettest } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChangesettest + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -330,7 +411,7 @@ func (m *Changes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthChangesettest } if (iNdEx + skippy) > l { @@ -348,6 +429,7 @@ func (m *Changes) Unmarshal(dAtA []byte) error { func skipChangesettest(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -379,10 +461,8 @@ func skipChangesettest(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -399,72 +479,34 @@ func skipChangesettest(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthChangesettest } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowChangesettest - } - 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 := skipChangesettest(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupChangesettest + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthChangesettest + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthChangesettest = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowChangesettest = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthChangesettest = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowChangesettest = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupChangesettest = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/changesettest/changesettest.proto", fileDescriptorChangesettest) -} - -var fileDescriptorChangesettest = []byte{ - // 171 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x0a, 0x48, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, - 0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, - 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x4f, 0xce, 0x48, 0xcc, 0x4b, - 0x4f, 0x2d, 0x4e, 0x2d, 0x29, 0x49, 0x2d, 0x2e, 0x41, 0xe5, 0xe9, 0x81, 0x55, 0x08, 0xf1, 0xa2, - 0x08, 0x2a, 0xc9, 0x70, 0xb1, 0x39, 0xe7, 0xe7, 0xa5, 0x65, 0xa6, 0x0b, 0x09, 0x71, 0xb1, 0x94, - 0xa4, 0x56, 0x94, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0xd9, 0x4a, 0xf2, 0x5c, 0xec, - 0xce, 0x10, 0xe5, 0x42, 0x22, 0x5c, 0xac, 0x39, 0x99, 0x79, 0xa9, 0xc5, 0x12, 0x8c, 0x0a, 0xcc, - 0x1a, 0x9c, 0x41, 0x10, 0x8e, 0x93, 0xc0, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, - 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0x43, 0x12, 0x1b, 0xd8, 0x1a, 0x63, 0x40, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x86, 0xed, 0x1a, 0xf5, 0xba, 0x00, 0x00, 0x00, -} diff --git a/src/cluster/generated/proto/commonpb/common.pb.go b/src/cluster/generated/proto/commonpb/common.pb.go index 071f10a010..b6c5520436 100644 --- a/src/cluster/generated/proto/commonpb/common.pb.go +++ b/src/cluster/generated/proto/commonpb/common.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/cluster/generated/proto/commonpb/common.proto -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,28 +21,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* -Package commonpb is a generated protocol buffer package. - -It is generated from these files: - github.com/m3db/m3/src/cluster/generated/proto/commonpb/common.proto - -It has these top-level messages: - BoolProto - Float64Proto - Int64Proto - StringArrayProto - StringProto -*/ package commonpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import binary "encoding/binary" - -import io "io" +import ( + encoding_binary "encoding/binary" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -53,16 +41,44 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type BoolProto struct { Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` } -func (m *BoolProto) Reset() { *m = BoolProto{} } -func (m *BoolProto) String() string { return proto.CompactTextString(m) } -func (*BoolProto) ProtoMessage() {} -func (*BoolProto) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{0} } +func (m *BoolProto) Reset() { *m = BoolProto{} } +func (m *BoolProto) String() string { return proto.CompactTextString(m) } +func (*BoolProto) ProtoMessage() {} +func (*BoolProto) Descriptor() ([]byte, []int) { + return fileDescriptor_1594a7b1ddcc7796, []int{0} +} +func (m *BoolProto) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BoolProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BoolProto.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 *BoolProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoolProto.Merge(m, src) +} +func (m *BoolProto) XXX_Size() int { + return m.Size() +} +func (m *BoolProto) XXX_DiscardUnknown() { + xxx_messageInfo_BoolProto.DiscardUnknown(m) +} + +var xxx_messageInfo_BoolProto proto.InternalMessageInfo func (m *BoolProto) GetValue() bool { if m != nil { @@ -75,10 +91,38 @@ type Float64Proto struct { Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` } -func (m *Float64Proto) Reset() { *m = Float64Proto{} } -func (m *Float64Proto) String() string { return proto.CompactTextString(m) } -func (*Float64Proto) ProtoMessage() {} -func (*Float64Proto) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{1} } +func (m *Float64Proto) Reset() { *m = Float64Proto{} } +func (m *Float64Proto) String() string { return proto.CompactTextString(m) } +func (*Float64Proto) ProtoMessage() {} +func (*Float64Proto) Descriptor() ([]byte, []int) { + return fileDescriptor_1594a7b1ddcc7796, []int{1} +} +func (m *Float64Proto) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Float64Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Float64Proto.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 *Float64Proto) XXX_Merge(src proto.Message) { + xxx_messageInfo_Float64Proto.Merge(m, src) +} +func (m *Float64Proto) XXX_Size() int { + return m.Size() +} +func (m *Float64Proto) XXX_DiscardUnknown() { + xxx_messageInfo_Float64Proto.DiscardUnknown(m) +} + +var xxx_messageInfo_Float64Proto proto.InternalMessageInfo func (m *Float64Proto) GetValue() float64 { if m != nil { @@ -91,10 +135,38 @@ type Int64Proto struct { Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` } -func (m *Int64Proto) Reset() { *m = Int64Proto{} } -func (m *Int64Proto) String() string { return proto.CompactTextString(m) } -func (*Int64Proto) ProtoMessage() {} -func (*Int64Proto) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{2} } +func (m *Int64Proto) Reset() { *m = Int64Proto{} } +func (m *Int64Proto) String() string { return proto.CompactTextString(m) } +func (*Int64Proto) ProtoMessage() {} +func (*Int64Proto) Descriptor() ([]byte, []int) { + return fileDescriptor_1594a7b1ddcc7796, []int{2} +} +func (m *Int64Proto) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Int64Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Int64Proto.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 *Int64Proto) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int64Proto.Merge(m, src) +} +func (m *Int64Proto) XXX_Size() int { + return m.Size() +} +func (m *Int64Proto) XXX_DiscardUnknown() { + xxx_messageInfo_Int64Proto.DiscardUnknown(m) +} + +var xxx_messageInfo_Int64Proto proto.InternalMessageInfo func (m *Int64Proto) GetValue() int64 { if m != nil { @@ -104,13 +176,41 @@ func (m *Int64Proto) GetValue() int64 { } type StringArrayProto struct { - Values []string `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"` + Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (m *StringArrayProto) Reset() { *m = StringArrayProto{} } +func (m *StringArrayProto) String() string { return proto.CompactTextString(m) } +func (*StringArrayProto) ProtoMessage() {} +func (*StringArrayProto) Descriptor() ([]byte, []int) { + return fileDescriptor_1594a7b1ddcc7796, []int{3} +} +func (m *StringArrayProto) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StringArrayProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StringArrayProto.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 *StringArrayProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_StringArrayProto.Merge(m, src) +} +func (m *StringArrayProto) XXX_Size() int { + return m.Size() +} +func (m *StringArrayProto) XXX_DiscardUnknown() { + xxx_messageInfo_StringArrayProto.DiscardUnknown(m) } -func (m *StringArrayProto) Reset() { *m = StringArrayProto{} } -func (m *StringArrayProto) String() string { return proto.CompactTextString(m) } -func (*StringArrayProto) ProtoMessage() {} -func (*StringArrayProto) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{3} } +var xxx_messageInfo_StringArrayProto proto.InternalMessageInfo func (m *StringArrayProto) GetValues() []string { if m != nil { @@ -123,10 +223,38 @@ type StringProto struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (m *StringProto) Reset() { *m = StringProto{} } -func (m *StringProto) String() string { return proto.CompactTextString(m) } -func (*StringProto) ProtoMessage() {} -func (*StringProto) Descriptor() ([]byte, []int) { return fileDescriptorCommon, []int{4} } +func (m *StringProto) Reset() { *m = StringProto{} } +func (m *StringProto) String() string { return proto.CompactTextString(m) } +func (*StringProto) ProtoMessage() {} +func (*StringProto) Descriptor() ([]byte, []int) { + return fileDescriptor_1594a7b1ddcc7796, []int{4} +} +func (m *StringProto) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StringProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StringProto.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 *StringProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_StringProto.Merge(m, src) +} +func (m *StringProto) XXX_Size() int { + return m.Size() +} +func (m *StringProto) XXX_DiscardUnknown() { + xxx_messageInfo_StringProto.DiscardUnknown(m) +} + +var xxx_messageInfo_StringProto proto.InternalMessageInfo func (m *StringProto) GetValue() string { if m != nil { @@ -142,10 +270,33 @@ func init() { proto.RegisterType((*StringArrayProto)(nil), "commonpb.StringArrayProto") proto.RegisterType((*StringProto)(nil), "commonpb.StringProto") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/commonpb/common.proto", fileDescriptor_1594a7b1ddcc7796) +} + +var fileDescriptor_1594a7b1ddcc7796 = []byte{ + // 219 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x49, 0xcf, 0x2c, 0xc9, + 0x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0x89, 0x0d, 0xec, 0x51, 0x63, 0x40, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xb1, 0xc6, 0x29, 0x89, 0x30, 0x01, 0x00, 0x00, +} + func (m *BoolProto) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -153,27 +304,32 @@ func (m *BoolProto) Marshal() (dAtA []byte, err error) { } func (m *BoolProto) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BoolProto) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Value { - dAtA[i] = 0x8 - i++ + i-- if m.Value { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Float64Proto) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -181,23 +337,28 @@ func (m *Float64Proto) Marshal() (dAtA []byte, err error) { } func (m *Float64Proto) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Float64Proto) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) + i-- dAtA[i] = 0x9 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i += 8 } - return i, nil + return len(dAtA) - i, nil } func (m *Int64Proto) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -205,22 +366,27 @@ func (m *Int64Proto) Marshal() (dAtA []byte, err error) { } func (m *Int64Proto) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Int64Proto) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Value != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintCommon(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *StringArrayProto) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -228,32 +394,31 @@ func (m *StringArrayProto) Marshal() (dAtA []byte, err error) { } func (m *StringArrayProto) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StringArrayProto) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Values) > 0 { - for _, s := range m.Values { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Values[iNdEx]) + copy(dAtA[i:], m.Values[iNdEx]) + i = encodeVarintCommon(dAtA, i, uint64(len(m.Values[iNdEx]))) + i-- dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - return i, nil + return len(dAtA) - i, nil } func (m *StringProto) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -261,29 +426,40 @@ func (m *StringProto) Marshal() (dAtA []byte, err error) { } func (m *StringProto) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StringProto) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Value) > 0 { - dAtA[i] = 0xa - i++ + i -= len(m.Value) + copy(dAtA[i:], m.Value) i = encodeVarintCommon(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintCommon(dAtA []byte, offset int, v uint64) int { + offset -= sovCommon(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *BoolProto) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Value { @@ -293,6 +469,9 @@ func (m *BoolProto) Size() (n int) { } func (m *Float64Proto) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Value != 0 { @@ -302,6 +481,9 @@ func (m *Float64Proto) Size() (n int) { } func (m *Int64Proto) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Value != 0 { @@ -311,6 +493,9 @@ func (m *Int64Proto) Size() (n int) { } func (m *StringArrayProto) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Values) > 0 { @@ -323,6 +508,9 @@ func (m *StringArrayProto) Size() (n int) { } func (m *StringProto) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Value) @@ -333,14 +521,7 @@ func (m *StringProto) Size() (n int) { } func sovCommon(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozCommon(x uint64) (n int) { return sovCommon(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -360,7 +541,7 @@ func (m *BoolProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -388,7 +569,7 @@ func (m *BoolProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -400,7 +581,7 @@ func (m *BoolProto) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCommon } if (iNdEx + skippy) > l { @@ -430,7 +611,7 @@ func (m *Float64Proto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -452,7 +633,7 @@ func (m *Float64Proto) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.Value = float64(math.Float64frombits(v)) default: @@ -461,7 +642,7 @@ func (m *Float64Proto) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCommon } if (iNdEx + skippy) > l { @@ -491,7 +672,7 @@ func (m *Int64Proto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -519,7 +700,7 @@ func (m *Int64Proto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Value |= (int64(b) & 0x7F) << shift + m.Value |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -530,7 +711,7 @@ func (m *Int64Proto) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCommon } if (iNdEx + skippy) > l { @@ -560,7 +741,7 @@ func (m *StringArrayProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -588,7 +769,7 @@ func (m *StringArrayProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -598,6 +779,9 @@ func (m *StringArrayProto) Unmarshal(dAtA []byte) error { return ErrInvalidLengthCommon } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommon + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -609,7 +793,7 @@ func (m *StringArrayProto) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCommon } if (iNdEx + skippy) > l { @@ -639,7 +823,7 @@ func (m *StringProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -667,7 +851,7 @@ func (m *StringProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -677,6 +861,9 @@ func (m *StringProto) Unmarshal(dAtA []byte) error { return ErrInvalidLengthCommon } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommon + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -688,7 +875,7 @@ func (m *StringProto) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCommon } if (iNdEx + skippy) > l { @@ -706,6 +893,7 @@ func (m *StringProto) Unmarshal(dAtA []byte) error { func skipCommon(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -737,10 +925,8 @@ func skipCommon(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -757,75 +943,34 @@ func skipCommon(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthCommon } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - 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 := skipCommon(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCommon + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthCommon + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCommon = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCommon = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCommon = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/commonpb/common.proto", fileDescriptorCommon) -} - -var fileDescriptorCommon = []byte{ - // 210 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x49, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, - 0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, - 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x4f, 0xce, 0xcf, 0xcd, 0xcd, - 0xcf, 0x2b, 0x48, 0x82, 0x32, 0xf4, 0xc0, 0xa2, 0x42, 0x1c, 0x30, 0x61, 0x25, 0x45, 0x2e, 0x4e, - 0xa7, 0xfc, 0xfc, 0x9c, 0x00, 0xb0, 0xb0, 0x08, 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04, - 0xa3, 0x02, 0xa3, 0x06, 0x47, 0x10, 0x84, 0xa3, 0xa4, 0xc2, 0xc5, 0xe3, 0x96, 0x93, 0x9f, 0x58, - 0x62, 0x66, 0x82, 0x45, 0x15, 0x23, 0x4c, 0x95, 0x12, 0x17, 0x97, 0x67, 0x1e, 0x76, 0x35, 0xcc, - 0x30, 0x35, 0x5a, 0x5c, 0x02, 0xc1, 0x25, 0x45, 0x99, 0x79, 0xe9, 0x8e, 0x45, 0x45, 0x89, 0x95, - 0x10, 0x95, 0x62, 0x5c, 0x6c, 0x60, 0xc9, 0x62, 0x09, 0x46, 0x05, 0x66, 0x0d, 0xce, 0x20, 0x28, - 0x4f, 0x49, 0x99, 0x8b, 0x1b, 0xa2, 0x16, 0x8b, 0x81, 0x9c, 0x50, 0x03, 0x9d, 0x04, 0x4e, 0x3c, - 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x92, - 0xd8, 0xc0, 0x1e, 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xdf, 0x70, 0x77, 0x28, 0x01, - 0x00, 0x00, -} diff --git a/src/cluster/generated/proto/kvpb/kv.pb.go b/src/cluster/generated/proto/kvpb/kv.pb.go index 88fd5416f8..52403ff847 100644 --- a/src/cluster/generated/proto/kvpb/kv.pb.go +++ b/src/cluster/generated/proto/kvpb/kv.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/cluster/generated/proto/kvpb/kv.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,25 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package kvpb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/cluster/generated/proto/kvpb/kv.proto - - It has these top-level messages: - KeyValueUpdate - KeyValueUpdateResult - QueryLimits - QueryLimit -*/ package kvpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -50,7 +40,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type KeyValueUpdate struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` @@ -58,10 +48,38 @@ type KeyValueUpdate struct { Commit bool `protobuf:"varint,3,opt,name=commit,proto3" json:"commit,omitempty"` } -func (m *KeyValueUpdate) Reset() { *m = KeyValueUpdate{} } -func (m *KeyValueUpdate) String() string { return proto.CompactTextString(m) } -func (*KeyValueUpdate) ProtoMessage() {} -func (*KeyValueUpdate) Descriptor() ([]byte, []int) { return fileDescriptorKv, []int{0} } +func (m *KeyValueUpdate) Reset() { *m = KeyValueUpdate{} } +func (m *KeyValueUpdate) String() string { return proto.CompactTextString(m) } +func (*KeyValueUpdate) ProtoMessage() {} +func (*KeyValueUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_2af26b26e1fde094, []int{0} +} +func (m *KeyValueUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KeyValueUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KeyValueUpdate.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 *KeyValueUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyValueUpdate.Merge(m, src) +} +func (m *KeyValueUpdate) XXX_Size() int { + return m.Size() +} +func (m *KeyValueUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_KeyValueUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyValueUpdate proto.InternalMessageInfo func (m *KeyValueUpdate) GetKey() string { if m != nil { @@ -90,10 +108,38 @@ type KeyValueUpdateResult struct { New string `protobuf:"bytes,3,opt,name=new,proto3" json:"new,omitempty"` } -func (m *KeyValueUpdateResult) Reset() { *m = KeyValueUpdateResult{} } -func (m *KeyValueUpdateResult) String() string { return proto.CompactTextString(m) } -func (*KeyValueUpdateResult) ProtoMessage() {} -func (*KeyValueUpdateResult) Descriptor() ([]byte, []int) { return fileDescriptorKv, []int{1} } +func (m *KeyValueUpdateResult) Reset() { *m = KeyValueUpdateResult{} } +func (m *KeyValueUpdateResult) String() string { return proto.CompactTextString(m) } +func (*KeyValueUpdateResult) ProtoMessage() {} +func (*KeyValueUpdateResult) Descriptor() ([]byte, []int) { + return fileDescriptor_2af26b26e1fde094, []int{1} +} +func (m *KeyValueUpdateResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KeyValueUpdateResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KeyValueUpdateResult.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 *KeyValueUpdateResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyValueUpdateResult.Merge(m, src) +} +func (m *KeyValueUpdateResult) XXX_Size() int { + return m.Size() +} +func (m *KeyValueUpdateResult) XXX_DiscardUnknown() { + xxx_messageInfo_KeyValueUpdateResult.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyValueUpdateResult proto.InternalMessageInfo func (m *KeyValueUpdateResult) GetKey() string { if m != nil { @@ -117,16 +163,44 @@ func (m *KeyValueUpdateResult) GetNew() string { } type QueryLimits struct { - MaxRecentlyQueriedSeriesBlocks *QueryLimit `protobuf:"bytes,1,opt,name=maxRecentlyQueriedSeriesBlocks" json:"maxRecentlyQueriedSeriesBlocks,omitempty"` - MaxRecentlyQueriedSeriesDiskBytesRead *QueryLimit `protobuf:"bytes,2,opt,name=maxRecentlyQueriedSeriesDiskBytesRead" json:"maxRecentlyQueriedSeriesDiskBytesRead,omitempty"` - MaxRecentlyQueriedSeriesDiskRead *QueryLimit `protobuf:"bytes,3,opt,name=maxRecentlyQueriedSeriesDiskRead" json:"maxRecentlyQueriedSeriesDiskRead,omitempty"` - MaxRecentlyQueriedMetadataRead *QueryLimit `protobuf:"bytes,4,opt,name=maxRecentlyQueriedMetadataRead" json:"maxRecentlyQueriedMetadataRead,omitempty"` + MaxRecentlyQueriedSeriesBlocks *QueryLimit `protobuf:"bytes,1,opt,name=maxRecentlyQueriedSeriesBlocks,proto3" json:"maxRecentlyQueriedSeriesBlocks,omitempty"` + MaxRecentlyQueriedSeriesDiskBytesRead *QueryLimit `protobuf:"bytes,2,opt,name=maxRecentlyQueriedSeriesDiskBytesRead,proto3" json:"maxRecentlyQueriedSeriesDiskBytesRead,omitempty"` + MaxRecentlyQueriedSeriesDiskRead *QueryLimit `protobuf:"bytes,3,opt,name=maxRecentlyQueriedSeriesDiskRead,proto3" json:"maxRecentlyQueriedSeriesDiskRead,omitempty"` + MaxRecentlyQueriedMetadataRead *QueryLimit `protobuf:"bytes,4,opt,name=maxRecentlyQueriedMetadataRead,proto3" json:"maxRecentlyQueriedMetadataRead,omitempty"` } -func (m *QueryLimits) Reset() { *m = QueryLimits{} } -func (m *QueryLimits) String() string { return proto.CompactTextString(m) } -func (*QueryLimits) ProtoMessage() {} -func (*QueryLimits) Descriptor() ([]byte, []int) { return fileDescriptorKv, []int{2} } +func (m *QueryLimits) Reset() { *m = QueryLimits{} } +func (m *QueryLimits) String() string { return proto.CompactTextString(m) } +func (*QueryLimits) ProtoMessage() {} +func (*QueryLimits) Descriptor() ([]byte, []int) { + return fileDescriptor_2af26b26e1fde094, []int{2} +} +func (m *QueryLimits) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLimits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLimits.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 *QueryLimits) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLimits.Merge(m, src) +} +func (m *QueryLimits) XXX_Size() int { + return m.Size() +} +func (m *QueryLimits) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLimits.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLimits proto.InternalMessageInfo func (m *QueryLimits) GetMaxRecentlyQueriedSeriesBlocks() *QueryLimit { if m != nil { @@ -163,10 +237,38 @@ type QueryLimit struct { ForceWaited bool `protobuf:"varint,4,opt,name=forceWaited,proto3" json:"forceWaited,omitempty"` } -func (m *QueryLimit) Reset() { *m = QueryLimit{} } -func (m *QueryLimit) String() string { return proto.CompactTextString(m) } -func (*QueryLimit) ProtoMessage() {} -func (*QueryLimit) Descriptor() ([]byte, []int) { return fileDescriptorKv, []int{3} } +func (m *QueryLimit) Reset() { *m = QueryLimit{} } +func (m *QueryLimit) String() string { return proto.CompactTextString(m) } +func (*QueryLimit) ProtoMessage() {} +func (*QueryLimit) Descriptor() ([]byte, []int) { + return fileDescriptor_2af26b26e1fde094, []int{3} +} +func (m *QueryLimit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLimit.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 *QueryLimit) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLimit.Merge(m, src) +} +func (m *QueryLimit) XXX_Size() int { + return m.Size() +} +func (m *QueryLimit) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLimit.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLimit proto.InternalMessageInfo func (m *QueryLimit) GetLimit() int64 { if m != nil { @@ -202,10 +304,44 @@ func init() { proto.RegisterType((*QueryLimits)(nil), "kvpb.QueryLimits") proto.RegisterType((*QueryLimit)(nil), "kvpb.QueryLimit") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/kvpb/kv.proto", fileDescriptor_2af26b26e1fde094) +} + +var fileDescriptor_2af26b26e1fde094 = []byte{ + // 400 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x3d, 0x8f,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0x57, 0xf1, 0x20, 0x3f, 0xf7, + 0x77, 0x3e, 0xf9, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xaf, 0x8e, 0xa0, 0x27, 0x03, 0x00, 0x00, +} + func (m *KeyValueUpdate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -213,39 +349,46 @@ func (m *KeyValueUpdate) Marshal() (dAtA []byte, err error) { } func (m *KeyValueUpdate) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KeyValueUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintKv(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } - if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintKv(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) - } if m.Commit { - dAtA[i] = 0x18 - i++ + i-- if m.Commit { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 } - return i, nil + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintKv(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintKv(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *KeyValueUpdateResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -253,35 +396,43 @@ func (m *KeyValueUpdateResult) Marshal() (dAtA []byte, err error) { } func (m *KeyValueUpdateResult) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KeyValueUpdateResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintKv(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + if len(m.New) > 0 { + i -= len(m.New) + copy(dAtA[i:], m.New) + i = encodeVarintKv(dAtA, i, uint64(len(m.New))) + i-- + dAtA[i] = 0x1a } if len(m.Old) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Old) + copy(dAtA[i:], m.Old) i = encodeVarintKv(dAtA, i, uint64(len(m.Old))) - i += copy(dAtA[i:], m.Old) + i-- + dAtA[i] = 0x12 } - if len(m.New) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintKv(dAtA, i, uint64(len(m.New))) - i += copy(dAtA[i:], m.New) + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintKv(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *QueryLimits) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -289,57 +440,70 @@ func (m *QueryLimits) Marshal() (dAtA []byte, err error) { } func (m *QueryLimits) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLimits) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.MaxRecentlyQueriedSeriesBlocks != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintKv(dAtA, i, uint64(m.MaxRecentlyQueriedSeriesBlocks.Size())) - n1, err := m.MaxRecentlyQueriedSeriesBlocks.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.MaxRecentlyQueriedSeriesDiskBytesRead != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintKv(dAtA, i, uint64(m.MaxRecentlyQueriedSeriesDiskBytesRead.Size())) - n2, err := m.MaxRecentlyQueriedSeriesDiskBytesRead.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.MaxRecentlyQueriedMetadataRead != nil { + { + size, err := m.MaxRecentlyQueriedMetadataRead.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintKv(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0x22 } if m.MaxRecentlyQueriedSeriesDiskRead != nil { + { + size, err := m.MaxRecentlyQueriedSeriesDiskRead.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintKv(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x1a - i++ - i = encodeVarintKv(dAtA, i, uint64(m.MaxRecentlyQueriedSeriesDiskRead.Size())) - n3, err := m.MaxRecentlyQueriedSeriesDiskRead.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if m.MaxRecentlyQueriedSeriesDiskBytesRead != nil { + { + size, err := m.MaxRecentlyQueriedSeriesDiskBytesRead.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintKv(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x12 } - if m.MaxRecentlyQueriedMetadataRead != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintKv(dAtA, i, uint64(m.MaxRecentlyQueriedMetadataRead.Size())) - n4, err := m.MaxRecentlyQueriedMetadataRead.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.MaxRecentlyQueriedSeriesBlocks != nil { + { + size, err := m.MaxRecentlyQueriedSeriesBlocks.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintKv(dAtA, i, uint64(size)) } - i += n4 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *QueryLimit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -347,53 +511,63 @@ func (m *QueryLimit) Marshal() (dAtA []byte, err error) { } func (m *QueryLimit) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLimit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Limit != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintKv(dAtA, i, uint64(m.Limit)) - } - if m.LookbackSeconds != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintKv(dAtA, i, uint64(m.LookbackSeconds)) - } - if m.ForceExceeded { - dAtA[i] = 0x18 - i++ - if m.ForceExceeded { + if m.ForceWaited { + i-- + if m.ForceWaited { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ - } - if m.ForceWaited { + i-- dAtA[i] = 0x20 - i++ - if m.ForceWaited { + } + if m.ForceExceeded { + i-- + if m.ForceExceeded { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 + } + if m.LookbackSeconds != 0 { + i = encodeVarintKv(dAtA, i, uint64(m.LookbackSeconds)) + i-- + dAtA[i] = 0x10 + } + if m.Limit != 0 { + i = encodeVarintKv(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintKv(dAtA []byte, offset int, v uint64) int { + offset -= sovKv(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *KeyValueUpdate) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Key) @@ -411,6 +585,9 @@ func (m *KeyValueUpdate) Size() (n int) { } func (m *KeyValueUpdateResult) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Key) @@ -429,6 +606,9 @@ func (m *KeyValueUpdateResult) Size() (n int) { } func (m *QueryLimits) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.MaxRecentlyQueriedSeriesBlocks != nil { @@ -451,6 +631,9 @@ func (m *QueryLimits) Size() (n int) { } func (m *QueryLimit) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Limit != 0 { @@ -469,14 +652,7 @@ func (m *QueryLimit) Size() (n int) { } func sovKv(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozKv(x uint64) (n int) { return sovKv(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -496,7 +672,7 @@ func (m *KeyValueUpdate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -524,7 +700,7 @@ func (m *KeyValueUpdate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -534,6 +710,9 @@ func (m *KeyValueUpdate) Unmarshal(dAtA []byte) error { return ErrInvalidLengthKv } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKv + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -553,7 +732,7 @@ func (m *KeyValueUpdate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -563,6 +742,9 @@ func (m *KeyValueUpdate) Unmarshal(dAtA []byte) error { return ErrInvalidLengthKv } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKv + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -582,7 +764,7 @@ func (m *KeyValueUpdate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -594,7 +776,7 @@ func (m *KeyValueUpdate) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthKv } if (iNdEx + skippy) > l { @@ -624,7 +806,7 @@ func (m *KeyValueUpdateResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -652,7 +834,7 @@ func (m *KeyValueUpdateResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -662,6 +844,9 @@ func (m *KeyValueUpdateResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthKv } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKv + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -681,7 +866,7 @@ func (m *KeyValueUpdateResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -691,6 +876,9 @@ func (m *KeyValueUpdateResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthKv } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKv + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -710,7 +898,7 @@ func (m *KeyValueUpdateResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -720,6 +908,9 @@ func (m *KeyValueUpdateResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthKv } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKv + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -731,7 +922,7 @@ func (m *KeyValueUpdateResult) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthKv } if (iNdEx + skippy) > l { @@ -761,7 +952,7 @@ func (m *QueryLimits) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -789,7 +980,7 @@ func (m *QueryLimits) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -798,6 +989,9 @@ func (m *QueryLimits) Unmarshal(dAtA []byte) error { return ErrInvalidLengthKv } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthKv + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -822,7 +1016,7 @@ func (m *QueryLimits) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -831,6 +1025,9 @@ func (m *QueryLimits) Unmarshal(dAtA []byte) error { return ErrInvalidLengthKv } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthKv + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -855,7 +1052,7 @@ func (m *QueryLimits) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -864,6 +1061,9 @@ func (m *QueryLimits) Unmarshal(dAtA []byte) error { return ErrInvalidLengthKv } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthKv + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -888,7 +1088,7 @@ func (m *QueryLimits) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -897,6 +1097,9 @@ func (m *QueryLimits) Unmarshal(dAtA []byte) error { return ErrInvalidLengthKv } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthKv + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -913,7 +1116,7 @@ func (m *QueryLimits) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthKv } if (iNdEx + skippy) > l { @@ -943,7 +1146,7 @@ func (m *QueryLimit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -971,7 +1174,7 @@ func (m *QueryLimit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Limit |= (int64(b) & 0x7F) << shift + m.Limit |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -990,7 +1193,7 @@ func (m *QueryLimit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LookbackSeconds |= (int64(b) & 0x7F) << shift + m.LookbackSeconds |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1009,7 +1212,7 @@ func (m *QueryLimit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1029,7 +1232,7 @@ func (m *QueryLimit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1041,7 +1244,7 @@ func (m *QueryLimit) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthKv } if (iNdEx + skippy) > l { @@ -1059,6 +1262,7 @@ func (m *QueryLimit) Unmarshal(dAtA []byte) error { func skipKv(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1090,10 +1294,8 @@ func skipKv(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1110,86 +1312,34 @@ func skipKv(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthKv } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKv - } - 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 := skipKv(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupKv + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthKv + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthKv = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowKv = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthKv = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowKv = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupKv = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/kvpb/kv.proto", fileDescriptorKv) -} - -var fileDescriptorKv = []byte{ - // 391 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4d, 0xab, 0xd3, 0x40, - 0x14, 0x35, 0xe6, 0xf9, 0x78, 0xef, 0x16, 0x35, 0x0c, 0x0f, 0xe9, 0x2a, 0x84, 0xa0, 0xd0, 0x55, - 0x06, 0xec, 0xd6, 0x55, 0xd1, 0x95, 0x15, 0x74, 0x8a, 0x1f, 0x0b, 0x37, 0x93, 0x99, 0xdb, 0x1a, - 0x32, 0xc9, 0x94, 0xcc, 0xa4, 0x36, 0xbf, 0xc0, 0xad, 0x0b, 0x7f, 0x94, 0x4b, 0x7f, 0x82, 0xd4, - 0x3f, 0x22, 0x33, 0x29, 0xb4, 0x95, 0xd6, 0x76, 0x13, 0xee, 0x39, 0xb9, 0xe7, 0xdc, 0x3b, 0x87, - 0x0b, 0x2f, 0x16, 0x85, 0xfd, 0xd2, 0xe6, 0x99, 0xd0, 0x15, 0xad, 0xc6, 0x32, 0xa7, 0xd5, 0x98, - 0x9a, 0x46, 0x50, 0xa1, 0x5a, 0x63, 0xb1, 0xa1, 0x0b, 0xac, 0xb1, 0xe1, 0x16, 0x25, 0x5d, 0x36, - 0xda, 0x6a, 0x5a, 0xae, 0x96, 0x39, 0x2d, 0x57, 0x99, 0x47, 0xe4, 0xca, 0xc1, 0xf4, 0x2d, 0x3c, - 0x7a, 0x8d, 0xdd, 0x07, 0xae, 0x5a, 0x7c, 0xbf, 0x94, 0xdc, 0x22, 0x89, 0x20, 0x2c, 0x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 0x64, 0xff, 0xd2, 0xe4, 0x29, 0x3c, 0x9c, 0xeb, 0x46, 0xe0, 0xab, 0xb5, - 0x40, 0x94, 0x28, 0xb7, 0x57, 0x74, 0x48, 0x92, 0x04, 0x06, 0x9e, 0xf8, 0xc8, 0x0b, 0x8b, 0xfd, - 0xee, 0x37, 0x6c, 0x9f, 0x9a, 0x44, 0x3f, 0x37, 0x71, 0xf0, 0x6b, 0x13, 0x07, 0xbf, 0x37, 0x71, - 0xf0, 0xfd, 0x4f, 0x7c, 0x2f, 0xbf, 0xf6, 0xf7, 0x3d, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x1c, - 0x39, 0x9e, 0xf7, 0x1f, 0x03, 0x00, 0x00, -} diff --git a/src/cluster/generated/proto/kvtest/kvtest.pb.go b/src/cluster/generated/proto/kvtest/kvtest.pb.go index 88232ec873..6f10ca3929 100644 --- a/src/cluster/generated/proto/kvtest/kvtest.pb.go +++ b/src/cluster/generated/proto/kvtest/kvtest.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/cluster/generated/proto/kvtest/kvtest.proto -// Copyright (c) 2023 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,22 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* -Package kvtest is a generated protocol buffer package. - -It is generated from these files: - github.com/m3db/m3/src/cluster/generated/proto/kvtest/kvtest.proto - -It has these top-level messages: - Foo -*/ package kvtest -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -47,16 +40,44 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Foo struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` } -func (m *Foo) Reset() { *m = Foo{} } -func (m *Foo) String() string { return proto.CompactTextString(m) } -func (*Foo) ProtoMessage() {} -func (*Foo) Descriptor() ([]byte, []int) { return fileDescriptorKvtest, []int{0} } +func (m *Foo) Reset() { *m = Foo{} } +func (m *Foo) String() string { return proto.CompactTextString(m) } +func (*Foo) ProtoMessage() {} +func (*Foo) Descriptor() ([]byte, []int) { + return fileDescriptor_2e110d807cf2bb90, []int{0} +} +func (m *Foo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Foo.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 *Foo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Foo.Merge(m, src) +} +func (m *Foo) XXX_Size() int { + return m.Size() +} +func (m *Foo) XXX_DiscardUnknown() { + xxx_messageInfo_Foo.DiscardUnknown(m) +} + +var xxx_messageInfo_Foo proto.InternalMessageInfo func (m *Foo) GetMsg() string { if m != nil { @@ -68,10 +89,28 @@ func (m *Foo) GetMsg() string { func init() { proto.RegisterType((*Foo)(nil), "kvtest.Foo") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/kvtest/kvtest.proto", fileDescriptor_2e110d807cf2bb90) +} + +var fileDescriptor_2e110d807cf2bb90 = []byte{ + // 143 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4a, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, + 0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, + 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0xcf, 0x2e, 0x2b, 0x49, 0x2d, + 0x2e, 0x81, 0x52, 0x7a, 0x60, 0x31, 0x21, 0x36, 0x08, 0x4f, 0x49, 0x9c, 0x8b, 0xd9, 0x2d, 0x3f, + 0x5f, 0x48, 0x80, 0x8b, 0x39, 0xb7, 0x38, 0x5d, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc4, + 0x74, 0x92, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, + 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x24, 0x36, 0xb0, 0x09, + 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x49, 0x64, 0xce, 0xb5, 0x87, 0x00, 0x00, 0x00, +} + func (m *Foo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -79,29 +118,40 @@ func (m *Foo) Marshal() (dAtA []byte, err error) { } func (m *Foo) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Foo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Msg) > 0 { - dAtA[i] = 0xa - i++ + i -= len(m.Msg) + copy(dAtA[i:], m.Msg) i = encodeVarintKvtest(dAtA, i, uint64(len(m.Msg))) - i += copy(dAtA[i:], m.Msg) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintKvtest(dAtA []byte, offset int, v uint64) int { + offset -= sovKvtest(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Foo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Msg) @@ -112,14 +162,7 @@ func (m *Foo) Size() (n int) { } func sovKvtest(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozKvtest(x uint64) (n int) { return sovKvtest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -139,7 +182,7 @@ func (m *Foo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -167,7 +210,7 @@ func (m *Foo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -177,6 +220,9 @@ func (m *Foo) Unmarshal(dAtA []byte) error { return ErrInvalidLengthKvtest } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKvtest + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -188,7 +234,7 @@ func (m *Foo) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthKvtest } if (iNdEx + skippy) > l { @@ -206,6 +252,7 @@ func (m *Foo) Unmarshal(dAtA []byte) error { func skipKvtest(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -237,10 +284,8 @@ func skipKvtest(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -257,70 +302,34 @@ func skipKvtest(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthKvtest } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKvtest - } - 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 := skipKvtest(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupKvtest + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthKvtest + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthKvtest = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowKvtest = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthKvtest = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowKvtest = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupKvtest = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/kvtest/kvtest.proto", fileDescriptorKvtest) -} - -var fileDescriptorKvtest = []byte{ - // 134 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4a, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, - 0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, - 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0xcf, 0x2e, 0x2b, 0x49, 0x2d, - 0x2e, 0x81, 0x52, 0x7a, 0x60, 0x31, 0x21, 0x36, 0x08, 0x4f, 0x49, 0x9c, 0x8b, 0xd9, 0x2d, 0x3f, - 0x5f, 0x48, 0x80, 0x8b, 0x39, 0xb7, 0x38, 0x5d, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc4, - 0x74, 0x12, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, - 0x3c, 0x96, 0x63, 0x48, 0x62, 0x03, 0xeb, 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x63, - 0xbf, 0x2b, 0x7f, 0x00, 0x00, 0x00, -} diff --git a/src/cluster/generated/proto/metadatapb/metadata.pb.go b/src/cluster/generated/proto/metadatapb/metadata.pb.go index 8691637e62..e1215ce495 100644 --- a/src/cluster/generated/proto/metadatapb/metadata.pb.go +++ b/src/cluster/generated/proto/metadatapb/metadata.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/cluster/generated/proto/metadatapb/metadata.proto -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,22 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package metadatapb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/cluster/generated/proto/metadatapb/metadata.proto - - It has these top-level messages: - Metadata -*/ package metadatapb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -47,7 +40,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Metadata struct { Port uint32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"` @@ -55,10 +48,38 @@ type Metadata struct { HeartbeatInterval int64 `protobuf:"varint,3,opt,name=heartbeat_interval,json=heartbeatInterval,proto3" json:"heartbeat_interval,omitempty"` } -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { return fileDescriptorMetadata, []int{0} } +func (m *Metadata) Reset() { *m = Metadata{} } +func (m *Metadata) String() string { return proto.CompactTextString(m) } +func (*Metadata) ProtoMessage() {} +func (*Metadata) Descriptor() ([]byte, []int) { + return fileDescriptor_6dbfdc78a0800db8, []int{0} +} +func (m *Metadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metadata.Merge(m, src) +} +func (m *Metadata) XXX_Size() int { + return m.Size() +} +func (m *Metadata) XXX_DiscardUnknown() { + xxx_messageInfo_Metadata.DiscardUnknown(m) +} + +var xxx_messageInfo_Metadata proto.InternalMessageInfo func (m *Metadata) GetPort() uint32 { if m != nil { @@ -84,10 +105,32 @@ func (m *Metadata) GetHeartbeatInterval() int64 { func init() { proto.RegisterType((*Metadata)(nil), "metadatapb.Metadata") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/metadatapb/metadata.proto", fileDescriptor_6dbfdc78a0800db8) +} + +var fileDescriptor_6dbfdc78a0800db8 = []byte{ + // 204 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0x48, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, + 0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, + 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0xcf, 0x4d, 0x2d, 0x49, 0x4c, + 0x49, 0x2c, 0x49, 0x2c, 0x48, 0x82, 0x33, 0xf5, 0xc0, 0x32, 0x42, 0x5c, 0x08, 0x29, 0xa5, 0x2a, + 0x2e, 0x0e, 0x5f, 0x28, 0x4f, 0x48, 0x88, 0x8b, 0xa5, 0x20, 0xbf, 0xa8, 0x44, 0x82, 0x51, 0x81, + 0x51, 0x83, 0x37, 0x08, 0xcc, 0x16, 0xd2, 0xe6, 0x12, 0xcc, 0xc9, 0x2c, 0x4b, 0xcd, 0x4b, 0x2d, + 0x2e, 0x8e, 0xcf, 0xcc, 0x2b, 0x49, 0x2d, 0x2a, 0x4b, 0xcc, 0x91, 0x60, 0x52, 0x60, 0xd4, 0x60, + 0x0e, 0x12, 0x80, 0x49, 0x78, 0x42, 0xc5, 0x85, 0x74, 0xb9, 0x84, 0x32, 0x52, 0x13, 0x8b, 0x4a, + 0x92, 0x52, 0x13, 0x4b, 0x10, 0xaa, 0x99, 0xc1, 0xaa, 0x05, 0xe1, 0x32, 0x30, 0xe5, 0x4e, 0x12, + 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, + 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x90, 0xc4, 0x06, 0x76, 0xa8, 0x31, 0x20, + 0x00, 0x00, 0xff, 0xff, 0x7e, 0x90, 0x38, 0x2b, 0xf4, 0x00, 0x00, 0x00, +} + func (m *Metadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -95,38 +138,48 @@ func (m *Metadata) Marshal() (dAtA []byte, err error) { } func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Port != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.Port)) + if m.HeartbeatInterval != 0 { + i = encodeVarintMetadata(dAtA, i, uint64(m.HeartbeatInterval)) + i-- + dAtA[i] = 0x18 } if m.LivenessInterval != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintMetadata(dAtA, i, uint64(m.LivenessInterval)) + i-- + dAtA[i] = 0x10 } - if m.HeartbeatInterval != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.HeartbeatInterval)) + if m.Port != 0 { + i = encodeVarintMetadata(dAtA, i, uint64(m.Port)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintMetadata(dAtA []byte, offset int, v uint64) int { + offset -= sovMetadata(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Metadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Port != 0 { @@ -142,14 +195,7 @@ func (m *Metadata) Size() (n int) { } func sovMetadata(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozMetadata(x uint64) (n int) { return sovMetadata(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -169,7 +215,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -197,7 +243,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Port |= (uint32(b) & 0x7F) << shift + m.Port |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -216,7 +262,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LivenessInterval |= (int64(b) & 0x7F) << shift + m.LivenessInterval |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -235,7 +281,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HeartbeatInterval |= (int64(b) & 0x7F) << shift + m.HeartbeatInterval |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -246,7 +292,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMetadata } if (iNdEx + skippy) > l { @@ -264,6 +310,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { func skipMetadata(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -295,10 +342,8 @@ func skipMetadata(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -315,74 +360,34 @@ func skipMetadata(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthMetadata } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetadata - } - 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 := skipMetadata(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMetadata + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthMetadata + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthMetadata = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetadata = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthMetadata = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMetadata = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMetadata = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/metadatapb/metadata.proto", fileDescriptorMetadata) -} - -var fileDescriptorMetadata = []byte{ - // 196 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0x48, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, - 0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, - 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0xcf, 0x4d, 0x2d, 0x49, 0x4c, - 0x49, 0x2c, 0x49, 0x2c, 0x48, 0x82, 0x33, 0xf5, 0xc0, 0x32, 0x42, 0x5c, 0x08, 0x29, 0xa5, 0x2a, - 0x2e, 0x0e, 0x5f, 0x28, 0x4f, 0x48, 0x88, 0x8b, 0xa5, 0x20, 0xbf, 0xa8, 0x44, 0x82, 0x51, 0x81, - 0x51, 0x83, 0x37, 0x08, 0xcc, 0x16, 0xd2, 0xe6, 0x12, 0xcc, 0xc9, 0x2c, 0x4b, 0xcd, 0x4b, 0x2d, - 0x2e, 0x8e, 0xcf, 0xcc, 0x2b, 0x49, 0x2d, 0x2a, 0x4b, 0xcc, 0x91, 0x60, 0x52, 0x60, 0xd4, 0x60, - 0x0e, 0x12, 0x80, 0x49, 0x78, 0x42, 0xc5, 0x85, 0x74, 0xb9, 0x84, 0x32, 0x52, 0x13, 0x8b, 0x4a, - 0x92, 0x52, 0x13, 0x4b, 0x10, 0xaa, 0x99, 0xc1, 0xaa, 0x05, 0xe1, 0x32, 0x30, 0xe5, 0x4e, 0x02, - 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, - 0x0c, 0x49, 0x6c, 0x60, 0x07, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x60, 0x70, 0xca, 0x29, - 0xec, 0x00, 0x00, 0x00, -} diff --git a/src/cluster/generated/proto/placementpb/placement.pb.go b/src/cluster/generated/proto/placementpb/placement.pb.go index 263fbc2954..f3619f854d 100644 --- a/src/cluster/generated/proto/placementpb/placement.pb.go +++ b/src/cluster/generated/proto/placementpb/placement.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/cluster/generated/proto/placementpb/placement.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,28 +21,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package placementpb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/cluster/generated/proto/placementpb/placement.proto - - It has these top-level messages: - Placement - Instance - InstanceMetadata - Shard - PlacementSnapshots - Options -*/ package placementpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/gogo/protobuf/types" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -53,7 +41,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ShardState int32 @@ -68,6 +56,7 @@ var ShardState_name = map[int32]string{ 1: "AVAILABLE", 2: "LEAVING", } + var ShardState_value = map[string]int32{ "INITIALIZING": 0, "AVAILABLE": 1, @@ -77,7 +66,10 @@ var ShardState_value = map[string]int32{ func (x ShardState) String() string { return proto.EnumName(ShardState_name, int32(x)) } -func (ShardState) EnumDescriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{0} } + +func (ShardState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_49f8390e6e800fd6, []int{0} +} type CompressMode int32 @@ -90,6 +82,7 @@ var CompressMode_name = map[int32]string{ 0: "NONE", 1: "ZSTD", } + var CompressMode_value = map[string]int32{ "NONE": 0, "ZSTD": 1, @@ -98,10 +91,13 @@ var CompressMode_value = map[string]int32{ func (x CompressMode) String() string { return proto.EnumName(CompressMode_name, int32(x)) } -func (CompressMode) EnumDescriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{1} } + +func (CompressMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_49f8390e6e800fd6, []int{1} +} type Placement struct { - Instances map[string]*Instance `protobuf:"bytes,1,rep,name=instances" json:"instances,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Instances map[string]*Instance `protobuf:"bytes,1,rep,name=instances,proto3" json:"instances,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` ReplicaFactor uint32 `protobuf:"varint,2,opt,name=replica_factor,json=replicaFactor,proto3" json:"replica_factor,omitempty"` NumShards uint32 `protobuf:"varint,3,opt,name=num_shards,json=numShards,proto3" json:"num_shards,omitempty"` IsSharded bool `protobuf:"varint,4,opt,name=is_sharded,json=isSharded,proto3" json:"is_sharded,omitempty"` @@ -115,10 +111,38 @@ type Placement struct { MaxShardSetId uint32 `protobuf:"varint,7,opt,name=max_shard_set_id,json=maxShardSetId,proto3" json:"max_shard_set_id,omitempty"` } -func (m *Placement) Reset() { *m = Placement{} } -func (m *Placement) String() string { return proto.CompactTextString(m) } -func (*Placement) ProtoMessage() {} -func (*Placement) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{0} } +func (m *Placement) Reset() { *m = Placement{} } +func (m *Placement) String() string { return proto.CompactTextString(m) } +func (*Placement) ProtoMessage() {} +func (*Placement) Descriptor() ([]byte, []int) { + return fileDescriptor_49f8390e6e800fd6, []int{0} +} +func (m *Placement) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Placement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Placement.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 *Placement) XXX_Merge(src proto.Message) { + xxx_messageInfo_Placement.Merge(m, src) +} +func (m *Placement) XXX_Size() int { + return m.Size() +} +func (m *Placement) XXX_DiscardUnknown() { + xxx_messageInfo_Placement.DiscardUnknown(m) +} + +var xxx_messageInfo_Placement proto.InternalMessageInfo func (m *Placement) GetInstances() map[string]*Instance { if m != nil { @@ -175,17 +199,45 @@ type Instance struct { Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty"` Weight uint32 `protobuf:"varint,4,opt,name=weight,proto3" json:"weight,omitempty"` Endpoint string `protobuf:"bytes,5,opt,name=endpoint,proto3" json:"endpoint,omitempty"` - Shards []*Shard `protobuf:"bytes,6,rep,name=shards" json:"shards,omitempty"` + Shards []*Shard `protobuf:"bytes,6,rep,name=shards,proto3" json:"shards,omitempty"` ShardSetId uint32 `protobuf:"varint,7,opt,name=shard_set_id,json=shardSetId,proto3" json:"shard_set_id,omitempty"` Hostname string `protobuf:"bytes,8,opt,name=hostname,proto3" json:"hostname,omitempty"` Port uint32 `protobuf:"varint,9,opt,name=port,proto3" json:"port,omitempty"` - Metadata *InstanceMetadata `protobuf:"bytes,10,opt,name=metadata" json:"metadata,omitempty"` + Metadata *InstanceMetadata `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (m *Instance) Reset() { *m = Instance{} } +func (m *Instance) String() string { return proto.CompactTextString(m) } +func (*Instance) ProtoMessage() {} +func (*Instance) Descriptor() ([]byte, []int) { + return fileDescriptor_49f8390e6e800fd6, []int{1} +} +func (m *Instance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Instance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Instance.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 *Instance) XXX_Merge(src proto.Message) { + xxx_messageInfo_Instance.Merge(m, src) +} +func (m *Instance) XXX_Size() int { + return m.Size() +} +func (m *Instance) XXX_DiscardUnknown() { + xxx_messageInfo_Instance.DiscardUnknown(m) } -func (m *Instance) Reset() { *m = Instance{} } -func (m *Instance) String() string { return proto.CompactTextString(m) } -func (*Instance) ProtoMessage() {} -func (*Instance) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{1} } +var xxx_messageInfo_Instance proto.InternalMessageInfo func (m *Instance) GetId() string { if m != nil { @@ -261,10 +313,38 @@ type InstanceMetadata struct { DebugPort uint32 `protobuf:"varint,1,opt,name=debug_port,json=debugPort,proto3" json:"debug_port,omitempty"` } -func (m *InstanceMetadata) Reset() { *m = InstanceMetadata{} } -func (m *InstanceMetadata) String() string { return proto.CompactTextString(m) } -func (*InstanceMetadata) ProtoMessage() {} -func (*InstanceMetadata) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{2} } +func (m *InstanceMetadata) Reset() { *m = InstanceMetadata{} } +func (m *InstanceMetadata) String() string { return proto.CompactTextString(m) } +func (*InstanceMetadata) ProtoMessage() {} +func (*InstanceMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_49f8390e6e800fd6, []int{2} +} +func (m *InstanceMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *InstanceMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_InstanceMetadata.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 *InstanceMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstanceMetadata.Merge(m, src) +} +func (m *InstanceMetadata) XXX_Size() int { + return m.Size() +} +func (m *InstanceMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_InstanceMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_InstanceMetadata proto.InternalMessageInfo func (m *InstanceMetadata) GetDebugPort() uint32 { if m != nil { @@ -286,13 +366,41 @@ type Shard struct { CutoffNanos int64 `protobuf:"varint,5,opt,name=cutoff_nanos,json=cutoffNanos,proto3" json:"cutoff_nanos,omitempty"` // redirect_to_shard_id is used during resharding process. // If set, all the incoming writes will be redirected to the specified shard. - RedirectToShardId *google_protobuf.UInt32Value `protobuf:"bytes,6,opt,name=redirect_to_shard_id,json=redirectToShardId" json:"redirect_to_shard_id,omitempty"` + RedirectToShardId *types.UInt32Value `protobuf:"bytes,6,opt,name=redirect_to_shard_id,json=redirectToShardId,proto3" json:"redirect_to_shard_id,omitempty"` } -func (m *Shard) Reset() { *m = Shard{} } -func (m *Shard) String() string { return proto.CompactTextString(m) } -func (*Shard) ProtoMessage() {} -func (*Shard) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{3} } +func (m *Shard) Reset() { *m = Shard{} } +func (m *Shard) String() string { return proto.CompactTextString(m) } +func (*Shard) ProtoMessage() {} +func (*Shard) Descriptor() ([]byte, []int) { + return fileDescriptor_49f8390e6e800fd6, []int{3} +} +func (m *Shard) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Shard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Shard.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 *Shard) XXX_Merge(src proto.Message) { + xxx_messageInfo_Shard.Merge(m, src) +} +func (m *Shard) XXX_Size() int { + return m.Size() +} +func (m *Shard) XXX_DiscardUnknown() { + xxx_messageInfo_Shard.DiscardUnknown(m) +} + +var xxx_messageInfo_Shard proto.InternalMessageInfo func (m *Shard) GetId() uint32 { if m != nil { @@ -329,7 +437,7 @@ func (m *Shard) GetCutoffNanos() int64 { return 0 } -func (m *Shard) GetRedirectToShardId() *google_protobuf.UInt32Value { +func (m *Shard) GetRedirectToShardId() *types.UInt32Value { if m != nil { return m.RedirectToShardId } @@ -338,16 +446,45 @@ func (m *Shard) GetRedirectToShardId() *google_protobuf.UInt32Value { type PlacementSnapshots struct { // snapshots field is used only when compress_mode == NONE. - Snapshots []*Placement `protobuf:"bytes,1,rep,name=snapshots" json:"snapshots,omitempty"` + Snapshots []*Placement `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"` // Deprecated: Do not use. CompressMode CompressMode `protobuf:"varint,2,opt,name=compress_mode,json=compressMode,proto3,enum=placementpb.CompressMode" json:"compress_mode,omitempty"` CompressedPlacement []byte `protobuf:"bytes,3,opt,name=compressed_placement,json=compressedPlacement,proto3" json:"compressed_placement,omitempty"` } -func (m *PlacementSnapshots) Reset() { *m = PlacementSnapshots{} } -func (m *PlacementSnapshots) String() string { return proto.CompactTextString(m) } -func (*PlacementSnapshots) ProtoMessage() {} -func (*PlacementSnapshots) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{4} } +func (m *PlacementSnapshots) Reset() { *m = PlacementSnapshots{} } +func (m *PlacementSnapshots) String() string { return proto.CompactTextString(m) } +func (*PlacementSnapshots) ProtoMessage() {} +func (*PlacementSnapshots) Descriptor() ([]byte, []int) { + return fileDescriptor_49f8390e6e800fd6, []int{4} +} +func (m *PlacementSnapshots) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementSnapshots.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 *PlacementSnapshots) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementSnapshots.Merge(m, src) +} +func (m *PlacementSnapshots) XXX_Size() int { + return m.Size() +} +func (m *PlacementSnapshots) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementSnapshots.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementSnapshots proto.InternalMessageInfo +// Deprecated: Do not use. func (m *PlacementSnapshots) GetSnapshots() []*Placement { if m != nil { return m.Snapshots @@ -370,23 +507,51 @@ func (m *PlacementSnapshots) GetCompressedPlacement() []byte { } type Options struct { - IsSharded *google_protobuf.BoolValue `protobuf:"bytes,1,opt,name=is_sharded,json=isSharded" json:"is_sharded,omitempty"` - SkipPortMirroring *google_protobuf.BoolValue `protobuf:"bytes,2,opt,name=skip_port_mirroring,json=skipPortMirroring" json:"skip_port_mirroring,omitempty"` + IsSharded *types.BoolValue `protobuf:"bytes,1,opt,name=is_sharded,json=isSharded,proto3" json:"is_sharded,omitempty"` + SkipPortMirroring *types.BoolValue `protobuf:"bytes,2,opt,name=skip_port_mirroring,json=skipPortMirroring,proto3" json:"skip_port_mirroring,omitempty"` } -func (m *Options) Reset() { *m = Options{} } -func (m *Options) String() string { return proto.CompactTextString(m) } -func (*Options) ProtoMessage() {} -func (*Options) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{5} } +func (m *Options) Reset() { *m = Options{} } +func (m *Options) String() string { return proto.CompactTextString(m) } +func (*Options) ProtoMessage() {} +func (*Options) Descriptor() ([]byte, []int) { + return fileDescriptor_49f8390e6e800fd6, []int{5} +} +func (m *Options) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Options) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Options.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 *Options) XXX_Merge(src proto.Message) { + xxx_messageInfo_Options.Merge(m, src) +} +func (m *Options) XXX_Size() int { + return m.Size() +} +func (m *Options) XXX_DiscardUnknown() { + xxx_messageInfo_Options.DiscardUnknown(m) +} -func (m *Options) GetIsSharded() *google_protobuf.BoolValue { +var xxx_messageInfo_Options proto.InternalMessageInfo + +func (m *Options) GetIsSharded() *types.BoolValue { if m != nil { return m.IsSharded } return nil } -func (m *Options) GetSkipPortMirroring() *google_protobuf.BoolValue { +func (m *Options) GetSkipPortMirroring() *types.BoolValue { if m != nil { return m.SkipPortMirroring } @@ -394,19 +559,84 @@ func (m *Options) GetSkipPortMirroring() *google_protobuf.BoolValue { } func init() { + proto.RegisterEnum("placementpb.ShardState", ShardState_name, ShardState_value) + proto.RegisterEnum("placementpb.CompressMode", CompressMode_name, CompressMode_value) proto.RegisterType((*Placement)(nil), "placementpb.Placement") + proto.RegisterMapType((map[string]*Instance)(nil), "placementpb.Placement.InstancesEntry") proto.RegisterType((*Instance)(nil), "placementpb.Instance") proto.RegisterType((*InstanceMetadata)(nil), "placementpb.InstanceMetadata") proto.RegisterType((*Shard)(nil), "placementpb.Shard") proto.RegisterType((*PlacementSnapshots)(nil), "placementpb.PlacementSnapshots") proto.RegisterType((*Options)(nil), "placementpb.Options") - proto.RegisterEnum("placementpb.ShardState", ShardState_name, ShardState_value) - proto.RegisterEnum("placementpb.CompressMode", CompressMode_name, CompressMode_value) } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/placementpb/placement.proto", fileDescriptor_49f8390e6e800fd6) +} + +var fileDescriptor_49f8390e6e800fd6 = []byte{ + // 870 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0x4d, 0x6f, 0x1b, 0x37, + 0x10, 0x35, 0x25, 0x5b, 0xd6, 0x8e, 0x3e, 0xaa, 0x30, 0x69, 0xba, 0x75, 0x1b, 0x55, 0x55, 0x11, + 0x54, 0x70, 0x51, 0x09, 0x91, 0x2f, 0x49, 0x0e, 0x05, 0xe4, 0xd4, 0x0d, 0x36, 0xb0, 0x94, 0x80, + 0x72, 0x7d, 0xc8, 0x65, 0x41, 0xed, 0x52, 0x12, 0x11, 0xed, 0x72, 0x41, 0x72, 0xf3, 0xd1, 0x5f, + 0x91, 0xbf, 0x54, 0xa0, 0x87, 0x1e, 0x73, 0xec, 0xb1, 0xb0, 0x7f, 0x44, 0x81, 0x9e, 0x8a, 0x25, + 0x77, 0xf5, 0xd1, 0x18, 0xb9, 0x71, 0xde, 0xbc, 0x21, 0x87, 0x8f, 0x6f, 0x08, 0xcf, 0x16, 0x5c, + 0x2f, 0xd3, 0x59, 0x3f, 0x10, 0xd1, 0x20, 0x3a, 0x09, 0x67, 0x83, 0xe8, 0x64, 0xa0, 0x64, 0x30, + 0x08, 0x56, 0xa9, 0xd2, 0x4c, 0x0e, 0x16, 0x2c, 0x66, 0x92, 0x6a, 0x16, 0x0e, 0x12, 0x29, 0xb4, + 0x18, 0x24, 0x2b, 0x1a, 0xb0, 0x88, 0xc5, 0x3a, 0x99, 0x6d, 0xd6, 0x7d, 0x93, 0xc3, 0xb5, 0xad, + 0xe4, 0x51, 0x7b, 0x21, 0xc4, 0x62, 0xc5, 0x6c, 0xd9, 0x2c, 0x9d, 0x0f, 0xde, 0x48, 0x9a, 0x24, + 0x4c, 0x2a, 0x4b, 0xee, 0xfe, 0x53, 0x02, 0xe7, 0x45, 0xc1, 0xc7, 0x4f, 0xc0, 0xe1, 0xb1, 0xd2, + 0x34, 0x0e, 0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d, 0x2c, 0xe7, 0x71, 0xe9, 0x21, 0xea, 0xfe, 0x51, 0x82, + 0x6a, 0x81, 0xe3, 0x26, 0x94, 0x78, 0x98, 0x6f, 0x57, 0xe2, 0x59, 0x6b, 0x9f, 0x71, 0x25, 0x56, + 0x54, 0x73, 0x11, 0xfb, 0x0b, 0x29, 0xd2, 0xc4, 0xec, 0xeb, 0x90, 0xe6, 0x1a, 0x7e, 0x9a, 0xa1, + 0x18, 0xc3, 0xfe, 0x6f, 0x22, 0x66, 0x46, 0x3f, 0x87, 0x98, 0x35, 0xbe, 0x0b, 0x95, 0x37, 0x8c, + 0x2f, 0x96, 0xda, 0xc8, 0xd6, 0x20, 0x79, 0x84, 0x8f, 0xa0, 0xca, 0xe2, 0x30, 0x11, 0x3c, 0xd6, + 0x46, 0x2f, 0x87, 0xac, 0x63, 0x7c, 0x0c, 0x95, 0xfc, 0x25, 0x2a, 0xe6, 0xd9, 0xf1, 0x4e, 0xff, + 0x46, 0x0b, 0x92, 0x33, 0x70, 0x07, 0xea, 0x37, 0x68, 0x06, 0x6a, 0x2d, 0x58, 0x76, 0xd2, 0x52, + 0x28, 0x1d, 0xd3, 0x88, 0xb9, 0x55, 0x7b, 0x52, 0x11, 0x67, 0x1d, 0x27, 0x42, 0x6a, 0xd7, 0x31, + 0x55, 0x66, 0x8d, 0x1f, 0x41, 0x35, 0x62, 0x9a, 0x86, 0x54, 0x53, 0x17, 0x8c, 0x7e, 0xf7, 0x6e, + 0xd4, 0x6f, 0x9c, 0x93, 0xc8, 0x9a, 0xde, 0x7d, 0x00, 0xad, 0xff, 0x67, 0x33, 0xef, 0x84, 0x6c, + 0x96, 0x2e, 0x7c, 0x73, 0x10, 0xb2, 0xd6, 0x32, 0xc8, 0x0b, 0x21, 0x75, 0xf7, 0x5f, 0x04, 0x07, + 0xe6, 0x46, 0x5b, 0xb2, 0x37, 0x8c, 0xec, 0x3f, 0xc2, 0x81, 0xd2, 0x54, 0xdb, 0x47, 0x6c, 0x0e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xa3, 0x8f, 0x44, 0x39, 0x15, 0x62, 0x65, 0x25, 0xd9, 0xfa, + 0x43, 0x9e, 0xc1, 0x6d, 0xf5, 0x8a, 0x27, 0xc6, 0x25, 0xf9, 0x3f, 0xc1, 0xe3, 0x45, 0x3e, 0xc0, + 0x9f, 0xda, 0xe3, 0x56, 0x56, 0x96, 0x59, 0x69, 0x5c, 0x14, 0x1d, 0x3f, 0x06, 0xd8, 0xf8, 0x03, + 0xb7, 0xa0, 0xee, 0x4d, 0xbc, 0x0b, 0x6f, 0x74, 0xee, 0xbd, 0xf4, 0x26, 0x4f, 0x5b, 0x7b, 0xb8, + 0x01, 0xce, 0xe8, 0x72, 0xe4, 0x9d, 0x8f, 0x4e, 0xcf, 0xcf, 0x5a, 0x08, 0xd7, 0xe0, 0xf0, 0xfc, + 0x6c, 0x74, 0x99, 0xe5, 0x4a, 0xc7, 0x5d, 0xa8, 0x6f, 0xeb, 0x83, 0xab, 0xb0, 0x3f, 0x79, 0x3e, + 0x39, 0x6b, 0xed, 0x65, 0xab, 0x97, 0xd3, 0x8b, 0x9f, 0x5b, 0xe8, 0xd4, 0xfd, 0xf3, 0xaa, 0x8d, + 0x3e, 0x5c, 0xb5, 0xd1, 0xdf, 0x57, 0x6d, 0xf4, 0xfe, 0xba, 0xbd, 0xf7, 0xe1, 0xba, 0xbd, 0xf7, + 0xd7, 0x75, 0x7b, 0x6f, 0x56, 0x31, 0x0d, 0x9e, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x8e, + 0xf0, 0x70, 0x43, 0x06, 0x00, 0x00, +} + func (m *Placement) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -414,85 +644,88 @@ func (m *Placement) Marshal() (dAtA []byte, err error) { } func (m *Placement) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Placement) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Instances) > 0 { - for k, _ := range m.Instances { - dAtA[i] = 0xa - i++ - v := m.Instances[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovPlacement(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovPlacement(uint64(len(k))) + msgSize - i = encodeVarintPlacement(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintPlacement(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(v.Size())) - n1, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - } - if m.ReplicaFactor != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.ReplicaFactor)) - } - if m.NumShards != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.NumShards)) + if m.MaxShardSetId != 0 { + i = encodeVarintPlacement(dAtA, i, uint64(m.MaxShardSetId)) + i-- + dAtA[i] = 0x38 } - if m.IsSharded { - dAtA[i] = 0x20 - i++ - if m.IsSharded { + if m.IsMirrored { + i-- + if m.IsMirrored { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x30 } if m.CutoverTime != 0 { - dAtA[i] = 0x28 - i++ i = encodeVarintPlacement(dAtA, i, uint64(m.CutoverTime)) + i-- + dAtA[i] = 0x28 } - if m.IsMirrored { - dAtA[i] = 0x30 - i++ - if m.IsMirrored { + if m.IsSharded { + i-- + if m.IsSharded { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x20 } - if m.MaxShardSetId != 0 { - dAtA[i] = 0x38 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.MaxShardSetId)) + if m.NumShards != 0 { + i = encodeVarintPlacement(dAtA, i, uint64(m.NumShards)) + i-- + dAtA[i] = 0x18 + } + if m.ReplicaFactor != 0 { + i = encodeVarintPlacement(dAtA, i, uint64(m.ReplicaFactor)) + i-- + dAtA[i] = 0x10 + } + if len(m.Instances) > 0 { + for k := range m.Instances { + v := m.Instances[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintPlacement(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintPlacement(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *Instance) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -500,84 +733,98 @@ func (m *Instance) Marshal() (dAtA []byte, err error) { } func (m *Instance) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Instance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPlacement(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if len(m.IsolationGroup) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(len(m.IsolationGroup))) - i += copy(dAtA[i:], m.IsolationGroup) - } - if len(m.Zone) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintPlacement(dAtA, i, uint64(len(m.Zone))) - i += copy(dAtA[i:], m.Zone) - } - if m.Weight != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.Weight)) - } - if len(m.Endpoint) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintPlacement(dAtA, i, uint64(len(m.Endpoint))) - i += copy(dAtA[i:], m.Endpoint) - } - if len(m.Shards) > 0 { - for _, msg := range m.Shards { - dAtA[i] = 0x32 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x52 } - if m.ShardSetId != 0 { - dAtA[i] = 0x38 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.ShardSetId)) + if m.Port != 0 { + i = encodeVarintPlacement(dAtA, i, uint64(m.Port)) + i-- + dAtA[i] = 0x48 } if len(m.Hostname) > 0 { - dAtA[i] = 0x42 - i++ + i -= len(m.Hostname) + copy(dAtA[i:], m.Hostname) i = encodeVarintPlacement(dAtA, i, uint64(len(m.Hostname))) - i += copy(dAtA[i:], m.Hostname) + i-- + dAtA[i] = 0x42 } - if m.Port != 0 { - dAtA[i] = 0x48 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.Port)) + if m.ShardSetId != 0 { + i = encodeVarintPlacement(dAtA, i, uint64(m.ShardSetId)) + i-- + dAtA[i] = 0x38 } - if m.Metadata != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.Metadata.Size())) - n2, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Shards) > 0 { + for iNdEx := len(m.Shards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Shards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 } - i += n2 } - return i, nil + if len(m.Endpoint) > 0 { + i -= len(m.Endpoint) + copy(dAtA[i:], m.Endpoint) + i = encodeVarintPlacement(dAtA, i, uint64(len(m.Endpoint))) + i-- + dAtA[i] = 0x2a + } + if m.Weight != 0 { + i = encodeVarintPlacement(dAtA, i, uint64(m.Weight)) + i-- + dAtA[i] = 0x20 + } + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintPlacement(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0x1a + } + if len(m.IsolationGroup) > 0 { + i -= len(m.IsolationGroup) + copy(dAtA[i:], m.IsolationGroup) + i = encodeVarintPlacement(dAtA, i, uint64(len(m.IsolationGroup))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintPlacement(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *InstanceMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -585,22 +832,27 @@ func (m *InstanceMetadata) Marshal() (dAtA []byte, err error) { } func (m *InstanceMetadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InstanceMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.DebugPort != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintPlacement(dAtA, i, uint64(m.DebugPort)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Shard) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -608,53 +860,61 @@ func (m *Shard) Marshal() (dAtA []byte, err error) { } func (m *Shard) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Shard) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Id != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.Id)) - } - if m.State != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.State)) + if m.RedirectToShardId != nil { + { + size, err := m.RedirectToShardId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 } - if len(m.SourceId) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintPlacement(dAtA, i, uint64(len(m.SourceId))) - i += copy(dAtA[i:], m.SourceId) + if m.CutoffNanos != 0 { + i = encodeVarintPlacement(dAtA, i, uint64(m.CutoffNanos)) + i-- + dAtA[i] = 0x28 } if m.CutoverNanos != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintPlacement(dAtA, i, uint64(m.CutoverNanos)) + i-- + dAtA[i] = 0x20 } - if m.CutoffNanos != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.CutoffNanos)) + if len(m.SourceId) > 0 { + i -= len(m.SourceId) + copy(dAtA[i:], m.SourceId) + i = encodeVarintPlacement(dAtA, i, uint64(len(m.SourceId))) + i-- + dAtA[i] = 0x1a } - if m.RedirectToShardId != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.RedirectToShardId.Size())) - n3, err := m.RedirectToShardId.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 + if m.State != 0 { + i = encodeVarintPlacement(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintPlacement(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *PlacementSnapshots) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -662,40 +922,48 @@ func (m *PlacementSnapshots) Marshal() (dAtA []byte, err error) { } func (m *PlacementSnapshots) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Snapshots) > 0 { - for _, msg := range m.Snapshots { - dAtA[i] = 0xa - i++ - i = encodeVarintPlacement(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if len(m.CompressedPlacement) > 0 { + i -= len(m.CompressedPlacement) + copy(dAtA[i:], m.CompressedPlacement) + i = encodeVarintPlacement(dAtA, i, uint64(len(m.CompressedPlacement))) + i-- + dAtA[i] = 0x1a } if m.CompressMode != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintPlacement(dAtA, i, uint64(m.CompressMode)) + i-- + dAtA[i] = 0x10 } - if len(m.CompressedPlacement) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintPlacement(dAtA, i, uint64(len(m.CompressedPlacement))) - i += copy(dAtA[i:], m.CompressedPlacement) + if len(m.Snapshots) > 0 { + for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Snapshots[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *Options) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -703,43 +971,57 @@ func (m *Options) Marshal() (dAtA []byte, err error) { } func (m *Options) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Options) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.IsSharded != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.IsSharded.Size())) - n4, err := m.IsSharded.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } if m.SkipPortMirroring != nil { + { + size, err := m.SkipPortMirroring.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.SkipPortMirroring.Size())) - n5, err := m.SkipPortMirroring.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if m.IsSharded != nil { + { + size, err := m.IsSharded.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintPlacement(dAtA []byte, offset int, v uint64) int { + offset -= sovPlacement(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Placement) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Instances) > 0 { @@ -777,6 +1059,9 @@ func (m *Placement) Size() (n int) { } func (m *Instance) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Id) @@ -822,6 +1107,9 @@ func (m *Instance) Size() (n int) { } func (m *InstanceMetadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.DebugPort != 0 { @@ -831,6 +1119,9 @@ func (m *InstanceMetadata) Size() (n int) { } func (m *Shard) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Id != 0 { @@ -857,6 +1148,9 @@ func (m *Shard) Size() (n int) { } func (m *PlacementSnapshots) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Snapshots) > 0 { @@ -876,6 +1170,9 @@ func (m *PlacementSnapshots) Size() (n int) { } func (m *Options) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.IsSharded != nil { @@ -890,14 +1187,7 @@ func (m *Options) Size() (n int) { } func sovPlacement(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPlacement(x uint64) (n int) { return sovPlacement(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -917,7 +1207,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -945,7 +1235,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -954,6 +1244,9 @@ func (m *Placement) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -974,7 +1267,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -991,7 +1284,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1001,6 +1294,9 @@ func (m *Placement) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthPlacement + } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } @@ -1017,7 +1313,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift + mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1026,7 +1322,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { + if postmsgIndex < 0 { return ErrInvalidLengthPlacement } if postmsgIndex > l { @@ -1043,7 +1339,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > postIndex { @@ -1068,7 +1364,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ReplicaFactor |= (uint32(b) & 0x7F) << shift + m.ReplicaFactor |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1087,7 +1383,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumShards |= (uint32(b) & 0x7F) << shift + m.NumShards |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1106,7 +1402,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1126,7 +1422,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CutoverTime |= (int64(b) & 0x7F) << shift + m.CutoverTime |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1145,7 +1441,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1165,7 +1461,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MaxShardSetId |= (uint32(b) & 0x7F) << shift + m.MaxShardSetId |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1176,7 +1472,7 @@ func (m *Placement) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -1206,7 +1502,7 @@ func (m *Instance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1234,7 +1530,7 @@ func (m *Instance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1244,6 +1540,9 @@ func (m *Instance) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1263,7 +1562,7 @@ func (m *Instance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1273,6 +1572,9 @@ func (m *Instance) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1292,7 +1594,7 @@ func (m *Instance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1302,6 +1604,9 @@ func (m *Instance) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1321,7 +1626,7 @@ func (m *Instance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Weight |= (uint32(b) & 0x7F) << shift + m.Weight |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1340,7 +1645,7 @@ func (m *Instance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1350,6 +1655,9 @@ func (m *Instance) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1369,7 +1677,7 @@ func (m *Instance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1378,6 +1686,9 @@ func (m *Instance) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1400,7 +1711,7 @@ func (m *Instance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ShardSetId |= (uint32(b) & 0x7F) << shift + m.ShardSetId |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1419,7 +1730,7 @@ func (m *Instance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1429,6 +1740,9 @@ func (m *Instance) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1448,7 +1762,7 @@ func (m *Instance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Port |= (uint32(b) & 0x7F) << shift + m.Port |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1467,7 +1781,7 @@ func (m *Instance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1476,6 +1790,9 @@ func (m *Instance) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1492,7 +1809,7 @@ func (m *Instance) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -1522,7 +1839,7 @@ func (m *InstanceMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1550,7 +1867,7 @@ func (m *InstanceMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DebugPort |= (uint32(b) & 0x7F) << shift + m.DebugPort |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1561,7 +1878,7 @@ func (m *InstanceMetadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -1591,7 +1908,7 @@ func (m *Shard) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1619,7 +1936,7 @@ func (m *Shard) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= (uint32(b) & 0x7F) << shift + m.Id |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1638,7 +1955,7 @@ func (m *Shard) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= (ShardState(b) & 0x7F) << shift + m.State |= ShardState(b&0x7F) << shift if b < 0x80 { break } @@ -1657,7 +1974,7 @@ func (m *Shard) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1667,6 +1984,9 @@ func (m *Shard) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1686,7 +2006,7 @@ func (m *Shard) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CutoverNanos |= (int64(b) & 0x7F) << shift + m.CutoverNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1705,7 +2025,7 @@ func (m *Shard) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CutoffNanos |= (int64(b) & 0x7F) << shift + m.CutoffNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1724,7 +2044,7 @@ func (m *Shard) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1733,11 +2053,14 @@ func (m *Shard) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } if m.RedirectToShardId == nil { - m.RedirectToShardId = &google_protobuf.UInt32Value{} + m.RedirectToShardId = &types.UInt32Value{} } if err := m.RedirectToShardId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1749,7 +2072,7 @@ func (m *Shard) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -1779,7 +2102,7 @@ func (m *PlacementSnapshots) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1807,7 +2130,7 @@ func (m *PlacementSnapshots) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1816,6 +2139,9 @@ func (m *PlacementSnapshots) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1838,7 +2164,7 @@ func (m *PlacementSnapshots) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CompressMode |= (CompressMode(b) & 0x7F) << shift + m.CompressMode |= CompressMode(b&0x7F) << shift if b < 0x80 { break } @@ -1857,7 +2183,7 @@ func (m *PlacementSnapshots) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1866,6 +2192,9 @@ func (m *PlacementSnapshots) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1880,7 +2209,7 @@ func (m *PlacementSnapshots) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -1910,7 +2239,7 @@ func (m *Options) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1938,7 +2267,7 @@ func (m *Options) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1947,11 +2276,14 @@ func (m *Options) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } if m.IsSharded == nil { - m.IsSharded = &google_protobuf.BoolValue{} + m.IsSharded = &types.BoolValue{} } if err := m.IsSharded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1971,7 +2303,7 @@ func (m *Options) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1980,11 +2312,14 @@ func (m *Options) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } if m.SkipPortMirroring == nil { - m.SkipPortMirroring = &google_protobuf.BoolValue{} + m.SkipPortMirroring = &types.BoolValue{} } if err := m.SkipPortMirroring.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1996,7 +2331,7 @@ func (m *Options) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -2014,6 +2349,7 @@ func (m *Options) Unmarshal(dAtA []byte) error { func skipPlacement(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2045,10 +2381,8 @@ func skipPlacement(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2065,115 +2399,34 @@ func skipPlacement(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthPlacement } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPlacement - } - 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 := skipPlacement(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPlacement + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthPlacement + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthPlacement = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPlacement = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthPlacement = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPlacement = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPlacement = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/placementpb/placement.proto", fileDescriptorPlacement) -} - -var fileDescriptorPlacement = []byte{ - // 861 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xcb, 0x8e, 0xdb, 0x36, - 0x14, 0x0d, 0xed, 0x19, 0x8f, 0x75, 0xfd, 0xa8, 0xc2, 0xa4, 0xa9, 0x3a, 0x6d, 0x5c, 0xd7, 0x45, - 0x50, 0x63, 0x8a, 0xda, 0x88, 0x67, 0x93, 0x64, 0x51, 0xc0, 0x93, 0x4e, 0x03, 0x05, 0x63, 0x27, - 0xa0, 0xa7, 0xb3, 0xc8, 0x46, 0xa0, 0x25, 0xda, 0x26, 0x62, 0x89, 0x02, 0x49, 0xe5, 0xd1, 0xaf, - 0xc8, 0x2f, 0x15, 0xe8, 0xa2, 0xcb, 0x7e, 0x42, 0x31, 0xfd, 0x88, 0x02, 0x5d, 0x15, 0x22, 0x25, - 0x3f, 0x9a, 0x41, 0x77, 0xbc, 0xe7, 0x9e, 0x4b, 0x5e, 0x1e, 0x9e, 0x4b, 0x78, 0xbe, 0xe4, 0x7a, - 0x95, 0xcd, 0x07, 0xa1, 0x88, 0x87, 0xf1, 0x69, 0x34, 0x1f, 0xc6, 0xa7, 0x43, 0x25, 0xc3, 0x61, - 0xb8, 0xce, 0x94, 0x66, 0x72, 0xb8, 0x64, 0x09, 0x93, 0x54, 0xb3, 0x68, 0x98, 0x4a, 0xa1, 0xc5, - 0x30, 0x5d, 0xd3, 0x90, 0xc5, 0x2c, 0xd1, 0xe9, 0x7c, 0xbb, 0x1e, 0x98, 0x1c, 0x6e, 0xec, 0x24, - 0x8f, 0x3b, 0x4b, 0x21, 0x96, 0x6b, 0x66, 0xcb, 0xe6, 0xd9, 0x62, 0xf8, 0x56, 0xd2,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d9, 0x24, - 0x77, 0xb6, 0xb9, 0x4d, 0x07, 0xbd, 0x0f, 0x08, 0x8e, 0x5e, 0xa4, 0xf9, 0x10, 0x28, 0xfc, 0x78, - 0xef, 0x9f, 0x40, 0x46, 0x94, 0xe3, 0x8f, 0x44, 0x39, 0x13, 0x62, 0x6d, 0x25, 0xd9, 0xf9, 0x43, - 0x9e, 0xc3, 0x1d, 0xf5, 0x9a, 0xa7, 0xc6, 0x25, 0xc5, 0x3f, 0xc1, 0x93, 0x65, 0x31, 0xc0, 0xff, - 0xb7, 0xc7, 0xed, 0xbc, 0x2c, 0xb7, 0xd2, 0xa4, 0x2c, 0x3a, 0x79, 0x02, 0xb0, 0xf5, 0x07, 0x76, - 0xa1, 0xe9, 0x4f, 0xfd, 0x4b, 0x7f, 0x7c, 0xe1, 0xbf, 0xf2, 0xa7, 0xcf, 0xdc, 0x5b, 0xb8, 0x05, - 0xce, 0xf8, 0x6a, 0xec, 0x5f, 0x8c, 0xcf, 0x2e, 0xce, 0x5d, 0x84, 0x1b, 0x70, 0x74, 0x71, 0x3e, - 0xbe, 0xca, 0x73, 0x95, 0x93, 0x1e, 0x34, 0x77, 0xf5, 0xc1, 0x75, 0x38, 0x98, 0xbe, 0x98, 0x9e, - 0xbb, 0xb7, 0xf2, 0xd5, 0xab, 0xd9, 0xe5, 0x8f, 0x2e, 0x3a, 0x73, 0x7f, 0xbf, 0xee, 0xa0, 0x3f, - 0xae, 0x3b, 0xe8, 0xcf, 0xeb, 0x0e, 0xfa, 0xf0, 0x57, 0xe7, 0xd6, 0xbc, 0x66, 0x1a, 0x3b, 0xfd, - 0x37, 0x00, 0x00, 0xff, 0xff, 0x38, 0x0a, 0x4d, 0xba, 0x3b, 0x06, 0x00, 0x00, -} diff --git a/src/cluster/generated/proto/testpb/test.pb.go b/src/cluster/generated/proto/testpb/test.pb.go index 7daec894a2..a79f2ccb35 100644 --- a/src/cluster/generated/proto/testpb/test.pb.go +++ b/src/cluster/generated/proto/testpb/test.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/cluster/generated/proto/testpb/test.proto -// Copyright (c) 2019 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,22 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* -Package testpb is a generated protocol buffer package. - -It is generated from these files: - github.com/m3db/m3/src/cluster/generated/proto/testpb/test.proto - -It has these top-level messages: - MapProto -*/ package testpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -47,16 +40,44 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MapProto struct { - Value map[string]int64 `protobuf:"bytes,1,rep,name=value" json:"value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Value map[string]int64 `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` } -func (m *MapProto) Reset() { *m = MapProto{} } -func (m *MapProto) String() string { return proto.CompactTextString(m) } -func (*MapProto) ProtoMessage() {} -func (*MapProto) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} } +func (m *MapProto) Reset() { *m = MapProto{} } +func (m *MapProto) String() string { return proto.CompactTextString(m) } +func (*MapProto) ProtoMessage() {} +func (*MapProto) Descriptor() ([]byte, []int) { + return fileDescriptor_8097a55f3c2d4382, []int{0} +} +func (m *MapProto) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapProto.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 *MapProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapProto.Merge(m, src) +} +func (m *MapProto) XXX_Size() int { + return m.Size() +} +func (m *MapProto) XXX_DiscardUnknown() { + xxx_messageInfo_MapProto.DiscardUnknown(m) +} + +var xxx_messageInfo_MapProto proto.InternalMessageInfo func (m *MapProto) GetValue() map[string]int64 { if m != nil { @@ -67,11 +88,34 @@ func (m *MapProto) GetValue() map[string]int64 { func init() { proto.RegisterType((*MapProto)(nil), "testpb.MapProto") + proto.RegisterMapType((map[string]int64)(nil), "testpb.MapProto.ValueEntry") +} + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/testpb/test.proto", fileDescriptor_8097a55f3c2d4382) } + +var fileDescriptor_8097a55f3c2d4382 = []byte{ + // 201 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x48, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, + 0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, + 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x49, 0x2d, 0x2e, 0x29, + 0x48, 0x02, 0x53, 0x7a, 0x60, 0x11, 0x21, 0x36, 0x88, 0x90, 0x52, 0x39, 0x17, 0x87, 0x6f, 0x62, + 0x41, 0x00, 0x58, 0xcc, 0x90, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x51, 0x81, 0x59, + 0x83, 0xdb, 0x48, 0x5a, 0x0f, 0xa2, 0x46, 0x0f, 0xa6, 0x40, 0x2f, 0x0c, 0x24, 0xeb, 0x9a, 0x57, + 0x52, 0x54, 0x19, 0x04, 0x51, 0x29, 0x65, 0xc1, 0xc5, 0x85, 0x10, 0x14, 0x12, 0xe0, 0x62, 0xce, + 0x4e, 0xad, 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0x31, 0x85, 0x44, 0x60, 0x46, 0x32, + 0x29, 0x30, 0x6a, 0x30, 0x43, 0x75, 0x59, 0x31, 0x59, 0x30, 0x3a, 0x49, 0x9c, 0x78, 0x24, 0xc7, + 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, + 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x12, 0x1b, 0xd8, 0x85, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x47, 0xd3, 0x56, 0xf7, 0xe5, 0x00, 0x00, 0x00, +} + func (m *MapProto) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -79,39 +123,50 @@ func (m *MapProto) Marshal() (dAtA []byte, err error) { } func (m *MapProto) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MapProto) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Value) > 0 { - for k, _ := range m.Value { - dAtA[i] = 0xa - i++ + for k := range m.Value { v := m.Value[k] - mapSize := 1 + len(k) + sovTest(uint64(len(k))) + 1 + sovTest(uint64(v)) - i = encodeVarintTest(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintTest(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x10 - i++ + baseI := i i = encodeVarintTest(dAtA, i, uint64(v)) + i-- + dAtA[i] = 0x10 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintTest(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintTest(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func encodeVarintTest(dAtA []byte, offset int, v uint64) int { + offset -= sovTest(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *MapProto) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Value) > 0 { @@ -126,14 +181,7 @@ func (m *MapProto) Size() (n int) { } func sovTest(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTest(x uint64) (n int) { return sovTest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -153,7 +201,7 @@ func (m *MapProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -181,7 +229,7 @@ func (m *MapProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -190,6 +238,9 @@ func (m *MapProto) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTest } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTest + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -210,7 +261,7 @@ func (m *MapProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -227,7 +278,7 @@ func (m *MapProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -237,6 +288,9 @@ func (m *MapProto) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTest } postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthTest + } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } @@ -252,7 +306,7 @@ func (m *MapProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapvalue |= (int64(b) & 0x7F) << shift + mapvalue |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -263,7 +317,7 @@ func (m *MapProto) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTest } if (iNdEx + skippy) > postIndex { @@ -280,7 +334,7 @@ func (m *MapProto) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTest } if (iNdEx + skippy) > l { @@ -298,6 +352,7 @@ func (m *MapProto) Unmarshal(dAtA []byte) error { func skipTest(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -329,10 +384,8 @@ func skipTest(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -349,73 +402,34 @@ func skipTest(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthTest } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTest - } - 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 := skipTest(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTest + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthTest + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthTest = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTest = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthTest = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTest = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTest = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/testpb/test.proto", fileDescriptorTest) -} - -var fileDescriptorTest = []byte{ - // 192 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x48, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, - 0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, - 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x49, 0x2d, 0x2e, 0x29, - 0x48, 0x02, 0x53, 0x7a, 0x60, 0x11, 0x21, 0x36, 0x88, 0x90, 0x52, 0x39, 0x17, 0x87, 0x6f, 0x62, - 0x41, 0x00, 0x58, 0xcc, 0x90, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x51, 0x81, 0x59, - 0x83, 0xdb, 0x48, 0x5a, 0x0f, 0xa2, 0x46, 0x0f, 0xa6, 0x40, 0x2f, 0x0c, 0x24, 0xeb, 0x9a, 0x57, - 0x52, 0x54, 0x19, 0x04, 0x51, 0x29, 0x65, 0xc1, 0xc5, 0x85, 0x10, 0x14, 0x12, 0xe0, 0x62, 0xce, - 0x4e, 0xad, 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0x31, 0x85, 0x44, 0x60, 0x46, 0x32, - 0x29, 0x30, 0x6a, 0x30, 0x43, 0x75, 0x59, 0x31, 0x59, 0x30, 0x3a, 0x09, 0x9c, 0x78, 0x24, 0xc7, - 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x24, 0xb1, 0x81, - 0x5d, 0x66, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x47, 0x71, 0x0b, 0xdd, 0x00, 0x00, 0x00, -} diff --git a/src/dbnode/generated/proto/annotation/annotation.pb.go b/src/dbnode/generated/proto/annotation/annotation.pb.go index 50a36e6b52..9b3c91cb4d 100644 --- a/src/dbnode/generated/proto/annotation/annotation.pb.go +++ b/src/dbnode/generated/proto/annotation/annotation.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/dbnode/generated/proto/annotation/annotation.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,22 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package annotation is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/dbnode/generated/proto/annotation/annotation.proto - - It has these top-level messages: - Payload -*/ package annotation -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -47,7 +40,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type SourceFormat int32 @@ -63,6 +56,7 @@ var SourceFormat_name = map[int32]string{ 0: "OPEN_METRICS", 1: "GRAPHITE", } + var SourceFormat_value = map[string]int32{ "OPEN_METRICS": 0, "GRAPHITE": 1, @@ -71,7 +65,10 @@ var SourceFormat_value = map[string]int32{ func (x SourceFormat) String() string { return proto.EnumName(SourceFormat_name, int32(x)) } -func (SourceFormat) EnumDescriptor() ([]byte, []int) { return fileDescriptorAnnotation, []int{0} } + +func (SourceFormat) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_6af3382a68937b8d, []int{0} +} type OpenMetricsFamilyType int32 @@ -96,6 +93,7 @@ var OpenMetricsFamilyType_name = map[int32]string{ 6: "INFO", 7: "STATESET", } + var OpenMetricsFamilyType_value = map[string]int32{ "UNKNOWN": 0, "COUNTER": 1, @@ -110,8 +108,9 @@ var OpenMetricsFamilyType_value = map[string]int32{ func (x OpenMetricsFamilyType) String() string { return proto.EnumName(OpenMetricsFamilyType_name, int32(x)) } + func (OpenMetricsFamilyType) EnumDescriptor() ([]byte, []int) { - return fileDescriptorAnnotation, []int{1} + return fileDescriptor_6af3382a68937b8d, []int{1} } type GraphiteType int32 @@ -129,6 +128,7 @@ var GraphiteType_name = map[int32]string{ 2: "GRAPHITE_GAUGE", 3: "GRAPHITE_TIMER", } + var GraphiteType_value = map[string]int32{ "GRAPHITE_UNKNOWN": 0, "GRAPHITE_COUNTER": 1, @@ -139,7 +139,10 @@ var GraphiteType_value = map[string]int32{ func (x GraphiteType) String() string { return proto.EnumName(GraphiteType_name, int32(x)) } -func (GraphiteType) EnumDescriptor() ([]byte, []int) { return fileDescriptorAnnotation, []int{2} } + +func (GraphiteType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_6af3382a68937b8d, []int{2} +} type Payload struct { SourceFormat SourceFormat `protobuf:"varint,3,opt,name=source_format,json=sourceFormat,proto3,enum=annotation.SourceFormat" json:"source_format,omitempty"` @@ -150,10 +153,38 @@ type Payload struct { GraphiteType GraphiteType `protobuf:"varint,4,opt,name=graphite_type,json=graphiteType,proto3,enum=annotation.GraphiteType" json:"graphite_type,omitempty"` } -func (m *Payload) Reset() { *m = Payload{} } -func (m *Payload) String() string { return proto.CompactTextString(m) } -func (*Payload) ProtoMessage() {} -func (*Payload) Descriptor() ([]byte, []int) { return fileDescriptorAnnotation, []int{0} } +func (m *Payload) Reset() { *m = Payload{} } +func (m *Payload) String() string { return proto.CompactTextString(m) } +func (*Payload) ProtoMessage() {} +func (*Payload) Descriptor() ([]byte, []int) { + return fileDescriptor_6af3382a68937b8d, []int{0} +} +func (m *Payload) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Payload.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 *Payload) XXX_Merge(src proto.Message) { + xxx_messageInfo_Payload.Merge(m, src) +} +func (m *Payload) XXX_Size() int { + return m.Size() +} +func (m *Payload) XXX_DiscardUnknown() { + xxx_messageInfo_Payload.DiscardUnknown(m) +} + +var xxx_messageInfo_Payload proto.InternalMessageInfo func (m *Payload) GetSourceFormat() SourceFormat { if m != nil { @@ -184,15 +215,53 @@ func (m *Payload) GetGraphiteType() GraphiteType { } func init() { - proto.RegisterType((*Payload)(nil), "annotation.Payload") proto.RegisterEnum("annotation.SourceFormat", SourceFormat_name, SourceFormat_value) proto.RegisterEnum("annotation.OpenMetricsFamilyType", OpenMetricsFamilyType_name, OpenMetricsFamilyType_value) proto.RegisterEnum("annotation.GraphiteType", GraphiteType_name, GraphiteType_value) + proto.RegisterType((*Payload)(nil), "annotation.Payload") +} + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/annotation/annotation.proto", fileDescriptor_6af3382a68937b8d) +} + +var fileDescriptor_6af3382a68937b8d = []byte{ + // 449 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x6e, 0xd3, 0x30, + 0x1c, 0xc6, 0x93, 0xb6, 0x5b, 0x3b, 0x93, 0x0d, 0xcb, 0x30, 0x29, 0x07, 0x14, 0x15, 0x4e, 0x53, + 0x0f, 0x8d, 0x44, 0xcf, 0x1c, 0xc2, 0x94, 0xa6, 0x11, 0x4a, 0x52, 0x39, 0x29, 0x08, 0x2e, 0x96, + 0xd3, 0x78, 0x6d, 0xa4, 0x26, 0x8e, 0x12, 0x17, 0xa9, 0x0f, 0xc0, 0x9d, 0xf7, 0xe0, 0x45, 0x38, + 0xee, 0xc8, 0x11, 0xb5, 0x2f, 0x82, 0xe2, 0x31, 0x6a, 0xb4, 0xde, 0xfc, 0xff, 0xfe, 0x9f, 0x3f, + 0xfd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0xc3, 0x02, 0x00, + 0x00, } + func (m *Payload) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -200,48 +269,58 @@ func (m *Payload) Marshal() (dAtA []byte, err error) { } func (m *Payload) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Payload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.OpenMetricsFamilyType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintAnnotation(dAtA, i, uint64(m.OpenMetricsFamilyType)) + if m.GraphiteType != 0 { + i = encodeVarintAnnotation(dAtA, i, uint64(m.GraphiteType)) + i-- + dAtA[i] = 0x20 + } + if m.SourceFormat != 0 { + i = encodeVarintAnnotation(dAtA, i, uint64(m.SourceFormat)) + i-- + dAtA[i] = 0x18 } if m.OpenMetricsHandleValueResets { - dAtA[i] = 0x10 - i++ + i-- if m.OpenMetricsHandleValueResets { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ - } - if m.SourceFormat != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintAnnotation(dAtA, i, uint64(m.SourceFormat)) + i-- + dAtA[i] = 0x10 } - if m.GraphiteType != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintAnnotation(dAtA, i, uint64(m.GraphiteType)) + if m.OpenMetricsFamilyType != 0 { + i = encodeVarintAnnotation(dAtA, i, uint64(m.OpenMetricsFamilyType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintAnnotation(dAtA []byte, offset int, v uint64) int { + offset -= sovAnnotation(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Payload) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.OpenMetricsFamilyType != 0 { @@ -260,14 +339,7 @@ func (m *Payload) Size() (n int) { } func sovAnnotation(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozAnnotation(x uint64) (n int) { return sovAnnotation(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -287,7 +359,7 @@ func (m *Payload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -315,7 +387,7 @@ func (m *Payload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.OpenMetricsFamilyType |= (OpenMetricsFamilyType(b) & 0x7F) << shift + m.OpenMetricsFamilyType |= OpenMetricsFamilyType(b&0x7F) << shift if b < 0x80 { break } @@ -334,7 +406,7 @@ func (m *Payload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -354,7 +426,7 @@ func (m *Payload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SourceFormat |= (SourceFormat(b) & 0x7F) << shift + m.SourceFormat |= SourceFormat(b&0x7F) << shift if b < 0x80 { break } @@ -373,7 +445,7 @@ func (m *Payload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.GraphiteType |= (GraphiteType(b) & 0x7F) << shift + m.GraphiteType |= GraphiteType(b&0x7F) << shift if b < 0x80 { break } @@ -384,7 +456,7 @@ func (m *Payload) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAnnotation } if (iNdEx + skippy) > l { @@ -402,6 +474,7 @@ func (m *Payload) Unmarshal(dAtA []byte) error { func skipAnnotation(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -433,10 +506,8 @@ func skipAnnotation(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -453,89 +524,34 @@ func skipAnnotation(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthAnnotation } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAnnotation - } - 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 := skipAnnotation(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAnnotation + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthAnnotation + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthAnnotation = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAnnotation = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthAnnotation = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAnnotation = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAnnotation = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/annotation/annotation.proto", fileDescriptorAnnotation) -} - -var fileDescriptorAnnotation = []byte{ - // 441 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0x86, 0xe3, 0x24, 0x6d, 0xd2, 0xc1, 0x2d, 0xab, 0x85, 0x4a, 0x3e, 0xa0, 0x28, 0x70, 0xaa, - 0x72, 0x88, 0x25, 0x72, 0xe6, 0x60, 0x2a, 0xc7, 0xb1, 0x90, 0xed, 0x68, 0xed, 0x80, 0xe0, 0xb2, - 0x5a, 0xc7, 0xdb, 0xc4, 0x52, 0xec, 0xb5, 0xec, 0x0d, 0x52, 0x1e, 0x80, 0x3b, 0xef, 0xc1, 0x8b, - 0x70, 0xe4, 0x11, 0x50, 0x78, 0x11, 0xe4, 0x2d, 0x25, 0x8b, 0xe8, 0xcd, 0xf3, 0xcf, 0x37, 0xa3, - 0x6f, 0xac, 0x05, 0x7f, 0x93, 0xcb, 0xed, 0x3e, 0x9d, 0xae, 0x45, 0x61, 0x17, 0xb3, 0x2c, 0xb5, - 0x8b, 0x99, 0xdd, 0xd4, 0x6b, 0x3b, 0x4b, 0x4b, 0x91, 0x71, 0x7b, 0xc3, 0x4b, 0x5e, 0x33, 0xc9, - 0x33, 0xbb, 0xaa, 0x85, 0x14, 0x36, 0x2b, 0x4b, 0x21, 0x99, 0xcc, 0x45, 0xa9, 0x7d, 0x4e, 0x55, - 0x0f, 0xc3, 0x29, 0x79, 0xf5, 0xad, 0x0b, 0x83, 0x25, 0x3b, 0xec, 0x04, 0xcb, 0xf0, 0x27, 0xb0, - 0x44, 0xc5, 0x4b, 0x5a, 0x70, 0x59, 0xe7, 0xeb, 0x86, 0xde, 0xb1, 0x22, 0xdf, 0x1d, 0xa8, 0x3c, - 0x54, 0xdc, 0x32, 0xc6, 0xc6, 0xcd, 0xd5, 0xeb, 0x97, 0x53, 0x6d, 0x59, 0x54, 0xf1, 0x32, 0xb8, - 0x47, 0xe7, 0x8a, 0x4c, 0x0e,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0x10, 0xfa, 0x7e, 0x38, 0x8f, 0xd0, 0x79, - 0xeb, 0x11, 0x27, 0x4e, 0xe2, 0xc6, 0x6e, 0x82, 0x06, 0x93, 0x14, 0x4c, 0xfd, 0x2a, 0xfc, 0x1c, - 0xd0, 0x83, 0x25, 0x3d, 0x69, 0xe8, 0xe9, 0xc9, 0x07, 0xc3, 0xd5, 0xdf, 0xf4, 0x41, 0x4c, 0xcf, - 0x12, 0x3f, 0x70, 0x09, 0xea, 0xbd, 0x45, 0xdf, 0x8f, 0x23, 0xe3, 0xc7, 0x71, 0x64, 0xfc, 0x3c, - 0x8e, 0x8c, 0xaf, 0xbf, 0x46, 0x9d, 0xf4, 0x5c, 0x3d, 0xb7, 0xd9, 0xef, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x36, 0xb4, 0x60, 0xa4, 0xbb, 0x02, 0x00, 0x00, -} diff --git a/src/dbnode/generated/proto/index/index.pb.go b/src/dbnode/generated/proto/index/index.pb.go index b81ca162ec..a4a8ddaf3c 100644 --- a/src/dbnode/generated/proto/index/index.pb.go +++ b/src/dbnode/generated/proto/index/index.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/dbnode/generated/proto/index/index.proto -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,28 +21,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package index is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/dbnode/generated/proto/index/index.proto - - It has these top-level messages: - IndexVolumeInfo - SegmentInfo - SegmentFileInfo - IndexDigests - SegmentDigest - SegmentFileDigest -*/ package index -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/gogo/protobuf/types" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -53,23 +41,51 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type IndexVolumeInfo struct { - MajorVersion int64 `protobuf:"varint,1,opt,name=majorVersion,proto3" json:"majorVersion,omitempty"` - BlockStart int64 `protobuf:"varint,2,opt,name=blockStart,proto3" json:"blockStart,omitempty"` - BlockSize int64 `protobuf:"varint,3,opt,name=blockSize,proto3" json:"blockSize,omitempty"` - FileType int64 `protobuf:"varint,4,opt,name=fileType,proto3" json:"fileType,omitempty"` - Shards []uint32 `protobuf:"varint,5,rep,packed,name=shards" json:"shards,omitempty"` - SnapshotTime int64 `protobuf:"varint,6,opt,name=snapshotTime,proto3" json:"snapshotTime,omitempty"` - Segments []*SegmentInfo `protobuf:"bytes,7,rep,name=segments" json:"segments,omitempty"` - IndexVolumeType *google_protobuf.StringValue `protobuf:"bytes,8,opt,name=indexVolumeType" json:"indexVolumeType,omitempty"` + MajorVersion int64 `protobuf:"varint,1,opt,name=majorVersion,proto3" json:"majorVersion,omitempty"` + BlockStart int64 `protobuf:"varint,2,opt,name=blockStart,proto3" json:"blockStart,omitempty"` + BlockSize int64 `protobuf:"varint,3,opt,name=blockSize,proto3" json:"blockSize,omitempty"` + FileType int64 `protobuf:"varint,4,opt,name=fileType,proto3" json:"fileType,omitempty"` + Shards []uint32 `protobuf:"varint,5,rep,packed,name=shards,proto3" json:"shards,omitempty"` + SnapshotTime int64 `protobuf:"varint,6,opt,name=snapshotTime,proto3" json:"snapshotTime,omitempty"` + Segments []*SegmentInfo `protobuf:"bytes,7,rep,name=segments,proto3" json:"segments,omitempty"` + IndexVolumeType *types.StringValue `protobuf:"bytes,8,opt,name=indexVolumeType,proto3" json:"indexVolumeType,omitempty"` } -func (m *IndexVolumeInfo) Reset() { *m = IndexVolumeInfo{} } -func (m *IndexVolumeInfo) String() string { return proto.CompactTextString(m) } -func (*IndexVolumeInfo) ProtoMessage() {} -func (*IndexVolumeInfo) Descriptor() ([]byte, []int) { return fileDescriptorIndex, []int{0} } +func (m *IndexVolumeInfo) Reset() { *m = IndexVolumeInfo{} } +func (m *IndexVolumeInfo) String() string { return proto.CompactTextString(m) } +func (*IndexVolumeInfo) ProtoMessage() {} +func (*IndexVolumeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_590ea2a5a4b4fbf6, []int{0} +} +func (m *IndexVolumeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IndexVolumeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IndexVolumeInfo.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 *IndexVolumeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexVolumeInfo.Merge(m, src) +} +func (m *IndexVolumeInfo) XXX_Size() int { + return m.Size() +} +func (m *IndexVolumeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_IndexVolumeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexVolumeInfo proto.InternalMessageInfo func (m *IndexVolumeInfo) GetMajorVersion() int64 { if m != nil { @@ -120,7 +136,7 @@ func (m *IndexVolumeInfo) GetSegments() []*SegmentInfo { return nil } -func (m *IndexVolumeInfo) GetIndexVolumeType() *google_protobuf.StringValue { +func (m *IndexVolumeInfo) GetIndexVolumeType() *types.StringValue { if m != nil { return m.IndexVolumeType } @@ -132,13 +148,41 @@ type SegmentInfo struct { MajorVersion int64 `protobuf:"varint,2,opt,name=majorVersion,proto3" json:"majorVersion,omitempty"` MinorVersion int64 `protobuf:"varint,3,opt,name=minorVersion,proto3" json:"minorVersion,omitempty"` Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - Files []*SegmentFileInfo `protobuf:"bytes,5,rep,name=files" json:"files,omitempty"` + Files []*SegmentFileInfo `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"` } -func (m *SegmentInfo) Reset() { *m = SegmentInfo{} } -func (m *SegmentInfo) String() string { return proto.CompactTextString(m) } -func (*SegmentInfo) ProtoMessage() {} -func (*SegmentInfo) Descriptor() ([]byte, []int) { return fileDescriptorIndex, []int{1} } +func (m *SegmentInfo) Reset() { *m = SegmentInfo{} } +func (m *SegmentInfo) String() string { return proto.CompactTextString(m) } +func (*SegmentInfo) ProtoMessage() {} +func (*SegmentInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_590ea2a5a4b4fbf6, []int{1} +} +func (m *SegmentInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SegmentInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SegmentInfo.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 *SegmentInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SegmentInfo.Merge(m, src) +} +func (m *SegmentInfo) XXX_Size() int { + return m.Size() +} +func (m *SegmentInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SegmentInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SegmentInfo proto.InternalMessageInfo func (m *SegmentInfo) GetSegmentType() string { if m != nil { @@ -179,10 +223,38 @@ type SegmentFileInfo struct { SegmentFileType string `protobuf:"bytes,1,opt,name=segmentFileType,proto3" json:"segmentFileType,omitempty"` } -func (m *SegmentFileInfo) Reset() { *m = SegmentFileInfo{} } -func (m *SegmentFileInfo) String() string { return proto.CompactTextString(m) } -func (*SegmentFileInfo) ProtoMessage() {} -func (*SegmentFileInfo) Descriptor() ([]byte, []int) { return fileDescriptorIndex, []int{2} } +func (m *SegmentFileInfo) Reset() { *m = SegmentFileInfo{} } +func (m *SegmentFileInfo) String() string { return proto.CompactTextString(m) } +func (*SegmentFileInfo) ProtoMessage() {} +func (*SegmentFileInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_590ea2a5a4b4fbf6, []int{2} +} +func (m *SegmentFileInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SegmentFileInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SegmentFileInfo.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 *SegmentFileInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SegmentFileInfo.Merge(m, src) +} +func (m *SegmentFileInfo) XXX_Size() int { + return m.Size() +} +func (m *SegmentFileInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SegmentFileInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SegmentFileInfo proto.InternalMessageInfo func (m *SegmentFileInfo) GetSegmentFileType() string { if m != nil { @@ -193,13 +265,41 @@ func (m *SegmentFileInfo) GetSegmentFileType() string { type IndexDigests struct { InfoDigest uint32 `protobuf:"varint,1,opt,name=infoDigest,proto3" json:"infoDigest,omitempty"` - SegmentDigests []*SegmentDigest `protobuf:"bytes,2,rep,name=segmentDigests" json:"segmentDigests,omitempty"` + SegmentDigests []*SegmentDigest `protobuf:"bytes,2,rep,name=segmentDigests,proto3" json:"segmentDigests,omitempty"` +} + +func (m *IndexDigests) Reset() { *m = IndexDigests{} } +func (m *IndexDigests) String() string { return proto.CompactTextString(m) } +func (*IndexDigests) ProtoMessage() {} +func (*IndexDigests) Descriptor() ([]byte, []int) { + return fileDescriptor_590ea2a5a4b4fbf6, []int{3} +} +func (m *IndexDigests) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IndexDigests) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IndexDigests.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 *IndexDigests) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexDigests.Merge(m, src) +} +func (m *IndexDigests) XXX_Size() int { + return m.Size() +} +func (m *IndexDigests) XXX_DiscardUnknown() { + xxx_messageInfo_IndexDigests.DiscardUnknown(m) } -func (m *IndexDigests) Reset() { *m = IndexDigests{} } -func (m *IndexDigests) String() string { return proto.CompactTextString(m) } -func (*IndexDigests) ProtoMessage() {} -func (*IndexDigests) Descriptor() ([]byte, []int) { return fileDescriptorIndex, []int{3} } +var xxx_messageInfo_IndexDigests proto.InternalMessageInfo func (m *IndexDigests) GetInfoDigest() uint32 { if m != nil { @@ -217,13 +317,41 @@ func (m *IndexDigests) GetSegmentDigests() []*SegmentDigest { type SegmentDigest struct { SegmentType string `protobuf:"bytes,1,opt,name=segmentType,proto3" json:"segmentType,omitempty"` - Files []*SegmentFileDigest `protobuf:"bytes,2,rep,name=files" json:"files,omitempty"` + Files []*SegmentFileDigest `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"` } -func (m *SegmentDigest) Reset() { *m = SegmentDigest{} } -func (m *SegmentDigest) String() string { return proto.CompactTextString(m) } -func (*SegmentDigest) ProtoMessage() {} -func (*SegmentDigest) Descriptor() ([]byte, []int) { return fileDescriptorIndex, []int{4} } +func (m *SegmentDigest) Reset() { *m = SegmentDigest{} } +func (m *SegmentDigest) String() string { return proto.CompactTextString(m) } +func (*SegmentDigest) ProtoMessage() {} +func (*SegmentDigest) Descriptor() ([]byte, []int) { + return fileDescriptor_590ea2a5a4b4fbf6, []int{4} +} +func (m *SegmentDigest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SegmentDigest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SegmentDigest.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 *SegmentDigest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SegmentDigest.Merge(m, src) +} +func (m *SegmentDigest) XXX_Size() int { + return m.Size() +} +func (m *SegmentDigest) XXX_DiscardUnknown() { + xxx_messageInfo_SegmentDigest.DiscardUnknown(m) +} + +var xxx_messageInfo_SegmentDigest proto.InternalMessageInfo func (m *SegmentDigest) GetSegmentType() string { if m != nil { @@ -244,10 +372,38 @@ type SegmentFileDigest struct { Digest uint32 `protobuf:"varint,2,opt,name=digest,proto3" json:"digest,omitempty"` } -func (m *SegmentFileDigest) Reset() { *m = SegmentFileDigest{} } -func (m *SegmentFileDigest) String() string { return proto.CompactTextString(m) } -func (*SegmentFileDigest) ProtoMessage() {} -func (*SegmentFileDigest) Descriptor() ([]byte, []int) { return fileDescriptorIndex, []int{5} } +func (m *SegmentFileDigest) Reset() { *m = SegmentFileDigest{} } +func (m *SegmentFileDigest) String() string { return proto.CompactTextString(m) } +func (*SegmentFileDigest) ProtoMessage() {} +func (*SegmentFileDigest) Descriptor() ([]byte, []int) { + return fileDescriptor_590ea2a5a4b4fbf6, []int{5} +} +func (m *SegmentFileDigest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SegmentFileDigest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SegmentFileDigest.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 *SegmentFileDigest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SegmentFileDigest.Merge(m, src) +} +func (m *SegmentFileDigest) XXX_Size() int { + return m.Size() +} +func (m *SegmentFileDigest) XXX_DiscardUnknown() { + xxx_messageInfo_SegmentFileDigest.DiscardUnknown(m) +} + +var xxx_messageInfo_SegmentFileDigest proto.InternalMessageInfo func (m *SegmentFileDigest) GetSegmentFileType() string { if m != nil { @@ -271,10 +427,50 @@ func init() { proto.RegisterType((*SegmentDigest)(nil), "index.SegmentDigest") proto.RegisterType((*SegmentFileDigest)(nil), "index.SegmentFileDigest") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/index/index.proto", fileDescriptor_590ea2a5a4b4fbf6) +} + +var fileDescriptor_590ea2a5a4b4fbf6 = []byte{ + // 492 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x8a, 0xdb, 0x30, + 0x10, 0xc6, 0xd7, 0x71, 0x93, 0x66, 0xc7, 0x49, 0x43, 0x45, 0x59, 0xc4, 0xb2, 0x18, 0xe3, 0x93, + 0x0f, 0xc5, 0x86, 0xe4, 0xd8, 0x42, 0xa1, 0x94, 0x85, 0xbd, 0x3a, 0xdb, 0xdc, 0xe5, 0x58, 0x71, + 0xd4, 0xda, 0x92, 0x91, 0x14, 0xfa, 0xe7, 0x29, 0xfa, 0x4a, 0xa5, 0x97, 0x1e, 0xf7, 0xd8, 0x63, + 0x49, 0x5e, 0xa4, 0x58, 0xf2, 0x26, 0x4e, 0xd2, 0xc3, 0x5e, 0x02, 0xdf, 0x37, 0x9f, 0x3c, 0x33, + 0xbf, 0x0c, 0xbc, 0x2b, 0x98, 0x5e, 0x6f, 0xb2, 0x78, 0x29, 0xaa, 0xa4, 0x9a, 0xe5, 0x59, 0x52, + 0xcd, 0x12, 0x25, 0x97, 0x49, 0x9e, 0x71, 0x91, 0xd3, 0xa4, 0xa0, 0x9c, 0x4a, 0xa2, 0x69, 0x9e, + 0xd4, 0x52, 0x68, 0x91, 0x30, 0x9e, 0xd3, 0xaf, 0xf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0x00, 0xff, 0xff, 0xc1, 0x03, 0x00, 0x68, 0xf9, 0x03, 0x00, 0x00, +} + func (m *IndexVolumeInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -282,81 +478,91 @@ func (m *IndexVolumeInfo) Marshal() (dAtA []byte, err error) { } func (m *IndexVolumeInfo) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IndexVolumeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.MajorVersion != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintIndex(dAtA, i, uint64(m.MajorVersion)) - } - if m.BlockStart != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintIndex(dAtA, i, uint64(m.BlockStart)) + if m.IndexVolumeType != nil { + { + size, err := m.IndexVolumeType.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIndex(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 } - if m.BlockSize != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintIndex(dAtA, i, uint64(m.BlockSize)) + if len(m.Segments) > 0 { + for iNdEx := len(m.Segments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Segments[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIndex(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } } - if m.FileType != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintIndex(dAtA, i, uint64(m.FileType)) + if m.SnapshotTime != 0 { + i = encodeVarintIndex(dAtA, i, uint64(m.SnapshotTime)) + i-- + dAtA[i] = 0x30 } if len(m.Shards) > 0 { - dAtA2 := make([]byte, len(m.Shards)*10) - var j1 int + dAtA3 := make([]byte, len(m.Shards)*10) + var j2 int for _, num := range m.Shards { for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j1++ + j2++ } - dAtA2[j1] = uint8(num) - j1++ + dAtA3[j2] = uint8(num) + j2++ } + i -= j2 + copy(dAtA[i:], dAtA3[:j2]) + i = encodeVarintIndex(dAtA, i, uint64(j2)) + i-- dAtA[i] = 0x2a - i++ - i = encodeVarintIndex(dAtA, i, uint64(j1)) - i += copy(dAtA[i:], dAtA2[:j1]) } - if m.SnapshotTime != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintIndex(dAtA, i, uint64(m.SnapshotTime)) + if m.FileType != 0 { + i = encodeVarintIndex(dAtA, i, uint64(m.FileType)) + i-- + dAtA[i] = 0x20 } - if len(m.Segments) > 0 { - for _, msg := range m.Segments { - dAtA[i] = 0x3a - i++ - i = encodeVarintIndex(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.BlockSize != 0 { + i = encodeVarintIndex(dAtA, i, uint64(m.BlockSize)) + i-- + dAtA[i] = 0x18 } - if m.IndexVolumeType != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintIndex(dAtA, i, uint64(m.IndexVolumeType.Size())) - n3, err := m.IndexVolumeType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 + if m.BlockStart != 0 { + i = encodeVarintIndex(dAtA, i, uint64(m.BlockStart)) + i-- + dAtA[i] = 0x10 + } + if m.MajorVersion != 0 { + i = encodeVarintIndex(dAtA, i, uint64(m.MajorVersion)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *SegmentInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -364,51 +570,60 @@ func (m *SegmentInfo) Marshal() (dAtA []byte, err error) { } func (m *SegmentInfo) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SegmentInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.SegmentType) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintIndex(dAtA, i, uint64(len(m.SegmentType))) - i += copy(dAtA[i:], m.SegmentType) + if len(m.Files) > 0 { + for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Files[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIndex(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } } - if m.MajorVersion != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintIndex(dAtA, i, uint64(m.MajorVersion)) + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintIndex(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x22 } if m.MinorVersion != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintIndex(dAtA, i, uint64(m.MinorVersion)) + i-- + dAtA[i] = 0x18 } - if len(m.Metadata) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintIndex(dAtA, i, uint64(len(m.Metadata))) - i += copy(dAtA[i:], m.Metadata) + if m.MajorVersion != 0 { + i = encodeVarintIndex(dAtA, i, uint64(m.MajorVersion)) + i-- + dAtA[i] = 0x10 } - if len(m.Files) > 0 { - for _, msg := range m.Files { - dAtA[i] = 0x2a - i++ - i = encodeVarintIndex(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if len(m.SegmentType) > 0 { + i -= len(m.SegmentType) + copy(dAtA[i:], m.SegmentType) + i = encodeVarintIndex(dAtA, i, uint64(len(m.SegmentType))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *SegmentFileInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -416,23 +631,29 @@ func (m *SegmentFileInfo) Marshal() (dAtA []byte, err error) { } func (m *SegmentFileInfo) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SegmentFileInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.SegmentFileType) > 0 { - dAtA[i] = 0xa - i++ + i -= len(m.SegmentFileType) + copy(dAtA[i:], m.SegmentFileType) i = encodeVarintIndex(dAtA, i, uint64(len(m.SegmentFileType))) - i += copy(dAtA[i:], m.SegmentFileType) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *IndexDigests) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -440,34 +661,41 @@ func (m *IndexDigests) Marshal() (dAtA []byte, err error) { } func (m *IndexDigests) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IndexDigests) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.InfoDigest != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintIndex(dAtA, i, uint64(m.InfoDigest)) - } if len(m.SegmentDigests) > 0 { - for _, msg := range m.SegmentDigests { - dAtA[i] = 0x12 - i++ - i = encodeVarintIndex(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.SegmentDigests) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SegmentDigests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIndex(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - return i, nil + if m.InfoDigest != 0 { + i = encodeVarintIndex(dAtA, i, uint64(m.InfoDigest)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *SegmentDigest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -475,35 +703,43 @@ func (m *SegmentDigest) Marshal() (dAtA []byte, err error) { } func (m *SegmentDigest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SegmentDigest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.SegmentType) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintIndex(dAtA, i, uint64(len(m.SegmentType))) - i += copy(dAtA[i:], m.SegmentType) - } if len(m.Files) > 0 { - for _, msg := range m.Files { - dAtA[i] = 0x12 - i++ - i = encodeVarintIndex(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Files[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIndex(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - return i, nil + if len(m.SegmentType) > 0 { + i -= len(m.SegmentType) + copy(dAtA[i:], m.SegmentType) + i = encodeVarintIndex(dAtA, i, uint64(len(m.SegmentType))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *SegmentFileDigest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -511,34 +747,45 @@ func (m *SegmentFileDigest) Marshal() (dAtA []byte, err error) { } func (m *SegmentFileDigest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SegmentFileDigest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.SegmentFileType) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintIndex(dAtA, i, uint64(len(m.SegmentFileType))) - i += copy(dAtA[i:], m.SegmentFileType) - } if m.Digest != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintIndex(dAtA, i, uint64(m.Digest)) + i-- + dAtA[i] = 0x10 } - return i, nil + if len(m.SegmentFileType) > 0 { + i -= len(m.SegmentFileType) + copy(dAtA[i:], m.SegmentFileType) + i = encodeVarintIndex(dAtA, i, uint64(len(m.SegmentFileType))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintIndex(dAtA []byte, offset int, v uint64) int { + offset -= sovIndex(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *IndexVolumeInfo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.MajorVersion != 0 { @@ -577,6 +824,9 @@ func (m *IndexVolumeInfo) Size() (n int) { } func (m *SegmentInfo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.SegmentType) @@ -603,6 +853,9 @@ func (m *SegmentInfo) Size() (n int) { } func (m *SegmentFileInfo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.SegmentFileType) @@ -613,6 +866,9 @@ func (m *SegmentFileInfo) Size() (n int) { } func (m *IndexDigests) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.InfoDigest != 0 { @@ -628,6 +884,9 @@ func (m *IndexDigests) Size() (n int) { } func (m *SegmentDigest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.SegmentType) @@ -644,6 +903,9 @@ func (m *SegmentDigest) Size() (n int) { } func (m *SegmentFileDigest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.SegmentFileType) @@ -657,14 +919,7 @@ func (m *SegmentFileDigest) Size() (n int) { } func sovIndex(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozIndex(x uint64) (n int) { return sovIndex(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -684,7 +939,7 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -712,7 +967,7 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MajorVersion |= (int64(b) & 0x7F) << shift + m.MajorVersion |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -731,7 +986,7 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockStart |= (int64(b) & 0x7F) << shift + m.BlockStart |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -750,7 +1005,7 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockSize |= (int64(b) & 0x7F) << shift + m.BlockSize |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -769,7 +1024,7 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FileType |= (int64(b) & 0x7F) << shift + m.FileType |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -786,7 +1041,7 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint32(b) & 0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -803,7 +1058,7 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -812,9 +1067,23 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIndex } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthIndex + } if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Shards) == 0 { + m.Shards = make([]uint32, 0, elementCount) + } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { @@ -826,7 +1095,7 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint32(b) & 0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -850,7 +1119,7 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SnapshotTime |= (int64(b) & 0x7F) << shift + m.SnapshotTime |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -869,7 +1138,7 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -878,6 +1147,9 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIndex } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthIndex + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -900,7 +1172,7 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -909,11 +1181,14 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIndex } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthIndex + } if postIndex > l { return io.ErrUnexpectedEOF } if m.IndexVolumeType == nil { - m.IndexVolumeType = &google_protobuf.StringValue{} + m.IndexVolumeType = &types.StringValue{} } if err := m.IndexVolumeType.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -925,7 +1200,7 @@ func (m *IndexVolumeInfo) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIndex } if (iNdEx + skippy) > l { @@ -955,7 +1230,7 @@ func (m *SegmentInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -983,7 +1258,7 @@ func (m *SegmentInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -993,6 +1268,9 @@ func (m *SegmentInfo) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIndex } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthIndex + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1012,7 +1290,7 @@ func (m *SegmentInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MajorVersion |= (int64(b) & 0x7F) << shift + m.MajorVersion |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1031,7 +1309,7 @@ func (m *SegmentInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MinorVersion |= (int64(b) & 0x7F) << shift + m.MinorVersion |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1050,7 +1328,7 @@ func (m *SegmentInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1059,6 +1337,9 @@ func (m *SegmentInfo) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIndex } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthIndex + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1081,7 +1362,7 @@ func (m *SegmentInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1090,6 +1371,9 @@ func (m *SegmentInfo) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIndex } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthIndex + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1104,7 +1388,7 @@ func (m *SegmentInfo) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIndex } if (iNdEx + skippy) > l { @@ -1134,7 +1418,7 @@ func (m *SegmentFileInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1162,7 +1446,7 @@ func (m *SegmentFileInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1172,6 +1456,9 @@ func (m *SegmentFileInfo) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIndex } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthIndex + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1183,7 +1470,7 @@ func (m *SegmentFileInfo) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIndex } if (iNdEx + skippy) > l { @@ -1213,7 +1500,7 @@ func (m *IndexDigests) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1241,7 +1528,7 @@ func (m *IndexDigests) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.InfoDigest |= (uint32(b) & 0x7F) << shift + m.InfoDigest |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1260,7 +1547,7 @@ func (m *IndexDigests) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1269,6 +1556,9 @@ func (m *IndexDigests) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIndex } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthIndex + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1283,7 +1573,7 @@ func (m *IndexDigests) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIndex } if (iNdEx + skippy) > l { @@ -1313,7 +1603,7 @@ func (m *SegmentDigest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1341,7 +1631,7 @@ func (m *SegmentDigest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1351,6 +1641,9 @@ func (m *SegmentDigest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIndex } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthIndex + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1370,7 +1663,7 @@ func (m *SegmentDigest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1379,6 +1672,9 @@ func (m *SegmentDigest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIndex } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthIndex + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1393,7 +1689,7 @@ func (m *SegmentDigest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIndex } if (iNdEx + skippy) > l { @@ -1423,7 +1719,7 @@ func (m *SegmentFileDigest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1451,7 +1747,7 @@ func (m *SegmentFileDigest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1461,6 +1757,9 @@ func (m *SegmentFileDigest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthIndex } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthIndex + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1480,7 +1779,7 @@ func (m *SegmentFileDigest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Digest |= (uint32(b) & 0x7F) << shift + m.Digest |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1491,7 +1790,7 @@ func (m *SegmentFileDigest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIndex } if (iNdEx + skippy) > l { @@ -1509,6 +1808,7 @@ func (m *SegmentFileDigest) Unmarshal(dAtA []byte) error { func skipIndex(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1540,10 +1840,8 @@ func skipIndex(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1560,92 +1858,34 @@ func skipIndex(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthIndex } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIndex - } - 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 := skipIndex(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupIndex + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthIndex + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthIndex = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIndex = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthIndex = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIndex = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupIndex = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/index/index.proto", fileDescriptorIndex) -} - -var fileDescriptorIndex = []byte{ - // 484 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x8a, 0xdb, 0x30, - 0x10, 0xc6, 0x6b, 0xbb, 0x49, 0xb3, 0xe3, 0xa4, 0x69, 0x45, 0x59, 0xcc, 0xb2, 0x18, 0xe3, 0x93, - 0x0f, 0xc5, 0x86, 0xe4, 0xd8, 0x42, 0xa1, 0x94, 0x85, 0xbd, 0x3a, 0xdb, 0xdc, 0xe5, 0x58, 0x71, - 0xd4, 0xda, 0x92, 0x91, 0x14, 0xfa, 0xe7, 0x29, 0xfa, 0x4a, 0xa5, 0x97, 0x1e, 0xfb, 0x08, 0x25, - 0x7d, 0x91, 0x22, 0xc9, 0x9b, 0x38, 0xc9, 0x1e, 0xf6, 0x12, 0xf8, 0xbe, 0xf9, 0xe4, 0x99, 0xf9, - 0x65, 0xe0, 0x5d, 0x45, 0xd5, 0x66, 0x5b, 0xa4, 0x2b, 0xde, 0x64, 0xcd, 0xbc, 0x2c, 0xb2, 0x66, - 0x9e, 0x49, 0xb1, 0xca, 0xca, 0x82, 0xf1, 0x92, 0x64, 0x15, 0x61, 0x44, 0x60, 0x45, 0xca, 0xac, - 0x15, 0x5c, 0xf1, 0x8c, 0xb2, 0x92, 0x7c, 0xb5, 0xbf, 0xa9, 0x71, 0xd0, 0xc0, 0x88, 0xab, 0xb0, - 0xe2, 0xbc, 0xaa, 0x89, 0x8d, 0x15, 0xdb, 0x75, 0xf6, 0x45, 0xe0, 0xb6, 0x25, 0x42, 0xda, 0x58, - 0xfc, 0xcb, 0x85, 0xe9, 0xad, 0x4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36, 0x44, 0xe1, 0x12, - 0x2b, 0x6c, 0x48, 0x8e, 0xf3, 0xbd, 0x46, 0xaf, 0x61, 0xa0, 0xa9, 0x5a, 0x90, 0xfe, 0xec, 0xf2, - 0x18, 0xc5, 0x0d, 0xad, 0xcd, 0xdf, 0x9d, 0xdb, 0x50, 0xfc, 0x06, 0xa6, 0x27, 0x15, 0x94, 0xc0, - 0x54, 0x1e, 0xac, 0xde, 0x2a, 0xa7, 0x76, 0x5c, 0xc3, 0xd8, 0x5c, 0xd1, 0x07, 0x5a, 0x11, 0xa9, - 0xa4, 0x3e, 0x0f, 0xca, 0xd6, 0xdc, 0x4a, 0xf3, 0x68, 0x92, 0xf7, 0x1c, 0xf4, 0x16, 0x9e, 0x77, - 0x9f, 0xe8, 0x5e, 0x04, 0xae, 0x99, 0xf1, 0xd5, 0xf1, 0x8c, 0xb6, 0x98, 0x9f, 0x64, 0x63, 0x0c, - 0x93, 0xa3, 0xc0, 0x23, 0x78, 0xa7, 0xf7, 0x2c, 0x6c, 0x9f, 0xe0, 0x9c, 0x45, 0xd7, 0xab, 0xa3, - 0xf1, 0x11, 0x5e, 0x9e, 0xd5, 0x1e, 0xcf, 0x43, 0x1f, 0x71, 0x69, 0x77, 0x77, 0xcd, 0xee, 0x9d, - 0x7a, 0xff, 0xe2, 0xf7, 0x2e, 0x74, 0xfe, 0xec, 0x42, 0xe7, 0xef, 0x2e, 0x74, 0x7e, 0xfc, 0x0b, - 0x9f, 0x14, 0x43, 0x73, 0x61, 0xf3, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x48, 0x32, 0xee, 0x47, - 0xf1, 0x03, 0x00, 0x00, -} diff --git a/src/dbnode/generated/proto/namespace/namespace.pb.go b/src/dbnode/generated/proto/namespace/namespace.pb.go index abc87be7ba..e29050e499 100644 --- a/src/dbnode/generated/proto/namespace/namespace.pb.go +++ b/src/dbnode/generated/proto/namespace/namespace.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/dbnode/generated/proto/namespace/namespace.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,38 +21,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package namespace is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/dbnode/generated/proto/namespace/namespace.proto - github.com/m3db/m3/src/dbnode/generated/proto/namespace/schema.proto - - It has these top-level messages: - RetentionOptions - IndexOptions - NamespaceOptions - AggregationOptions - Aggregation - AggregatedAttributes - DownsampleOptions - StagingState - Registry - NamespaceRuntimeOptions - ExtendedOptions - SchemaOptions - SchemaHistory - FileDescriptorSet -*/ package namespace -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/gogo/protobuf/types" -import google_protobuf1 "github.com/gogo/protobuf/types" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -63,7 +41,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // StagingStatus represents the current status of the namespace. type StagingStatus int32 @@ -82,6 +60,7 @@ var StagingStatus_name = map[int32]string{ 1: "INITIALIZING", 2: "READY", } + var StagingStatus_value = map[string]int32{ "UNKNOWN": 0, "INITIALIZING": 1, @@ -91,7 +70,10 @@ var StagingStatus_value = map[string]int32{ func (x StagingStatus) String() string { return proto.EnumName(StagingStatus_name, int32(x)) } -func (StagingStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{0} } + +func (StagingStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f7614f6b10dee3d7, []int{0} +} type RetentionOptions struct { RetentionPeriodNanos int64 `protobuf:"varint,1,opt,name=retentionPeriodNanos,proto3" json:"retentionPeriodNanos,omitempty"` @@ -103,10 +85,38 @@ type RetentionOptions struct { FutureRetentionPeriodNanos int64 `protobuf:"varint,7,opt,name=futureRetentionPeriodNanos,proto3" json:"futureRetentionPeriodNanos,omitempty"` } -func (m *RetentionOptions) Reset() { *m = RetentionOptions{} } -func (m *RetentionOptions) String() string { return proto.CompactTextString(m) } -func (*RetentionOptions) ProtoMessage() {} -func (*RetentionOptions) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{0} } +func (m *RetentionOptions) Reset() { *m = RetentionOptions{} } +func (m *RetentionOptions) String() string { return proto.CompactTextString(m) } +func (*RetentionOptions) ProtoMessage() {} +func (*RetentionOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_f7614f6b10dee3d7, []int{0} +} +func (m *RetentionOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RetentionOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RetentionOptions.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 *RetentionOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetentionOptions.Merge(m, src) +} +func (m *RetentionOptions) XXX_Size() int { + return m.Size() +} +func (m *RetentionOptions) XXX_DiscardUnknown() { + xxx_messageInfo_RetentionOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_RetentionOptions proto.InternalMessageInfo func (m *RetentionOptions) GetRetentionPeriodNanos() int64 { if m != nil { @@ -162,10 +172,38 @@ type IndexOptions struct { BlockSizeNanos int64 `protobuf:"varint,2,opt,name=blockSizeNanos,proto3" json:"blockSizeNanos,omitempty"` } -func (m *IndexOptions) Reset() { *m = IndexOptions{} } -func (m *IndexOptions) String() string { return proto.CompactTextString(m) } -func (*IndexOptions) ProtoMessage() {} -func (*IndexOptions) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{1} } +func (m *IndexOptions) Reset() { *m = IndexOptions{} } +func (m *IndexOptions) String() string { return proto.CompactTextString(m) } +func (*IndexOptions) ProtoMessage() {} +func (*IndexOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_f7614f6b10dee3d7, []int{1} +} +func (m *IndexOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IndexOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IndexOptions.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 *IndexOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexOptions.Merge(m, src) +} +func (m *IndexOptions) XXX_Size() int { + return m.Size() +} +func (m *IndexOptions) XXX_DiscardUnknown() { + xxx_messageInfo_IndexOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexOptions proto.InternalMessageInfo func (m *IndexOptions) GetEnabled() bool { if m != nil { @@ -182,28 +220,56 @@ func (m *IndexOptions) GetBlockSizeNanos() int64 { } type NamespaceOptions struct { - BootstrapEnabled bool `protobuf:"varint,1,opt,name=bootstrapEnabled,proto3" json:"bootstrapEnabled,omitempty"` - FlushEnabled bool `protobuf:"varint,2,opt,name=flushEnabled,proto3" json:"flushEnabled,omitempty"` - WritesToCommitLog bool `protobuf:"varint,3,opt,name=writesToCommitLog,proto3" json:"writesToCommitLog,omitempty"` - CleanupEnabled bool `protobuf:"varint,4,opt,name=cleanupEnabled,proto3" json:"cleanupEnabled,omitempty"` - RepairEnabled bool `protobuf:"varint,5,opt,name=repairEnabled,proto3" json:"repairEnabled,omitempty"` - RetentionOptions *RetentionOptions `protobuf:"bytes,6,opt,name=retentionOptions" json:"retentionOptions,omitempty"` - SnapshotEnabled bool `protobuf:"varint,7,opt,name=snapshotEnabled,proto3" json:"snapshotEnabled,omitempty"` - IndexOptions *IndexOptions `protobuf:"bytes,8,opt,name=indexOptions" json:"indexOptions,omitempty"` - SchemaOptions *SchemaOptions `protobuf:"bytes,9,opt,name=schemaOptions" json:"schemaOptions,omitempty"` - ColdWritesEnabled bool `protobuf:"varint,10,opt,name=coldWritesEnabled,proto3" json:"coldWritesEnabled,omitempty"` - RuntimeOptions *NamespaceRuntimeOptions `protobuf:"bytes,11,opt,name=runtimeOptions" json:"runtimeOptions,omitempty"` - CacheBlocksOnRetrieve *google_protobuf1.BoolValue `protobuf:"bytes,12,opt,name=cacheBlocksOnRetrieve" json:"cacheBlocksOnRetrieve,omitempty"` - AggregationOptions *AggregationOptions `protobuf:"bytes,13,opt,name=aggregationOptions" json:"aggregationOptions,omitempty"` - StagingState *StagingState `protobuf:"bytes,14,opt,name=stagingState" json:"stagingState,omitempty"` + BootstrapEnabled bool `protobuf:"varint,1,opt,name=bootstrapEnabled,proto3" json:"bootstrapEnabled,omitempty"` + FlushEnabled bool `protobuf:"varint,2,opt,name=flushEnabled,proto3" json:"flushEnabled,omitempty"` + WritesToCommitLog bool `protobuf:"varint,3,opt,name=writesToCommitLog,proto3" json:"writesToCommitLog,omitempty"` + CleanupEnabled bool `protobuf:"varint,4,opt,name=cleanupEnabled,proto3" json:"cleanupEnabled,omitempty"` + RepairEnabled bool `protobuf:"varint,5,opt,name=repairEnabled,proto3" json:"repairEnabled,omitempty"` + RetentionOptions *RetentionOptions `protobuf:"bytes,6,opt,name=retentionOptions,proto3" json:"retentionOptions,omitempty"` + SnapshotEnabled bool `protobuf:"varint,7,opt,name=snapshotEnabled,proto3" json:"snapshotEnabled,omitempty"` + IndexOptions *IndexOptions `protobuf:"bytes,8,opt,name=indexOptions,proto3" json:"indexOptions,omitempty"` + SchemaOptions *SchemaOptions `protobuf:"bytes,9,opt,name=schemaOptions,proto3" json:"schemaOptions,omitempty"` + ColdWritesEnabled bool `protobuf:"varint,10,opt,name=coldWritesEnabled,proto3" json:"coldWritesEnabled,omitempty"` + RuntimeOptions *NamespaceRuntimeOptions `protobuf:"bytes,11,opt,name=runtimeOptions,proto3" json:"runtimeOptions,omitempty"` + CacheBlocksOnRetrieve *types.BoolValue `protobuf:"bytes,12,opt,name=cacheBlocksOnRetrieve,proto3" json:"cacheBlocksOnRetrieve,omitempty"` + AggregationOptions *AggregationOptions `protobuf:"bytes,13,opt,name=aggregationOptions,proto3" json:"aggregationOptions,omitempty"` + StagingState *StagingState `protobuf:"bytes,14,opt,name=stagingState,proto3" json:"stagingState,omitempty"` // Use larger field ID to ensure new fields are always added before extended options. - ExtendedOptions *ExtendedOptions `protobuf:"bytes,1000,opt,name=extendedOptions" json:"extendedOptions,omitempty"` + ExtendedOptions *ExtendedOptions `protobuf:"bytes,1000,opt,name=extendedOptions,proto3" json:"extendedOptions,omitempty"` +} + +func (m *NamespaceOptions) Reset() { *m = NamespaceOptions{} } +func (m *NamespaceOptions) String() string { return proto.CompactTextString(m) } +func (*NamespaceOptions) ProtoMessage() {} +func (*NamespaceOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_f7614f6b10dee3d7, []int{2} +} +func (m *NamespaceOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceOptions.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 *NamespaceOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceOptions.Merge(m, src) +} +func (m *NamespaceOptions) XXX_Size() int { + return m.Size() +} +func (m *NamespaceOptions) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceOptions.DiscardUnknown(m) } -func (m *NamespaceOptions) Reset() { *m = NamespaceOptions{} } -func (m *NamespaceOptions) String() string { return proto.CompactTextString(m) } -func (*NamespaceOptions) ProtoMessage() {} -func (*NamespaceOptions) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{2} } +var xxx_messageInfo_NamespaceOptions proto.InternalMessageInfo func (m *NamespaceOptions) GetBootstrapEnabled() bool { if m != nil { @@ -282,7 +348,7 @@ func (m *NamespaceOptions) GetRuntimeOptions() *NamespaceRuntimeOptions { return nil } -func (m *NamespaceOptions) GetCacheBlocksOnRetrieve() *google_protobuf1.BoolValue { +func (m *NamespaceOptions) GetCacheBlocksOnRetrieve() *types.BoolValue { if m != nil { return m.CacheBlocksOnRetrieve } @@ -316,13 +382,41 @@ type AggregationOptions struct { // aggregations is a repeated field to support the ability to send aggregated data // to a namespace also receiving unaggregated data. In this case, the namespace will // have one Aggregation with aggregated set to false and another with aggregated set to true. - Aggregations []*Aggregation `protobuf:"bytes,1,rep,name=aggregations" json:"aggregations,omitempty"` + Aggregations []*Aggregation `protobuf:"bytes,1,rep,name=aggregations,proto3" json:"aggregations,omitempty"` } -func (m *AggregationOptions) Reset() { *m = AggregationOptions{} } -func (m *AggregationOptions) String() string { return proto.CompactTextString(m) } -func (*AggregationOptions) ProtoMessage() {} -func (*AggregationOptions) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{3} } +func (m *AggregationOptions) Reset() { *m = AggregationOptions{} } +func (m *AggregationOptions) String() string { return proto.CompactTextString(m) } +func (*AggregationOptions) ProtoMessage() {} +func (*AggregationOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_f7614f6b10dee3d7, []int{3} +} +func (m *AggregationOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AggregationOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AggregationOptions.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 *AggregationOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_AggregationOptions.Merge(m, src) +} +func (m *AggregationOptions) XXX_Size() int { + return m.Size() +} +func (m *AggregationOptions) XXX_DiscardUnknown() { + xxx_messageInfo_AggregationOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_AggregationOptions proto.InternalMessageInfo func (m *AggregationOptions) GetAggregations() []*Aggregation { if m != nil { @@ -338,13 +432,41 @@ type Aggregation struct { // attributes specifies how to aggregate data when aggregated is set to true. // This field is ignored when aggregated is false and required when aggregated // is true. - Attributes *AggregatedAttributes `protobuf:"bytes,2,opt,name=attributes" json:"attributes,omitempty"` + Attributes *AggregatedAttributes `protobuf:"bytes,2,opt,name=attributes,proto3" json:"attributes,omitempty"` } -func (m *Aggregation) Reset() { *m = Aggregation{} } -func (m *Aggregation) String() string { return proto.CompactTextString(m) } -func (*Aggregation) ProtoMessage() {} -func (*Aggregation) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{4} } +func (m *Aggregation) Reset() { *m = Aggregation{} } +func (m *Aggregation) String() string { return proto.CompactTextString(m) } +func (*Aggregation) ProtoMessage() {} +func (*Aggregation) Descriptor() ([]byte, []int) { + return fileDescriptor_f7614f6b10dee3d7, []int{4} +} +func (m *Aggregation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Aggregation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Aggregation.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 *Aggregation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Aggregation.Merge(m, src) +} +func (m *Aggregation) XXX_Size() int { + return m.Size() +} +func (m *Aggregation) XXX_DiscardUnknown() { + xxx_messageInfo_Aggregation.DiscardUnknown(m) +} + +var xxx_messageInfo_Aggregation proto.InternalMessageInfo func (m *Aggregation) GetAggregated() bool { if m != nil { @@ -364,13 +486,41 @@ func (m *Aggregation) GetAttributes() *AggregatedAttributes { type AggregatedAttributes struct { // resolutionNanos is the time range to aggregate data across. ResolutionNanos int64 `protobuf:"varint,1,opt,name=resolutionNanos,proto3" json:"resolutionNanos,omitempty"` - DownsampleOptions *DownsampleOptions `protobuf:"bytes,2,opt,name=downsampleOptions" json:"downsampleOptions,omitempty"` + DownsampleOptions *DownsampleOptions `protobuf:"bytes,2,opt,name=downsampleOptions,proto3" json:"downsampleOptions,omitempty"` +} + +func (m *AggregatedAttributes) Reset() { *m = AggregatedAttributes{} } +func (m *AggregatedAttributes) String() string { return proto.CompactTextString(m) } +func (*AggregatedAttributes) ProtoMessage() {} +func (*AggregatedAttributes) Descriptor() ([]byte, []int) { + return fileDescriptor_f7614f6b10dee3d7, []int{5} +} +func (m *AggregatedAttributes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AggregatedAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AggregatedAttributes.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 *AggregatedAttributes) XXX_Merge(src proto.Message) { + xxx_messageInfo_AggregatedAttributes.Merge(m, src) +} +func (m *AggregatedAttributes) XXX_Size() int { + return m.Size() +} +func (m *AggregatedAttributes) XXX_DiscardUnknown() { + xxx_messageInfo_AggregatedAttributes.DiscardUnknown(m) } -func (m *AggregatedAttributes) Reset() { *m = AggregatedAttributes{} } -func (m *AggregatedAttributes) String() string { return proto.CompactTextString(m) } -func (*AggregatedAttributes) ProtoMessage() {} -func (*AggregatedAttributes) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{5} } +var xxx_messageInfo_AggregatedAttributes proto.InternalMessageInfo func (m *AggregatedAttributes) GetResolutionNanos() int64 { if m != nil { @@ -393,10 +543,38 @@ type DownsampleOptions struct { All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"` } -func (m *DownsampleOptions) Reset() { *m = DownsampleOptions{} } -func (m *DownsampleOptions) String() string { return proto.CompactTextString(m) } -func (*DownsampleOptions) ProtoMessage() {} -func (*DownsampleOptions) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{6} } +func (m *DownsampleOptions) Reset() { *m = DownsampleOptions{} } +func (m *DownsampleOptions) String() string { return proto.CompactTextString(m) } +func (*DownsampleOptions) ProtoMessage() {} +func (*DownsampleOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_f7614f6b10dee3d7, []int{6} +} +func (m *DownsampleOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DownsampleOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DownsampleOptions.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 *DownsampleOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_DownsampleOptions.Merge(m, src) +} +func (m *DownsampleOptions) XXX_Size() int { + return m.Size() +} +func (m *DownsampleOptions) XXX_DiscardUnknown() { + xxx_messageInfo_DownsampleOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_DownsampleOptions proto.InternalMessageInfo func (m *DownsampleOptions) GetAll() bool { if m != nil { @@ -411,10 +589,38 @@ type StagingState struct { Status StagingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=namespace.StagingStatus" json:"status,omitempty"` } -func (m *StagingState) Reset() { *m = StagingState{} } -func (m *StagingState) String() string { return proto.CompactTextString(m) } -func (*StagingState) ProtoMessage() {} -func (*StagingState) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{7} } +func (m *StagingState) Reset() { *m = StagingState{} } +func (m *StagingState) String() string { return proto.CompactTextString(m) } +func (*StagingState) ProtoMessage() {} +func (*StagingState) Descriptor() ([]byte, []int) { + return fileDescriptor_f7614f6b10dee3d7, []int{7} +} +func (m *StagingState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StagingState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StagingState.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 *StagingState) XXX_Merge(src proto.Message) { + xxx_messageInfo_StagingState.Merge(m, src) +} +func (m *StagingState) XXX_Size() int { + return m.Size() +} +func (m *StagingState) XXX_DiscardUnknown() { + xxx_messageInfo_StagingState.DiscardUnknown(m) +} + +var xxx_messageInfo_StagingState proto.InternalMessageInfo func (m *StagingState) GetStatus() StagingStatus { if m != nil { @@ -424,13 +630,41 @@ func (m *StagingState) GetStatus() StagingStatus { } type Registry struct { - Namespaces map[string]*NamespaceOptions `protobuf:"bytes,1,rep,name=namespaces" json:"namespaces,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Namespaces map[string]*NamespaceOptions `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *Registry) Reset() { *m = Registry{} } +func (m *Registry) String() string { return proto.CompactTextString(m) } +func (*Registry) ProtoMessage() {} +func (*Registry) Descriptor() ([]byte, []int) { + return fileDescriptor_f7614f6b10dee3d7, []int{8} +} +func (m *Registry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Registry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Registry.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 *Registry) XXX_Merge(src proto.Message) { + xxx_messageInfo_Registry.Merge(m, src) +} +func (m *Registry) XXX_Size() int { + return m.Size() +} +func (m *Registry) XXX_DiscardUnknown() { + xxx_messageInfo_Registry.DiscardUnknown(m) } -func (m *Registry) Reset() { *m = Registry{} } -func (m *Registry) String() string { return proto.CompactTextString(m) } -func (*Registry) ProtoMessage() {} -func (*Registry) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{8} } +var xxx_messageInfo_Registry proto.InternalMessageInfo func (m *Registry) GetNamespaces() map[string]*NamespaceOptions { if m != nil { @@ -440,23 +674,51 @@ func (m *Registry) GetNamespaces() map[string]*NamespaceOptions { } type NamespaceRuntimeOptions struct { - WriteIndexingPerCPUConcurrency *google_protobuf1.DoubleValue `protobuf:"bytes,1,opt,name=writeIndexingPerCPUConcurrency" json:"writeIndexingPerCPUConcurrency,omitempty"` - FlushIndexingPerCPUConcurrency *google_protobuf1.DoubleValue `protobuf:"bytes,2,opt,name=flushIndexingPerCPUConcurrency" json:"flushIndexingPerCPUConcurrency,omitempty"` + WriteIndexingPerCPUConcurrency *types.DoubleValue `protobuf:"bytes,1,opt,name=writeIndexingPerCPUConcurrency,proto3" json:"writeIndexingPerCPUConcurrency,omitempty"` + FlushIndexingPerCPUConcurrency *types.DoubleValue `protobuf:"bytes,2,opt,name=flushIndexingPerCPUConcurrency,proto3" json:"flushIndexingPerCPUConcurrency,omitempty"` } -func (m *NamespaceRuntimeOptions) Reset() { *m = NamespaceRuntimeOptions{} } -func (m *NamespaceRuntimeOptions) String() string { return proto.CompactTextString(m) } -func (*NamespaceRuntimeOptions) ProtoMessage() {} -func (*NamespaceRuntimeOptions) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{9} } +func (m *NamespaceRuntimeOptions) Reset() { *m = NamespaceRuntimeOptions{} } +func (m *NamespaceRuntimeOptions) String() string { return proto.CompactTextString(m) } +func (*NamespaceRuntimeOptions) ProtoMessage() {} +func (*NamespaceRuntimeOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_f7614f6b10dee3d7, []int{9} +} +func (m *NamespaceRuntimeOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceRuntimeOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceRuntimeOptions.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 *NamespaceRuntimeOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceRuntimeOptions.Merge(m, src) +} +func (m *NamespaceRuntimeOptions) XXX_Size() int { + return m.Size() +} +func (m *NamespaceRuntimeOptions) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceRuntimeOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_NamespaceRuntimeOptions proto.InternalMessageInfo -func (m *NamespaceRuntimeOptions) GetWriteIndexingPerCPUConcurrency() *google_protobuf1.DoubleValue { +func (m *NamespaceRuntimeOptions) GetWriteIndexingPerCPUConcurrency() *types.DoubleValue { if m != nil { return m.WriteIndexingPerCPUConcurrency } return nil } -func (m *NamespaceRuntimeOptions) GetFlushIndexingPerCPUConcurrency() *google_protobuf1.DoubleValue { +func (m *NamespaceRuntimeOptions) GetFlushIndexingPerCPUConcurrency() *types.DoubleValue { if m != nil { return m.FlushIndexingPerCPUConcurrency } @@ -464,14 +726,42 @@ func (m *NamespaceRuntimeOptions) GetFlushIndexingPerCPUConcurrency() *google_pr } type ExtendedOptions struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Options *google_protobuf.Struct `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Options *types.Struct `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` +} + +func (m *ExtendedOptions) Reset() { *m = ExtendedOptions{} } +func (m *ExtendedOptions) String() string { return proto.CompactTextString(m) } +func (*ExtendedOptions) ProtoMessage() {} +func (*ExtendedOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_f7614f6b10dee3d7, []int{10} +} +func (m *ExtendedOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExtendedOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExtendedOptions.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 *ExtendedOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtendedOptions.Merge(m, src) +} +func (m *ExtendedOptions) XXX_Size() int { + return m.Size() +} +func (m *ExtendedOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ExtendedOptions.DiscardUnknown(m) } -func (m *ExtendedOptions) Reset() { *m = ExtendedOptions{} } -func (m *ExtendedOptions) String() string { return proto.CompactTextString(m) } -func (*ExtendedOptions) ProtoMessage() {} -func (*ExtendedOptions) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{10} } +var xxx_messageInfo_ExtendedOptions proto.InternalMessageInfo func (m *ExtendedOptions) GetType() string { if m != nil { @@ -480,7 +770,7 @@ func (m *ExtendedOptions) GetType() string { return "" } -func (m *ExtendedOptions) GetOptions() *google_protobuf.Struct { +func (m *ExtendedOptions) GetOptions() *types.Struct { if m != nil { return m.Options } @@ -488,6 +778,7 @@ func (m *ExtendedOptions) GetOptions() *google_protobuf.Struct { } func init() { + proto.RegisterEnum("namespace.StagingStatus", StagingStatus_name, StagingStatus_value) proto.RegisterType((*RetentionOptions)(nil), "namespace.RetentionOptions") proto.RegisterType((*IndexOptions)(nil), "namespace.IndexOptions") proto.RegisterType((*NamespaceOptions)(nil), "namespace.NamespaceOptions") @@ -497,14 +788,87 @@ func init() { proto.RegisterType((*DownsampleOptions)(nil), "namespace.DownsampleOptions") proto.RegisterType((*StagingState)(nil), "namespace.StagingState") proto.RegisterType((*Registry)(nil), "namespace.Registry") + proto.RegisterMapType((map[string]*NamespaceOptions)(nil), "namespace.Registry.NamespacesEntry") proto.RegisterType((*NamespaceRuntimeOptions)(nil), "namespace.NamespaceRuntimeOptions") proto.RegisterType((*ExtendedOptions)(nil), "namespace.ExtendedOptions") - proto.RegisterEnum("namespace.StagingStatus", StagingStatus_name, StagingStatus_value) } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/namespace/namespace.proto", fileDescriptor_f7614f6b10dee3d7) +} + +var fileDescriptor_f7614f6b10dee3d7 = []byte{ + // 1010 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0x4b, 0x6f, 0xdb, 0x46, + 0x10, 0x80, 0x4d, 0xbf, 0x64, 0x8f, 0x64, 0x5b, 0x5e, 0xa4, 0xb5, 0xe0, 0xa4, 0x6a, 0xc0, 0x3e, + 0x60, 0x04, 0x85, 0xd4, 0xd8, 0x97, 0x36, 0x05, 0xd2, 0xca, 0xb6, 0x6a, 0x28, 0x4d, 0x65, 0x61, + 0x9d, 0x34, 0xad, 0x6f, 0x4b, 0x72, 0x44, 0x13, 0xa1, 0xb8, 0xc4, 0xee, 0x32, 0xb6, 0xfa, 0x1b, + 0x72, 0xe8, 0xff, 0xe8, 0x1f, 0xe9, 0x31, 0xc7, 0x1e, 0x0b, 0x1b, 0x05, 0x7a, 0xe9, 0x7f, 0x28, + 0xb8, 0x14, 0x25, 0x3e, 0x94, 0xd4, 0xc8, 0xc5, 0x58, 0xcf, 0x7c, 0xf3, 0xd8, 0x79, 0x2c, 0x05, + 0x27, 0xae, 0xa7, 0x2e, 0x22, 0xab, 0x65, 0xf3, 0x51, 0x7b, 0x74, 0xe0, 0x58, 0xed, 0xd1, 0x41, + 0x5b, 0x0a, 0xbb, 0xed, 0x58, 0x01, 0x77, 0xb0, 0xed, 0x62, 0x80, 0x82, 0x29, 0x74, 0xda, 0xa1, + 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 0xae, 0xb5, 0xcd, + 0x7d, 0xe7, 0x85, 0x2e, 0x6b, 0x9a, 0x28, 0x24, 0xb5, 0x2e, 0x29, 0xc8, 0x13, 0xd8, 0x14, 0x51, + 0xa0, 0xbc, 0x51, 0xda, 0xfb, 0x46, 0x55, 0x87, 0x33, 0x33, 0xe1, 0xa6, 0xe3, 0x41, 0x73, 0x24, + 0x2d, 0x58, 0x92, 0x01, 0x7c, 0x60, 0x33, 0xfb, 0x02, 0x0f, 0xe3, 0x09, 0x93, 0xa7, 0x01, 0x45, + 0x25, 0x3c, 0x7c, 0x85, 0x8d, 0x9a, 0x76, 0xb9, 0xdb, 0x4a, 0x5e, 0xac, 0x56, 0xfa, 0x62, 0xb5, + 0x0e, 0x39, 0xf7, 0x7f, 0x62, 0x7e, 0x84, 0x74, 0xbe, 0x21, 0xf9, 0x11, 0x08, 0x73, 0x5d, 0x81, + 0x2e, 0xcb, 0x76, 0x6f, 0x43, 0xbb, 0xfb, 0x28, 0x93, 0x61, 0xa7, 0x04, 0xd1, 0x39, 0x86, 0x71, + 0x5f, 0xa4, 0x62, 0xae, 0x17, 0xb8, 0x67, 0x8a, 0x29, 0x6c, 0x6c, 0x96, 0xfa, 0x72, 0x96, 0x51, + 0xd3, 0x1c, 0x4c, 0xba, 0xb0, 0x85, 0x57, 0x0a, 0x03, 0x07, 0x9d, 0x34, 0x91, 0x7f, 0x2a, 0x93, + 0x8b, 0xcd, 0x1c, 0x74, 0xf3, 0x08, 0x2d, 0xda, 0x98, 0x03, 0x20, 0xe5, 0x6c, 0xc9, 0x23, 0xa8, + 0x65, 0xf2, 0x8d, 0x5f, 0xd2, 0xa5, 0xbd, 0xea, 0xfe, 0x87, 0xf3, 0xaf, 0x48, 0x73, 0xac, 0x19, + 0x40, 0x35, 0xa3, 0x24, 0x4d, 0x80, 0x54, 0x3d, 0xdd, 0xda, 0x8c, 0x84, 0x7c, 0x0b, 0xc0, 0x94, + 0x12, 0x9e, 0x15, 0x29, 0x4c, 0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, 0x48, 0x08, 0x0c, 0xec, + 0x24, 0x7e, 0xdc, 0x8b, 0xe2, 0xc6, 0x1e, 0xf3, 0xc8, 0xf2, 0x31, 0xd9, 0xd9, 0xff, 0xf1, 0x11, + 0x47, 0xd1, 0x1f, 0x81, 0xb7, 0x47, 0x59, 0xbc, 0x4d, 0x94, 0x77, 0xfb, 0x30, 0x7f, 0x86, 0xad, + 0xc2, 0xce, 0x11, 0x02, 0xcb, 0x6a, 0x1c, 0xe2, 0xa4, 0x88, 0xfa, 0x4c, 0x1e, 0x42, 0x85, 0xe7, + 0xe6, 0x6c, 0xa7, 0x14, 0xf5, 0x4c, 0xff, 0xba, 0xa2, 0x29, 0xf7, 0xe0, 0x6b, 0xd8, 0xc8, 0x0d, + 0x02, 0xa9, 0x42, 0xe5, 0x79, 0xff, 0x87, 0xfe, 0xe9, 0x8b, 0x7e, 0x7d, 0x81, 0xd4, 0xa1, 0xd6, + 0xeb, 0xf7, 0x9e, 0xf5, 0x3a, 0x4f, 0x7b, 0xe7, 0xbd, 0xfe, 0x49, 0xdd, 0x20, 0xeb, 0xb0, 0x42, + 0xbb, 0x9d, 0xe3, 0x5f, 0xea, 0x8b, 0x87, 0x8d, 0x3f, 0xae, 0x9b, 0xc6, 0x9b, 0xeb, 0xa6, 0xf1, + 0xd7, 0x75, 0xd3, 0xf8, 0xed, 0xa6, 0xb9, 0xf0, 0xe6, 0xa6, 0xb9, 0xf0, 0xe7, 0x4d, 0x73, 0xc1, + 0x5a, 0xd5, 0xe1, 0x0e, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x8d, 0xb8, 0xd4, 0x30, 0x0a, + 0x00, 0x00, +} + func (m *RetentionOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -512,57 +876,62 @@ func (m *RetentionOptions) Marshal() (dAtA []byte, err error) { } func (m *RetentionOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RetentionOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.RetentionPeriodNanos != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.RetentionPeriodNanos)) - } - if m.BlockSizeNanos != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.BlockSizeNanos)) - } - if m.BufferFutureNanos != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.BufferFutureNanos)) + if m.FutureRetentionPeriodNanos != 0 { + i = encodeVarintNamespace(dAtA, i, uint64(m.FutureRetentionPeriodNanos)) + i-- + dAtA[i] = 0x38 } - if m.BufferPastNanos != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.BufferPastNanos)) + if m.BlockDataExpiryAfterNotAccessPeriodNanos != 0 { + i = encodeVarintNamespace(dAtA, i, uint64(m.BlockDataExpiryAfterNotAccessPeriodNanos)) + i-- + dAtA[i] = 0x30 } if m.BlockDataExpiry { - dAtA[i] = 0x28 - i++ + i-- if m.BlockDataExpiry { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x28 } - if m.BlockDataExpiryAfterNotAccessPeriodNanos != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.BlockDataExpiryAfterNotAccessPeriodNanos)) + if m.BufferPastNanos != 0 { + i = encodeVarintNamespace(dAtA, i, uint64(m.BufferPastNanos)) + i-- + dAtA[i] = 0x20 } - if m.FutureRetentionPeriodNanos != 0 { - dAtA[i] = 0x38 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.FutureRetentionPeriodNanos)) + if m.BufferFutureNanos != 0 { + i = encodeVarintNamespace(dAtA, i, uint64(m.BufferFutureNanos)) + i-- + dAtA[i] = 0x18 + } + if m.BlockSizeNanos != 0 { + i = encodeVarintNamespace(dAtA, i, uint64(m.BlockSizeNanos)) + i-- + dAtA[i] = 0x10 } - return i, nil + if m.RetentionPeriodNanos != 0 { + i = encodeVarintNamespace(dAtA, i, uint64(m.RetentionPeriodNanos)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *IndexOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -570,32 +939,37 @@ func (m *IndexOptions) Marshal() (dAtA []byte, err error) { } func (m *IndexOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IndexOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.BlockSizeNanos != 0 { + i = encodeVarintNamespace(dAtA, i, uint64(m.BlockSizeNanos)) + i-- + dAtA[i] = 0x10 + } if m.Enabled { - dAtA[i] = 0x8 - i++ + i-- if m.Enabled { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ - } - if m.BlockSizeNanos != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.BlockSizeNanos)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *NamespaceOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -603,169 +977,190 @@ func (m *NamespaceOptions) Marshal() (dAtA []byte, err error) { } func (m *NamespaceOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.BootstrapEnabled { - dAtA[i] = 0x8 - i++ - if m.BootstrapEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.ExtendedOptions != nil { + { + size, err := m.ExtendedOptions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i++ + i-- + dAtA[i] = 0x3e + i-- + dAtA[i] = 0xc2 } - if m.FlushEnabled { - dAtA[i] = 0x10 - i++ - if m.FlushEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.StagingState != nil { + { + size, err := m.StagingState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i++ + i-- + dAtA[i] = 0x72 } - if m.WritesToCommitLog { - dAtA[i] = 0x18 - i++ - if m.WritesToCommitLog { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.AggregationOptions != nil { + { + size, err := m.AggregationOptions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i++ + i-- + dAtA[i] = 0x6a } - if m.CleanupEnabled { - dAtA[i] = 0x20 - i++ - if m.CleanupEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.CacheBlocksOnRetrieve != nil { + { + size, err := m.CacheBlocksOnRetrieve.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i++ + i-- + dAtA[i] = 0x62 } - if m.RepairEnabled { - dAtA[i] = 0x28 - i++ - if m.RepairEnabled { + if m.RuntimeOptions != nil { + { + size, err := m.RuntimeOptions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if m.ColdWritesEnabled { + i-- + if m.ColdWritesEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x50 } - if m.RetentionOptions != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.RetentionOptions.Size())) - n1, err := m.RetentionOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.SchemaOptions != nil { + { + size, err := m.SchemaOptions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if m.IndexOptions != nil { + { + size, err := m.IndexOptions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n1 + i-- + dAtA[i] = 0x42 } if m.SnapshotEnabled { - dAtA[i] = 0x38 - i++ + i-- if m.SnapshotEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ - } - if m.IndexOptions != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.IndexOptions.Size())) - n2, err := m.IndexOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 + i-- + dAtA[i] = 0x38 } - if m.SchemaOptions != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.SchemaOptions.Size())) - n3, err := m.SchemaOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.RetentionOptions != nil { + { + size, err := m.RetentionOptions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x32 } - if m.ColdWritesEnabled { - dAtA[i] = 0x50 - i++ - if m.ColdWritesEnabled { + if m.RepairEnabled { + i-- + if m.RepairEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ - } - if m.RuntimeOptions != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.RuntimeOptions.Size())) - n4, err := m.RuntimeOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 + i-- + dAtA[i] = 0x28 } - if m.CacheBlocksOnRetrieve != nil { - dAtA[i] = 0x62 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.CacheBlocksOnRetrieve.Size())) - n5, err := m.CacheBlocksOnRetrieve.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.CleanupEnabled { + i-- + if m.CleanupEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i += n5 + i-- + dAtA[i] = 0x20 } - if m.AggregationOptions != nil { - dAtA[i] = 0x6a - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.AggregationOptions.Size())) - n6, err := m.AggregationOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.WritesToCommitLog { + i-- + if m.WritesToCommitLog { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i += n6 + i-- + dAtA[i] = 0x18 } - if m.StagingState != nil { - dAtA[i] = 0x72 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.StagingState.Size())) - n7, err := m.StagingState.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.FlushEnabled { + i-- + if m.FlushEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i += n7 + i-- + dAtA[i] = 0x10 } - if m.ExtendedOptions != nil { - dAtA[i] = 0xc2 - i++ - dAtA[i] = 0x3e - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.ExtendedOptions.Size())) - n8, err := m.ExtendedOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.BootstrapEnabled { + i-- + if m.BootstrapEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i += n8 + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *AggregationOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -773,29 +1168,36 @@ func (m *AggregationOptions) Marshal() (dAtA []byte, err error) { } func (m *AggregationOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AggregationOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Aggregations) > 0 { - for _, msg := range m.Aggregations { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Aggregations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Aggregations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *Aggregation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -803,37 +1205,44 @@ func (m *Aggregation) Marshal() (dAtA []byte, err error) { } func (m *Aggregation) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Aggregation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.Attributes != nil { + { + size, err := m.Attributes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } if m.Aggregated { - dAtA[i] = 0x8 - i++ + i-- if m.Aggregated { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ - } - if m.Attributes != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.Attributes.Size())) - n9, err := m.Attributes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *AggregatedAttributes) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -841,32 +1250,39 @@ func (m *AggregatedAttributes) Marshal() (dAtA []byte, err error) { } func (m *AggregatedAttributes) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AggregatedAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ResolutionNanos != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.ResolutionNanos)) - } if m.DownsampleOptions != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.DownsampleOptions.Size())) - n10, err := m.DownsampleOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.DownsampleOptions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n10 + i-- + dAtA[i] = 0x12 + } + if m.ResolutionNanos != 0 { + i = encodeVarintNamespace(dAtA, i, uint64(m.ResolutionNanos)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *DownsampleOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -874,27 +1290,32 @@ func (m *DownsampleOptions) Marshal() (dAtA []byte, err error) { } func (m *DownsampleOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DownsampleOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.All { - dAtA[i] = 0x8 - i++ + i-- if m.All { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *StagingState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -902,22 +1323,27 @@ func (m *StagingState) Marshal() (dAtA []byte, err error) { } func (m *StagingState) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StagingState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Status != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintNamespace(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Registry) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -925,45 +1351,48 @@ func (m *Registry) Marshal() (dAtA []byte, err error) { } func (m *Registry) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Registry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Namespaces) > 0 { - for k, _ := range m.Namespaces { - dAtA[i] = 0xa - i++ + for k := range m.Namespaces { v := m.Namespaces[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovNamespace(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovNamespace(uint64(len(k))) + msgSize - i = encodeVarintNamespace(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) + baseI := i if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(v.Size())) - n11, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n11 + i-- + dAtA[i] = 0x12 } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintNamespace(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintNamespace(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *NamespaceRuntimeOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -971,37 +1400,46 @@ func (m *NamespaceRuntimeOptions) Marshal() (dAtA []byte, err error) { } func (m *NamespaceRuntimeOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceRuntimeOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.WriteIndexingPerCPUConcurrency != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.WriteIndexingPerCPUConcurrency.Size())) - n12, err := m.WriteIndexingPerCPUConcurrency.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } if m.FlushIndexingPerCPUConcurrency != nil { + { + size, err := m.FlushIndexingPerCPUConcurrency.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.FlushIndexingPerCPUConcurrency.Size())) - n13, err := m.FlushIndexingPerCPUConcurrency.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if m.WriteIndexingPerCPUConcurrency != nil { + { + size, err := m.WriteIndexingPerCPUConcurrency.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n13 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ExtendedOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1009,39 +1447,52 @@ func (m *ExtendedOptions) Marshal() (dAtA []byte, err error) { } func (m *ExtendedOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExtendedOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Type) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) - } if m.Options != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.Options.Size())) - n14, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n14 + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintNamespace(dAtA []byte, offset int, v uint64) int { + offset -= sovNamespace(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *RetentionOptions) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.RetentionPeriodNanos != 0 { @@ -1069,6 +1520,9 @@ func (m *RetentionOptions) Size() (n int) { } func (m *IndexOptions) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Enabled { @@ -1081,6 +1535,9 @@ func (m *IndexOptions) Size() (n int) { } func (m *NamespaceOptions) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.BootstrapEnabled { @@ -1140,6 +1597,9 @@ func (m *NamespaceOptions) Size() (n int) { } func (m *AggregationOptions) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Aggregations) > 0 { @@ -1152,6 +1612,9 @@ func (m *AggregationOptions) Size() (n int) { } func (m *Aggregation) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Aggregated { @@ -1165,6 +1628,9 @@ func (m *Aggregation) Size() (n int) { } func (m *AggregatedAttributes) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.ResolutionNanos != 0 { @@ -1178,6 +1644,9 @@ func (m *AggregatedAttributes) Size() (n int) { } func (m *DownsampleOptions) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.All { @@ -1187,6 +1656,9 @@ func (m *DownsampleOptions) Size() (n int) { } func (m *StagingState) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Status != 0 { @@ -1196,6 +1668,9 @@ func (m *StagingState) Size() (n int) { } func (m *Registry) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Namespaces) > 0 { @@ -1215,6 +1690,9 @@ func (m *Registry) Size() (n int) { } func (m *NamespaceRuntimeOptions) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.WriteIndexingPerCPUConcurrency != nil { @@ -1229,6 +1707,9 @@ func (m *NamespaceRuntimeOptions) Size() (n int) { } func (m *ExtendedOptions) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Type) @@ -1243,14 +1724,7 @@ func (m *ExtendedOptions) Size() (n int) { } func sovNamespace(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozNamespace(x uint64) (n int) { return sovNamespace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1270,7 +1744,7 @@ func (m *RetentionOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1298,7 +1772,7 @@ func (m *RetentionOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RetentionPeriodNanos |= (int64(b) & 0x7F) << shift + m.RetentionPeriodNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1317,7 +1791,7 @@ func (m *RetentionOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockSizeNanos |= (int64(b) & 0x7F) << shift + m.BlockSizeNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1336,7 +1810,7 @@ func (m *RetentionOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BufferFutureNanos |= (int64(b) & 0x7F) << shift + m.BufferFutureNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1355,7 +1829,7 @@ func (m *RetentionOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BufferPastNanos |= (int64(b) & 0x7F) << shift + m.BufferPastNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1374,7 +1848,7 @@ func (m *RetentionOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1394,7 +1868,7 @@ func (m *RetentionOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockDataExpiryAfterNotAccessPeriodNanos |= (int64(b) & 0x7F) << shift + m.BlockDataExpiryAfterNotAccessPeriodNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1413,7 +1887,7 @@ func (m *RetentionOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FutureRetentionPeriodNanos |= (int64(b) & 0x7F) << shift + m.FutureRetentionPeriodNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1424,7 +1898,7 @@ func (m *RetentionOptions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -1454,7 +1928,7 @@ func (m *IndexOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1482,7 +1956,7 @@ func (m *IndexOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1502,7 +1976,7 @@ func (m *IndexOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockSizeNanos |= (int64(b) & 0x7F) << shift + m.BlockSizeNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1513,7 +1987,7 @@ func (m *IndexOptions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -1543,7 +2017,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1571,7 +2045,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1591,7 +2065,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1611,7 +2085,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1631,7 +2105,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1651,7 +2125,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1671,7 +2145,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1680,6 +2154,9 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1704,7 +2181,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1724,7 +2201,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1733,6 +2210,9 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1757,7 +2237,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1766,6 +2246,9 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1790,7 +2273,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1810,7 +2293,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1819,6 +2302,9 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1843,7 +2329,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1852,11 +2338,14 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } if m.CacheBlocksOnRetrieve == nil { - m.CacheBlocksOnRetrieve = &google_protobuf1.BoolValue{} + m.CacheBlocksOnRetrieve = &types.BoolValue{} } if err := m.CacheBlocksOnRetrieve.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1876,7 +2365,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1885,6 +2374,9 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1909,7 +2401,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1918,6 +2410,9 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1942,7 +2437,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1951,6 +2446,9 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1967,7 +2465,7 @@ func (m *NamespaceOptions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -1997,7 +2495,7 @@ func (m *AggregationOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2025,7 +2523,7 @@ func (m *AggregationOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2034,6 +2532,9 @@ func (m *AggregationOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2048,7 +2549,7 @@ func (m *AggregationOptions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -2078,7 +2579,7 @@ func (m *Aggregation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2106,7 +2607,7 @@ func (m *Aggregation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2126,7 +2627,7 @@ func (m *Aggregation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2135,6 +2636,9 @@ func (m *Aggregation) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2151,7 +2655,7 @@ func (m *Aggregation) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -2181,7 +2685,7 @@ func (m *AggregatedAttributes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2209,7 +2713,7 @@ func (m *AggregatedAttributes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ResolutionNanos |= (int64(b) & 0x7F) << shift + m.ResolutionNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -2228,7 +2732,7 @@ func (m *AggregatedAttributes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2237,6 +2741,9 @@ func (m *AggregatedAttributes) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2253,7 +2760,7 @@ func (m *AggregatedAttributes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -2283,7 +2790,7 @@ func (m *DownsampleOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2311,7 +2818,7 @@ func (m *DownsampleOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2323,7 +2830,7 @@ func (m *DownsampleOptions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -2353,7 +2860,7 @@ func (m *StagingState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2381,7 +2888,7 @@ func (m *StagingState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= (StagingStatus(b) & 0x7F) << shift + m.Status |= StagingStatus(b&0x7F) << shift if b < 0x80 { break } @@ -2392,7 +2899,7 @@ func (m *StagingState) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -2422,7 +2929,7 @@ func (m *Registry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2450,7 +2957,7 @@ func (m *Registry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2459,6 +2966,9 @@ func (m *Registry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2479,7 +2989,7 @@ func (m *Registry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2496,7 +3006,7 @@ func (m *Registry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2506,6 +3016,9 @@ func (m *Registry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthNamespace + } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } @@ -2522,7 +3035,7 @@ func (m *Registry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift + mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2531,7 +3044,7 @@ func (m *Registry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { + if postmsgIndex < 0 { return ErrInvalidLengthNamespace } if postmsgIndex > l { @@ -2548,7 +3061,7 @@ func (m *Registry) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > postIndex { @@ -2565,7 +3078,7 @@ func (m *Registry) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -2595,7 +3108,7 @@ func (m *NamespaceRuntimeOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2623,7 +3136,7 @@ func (m *NamespaceRuntimeOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2632,11 +3145,14 @@ func (m *NamespaceRuntimeOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } if m.WriteIndexingPerCPUConcurrency == nil { - m.WriteIndexingPerCPUConcurrency = &google_protobuf1.DoubleValue{} + m.WriteIndexingPerCPUConcurrency = &types.DoubleValue{} } if err := m.WriteIndexingPerCPUConcurrency.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2656,7 +3172,7 @@ func (m *NamespaceRuntimeOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2665,11 +3181,14 @@ func (m *NamespaceRuntimeOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } if m.FlushIndexingPerCPUConcurrency == nil { - m.FlushIndexingPerCPUConcurrency = &google_protobuf1.DoubleValue{} + m.FlushIndexingPerCPUConcurrency = &types.DoubleValue{} } if err := m.FlushIndexingPerCPUConcurrency.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2681,7 +3200,7 @@ func (m *NamespaceRuntimeOptions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -2711,7 +3230,7 @@ func (m *ExtendedOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2739,7 +3258,7 @@ func (m *ExtendedOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2749,6 +3268,9 @@ func (m *ExtendedOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2768,7 +3290,7 @@ func (m *ExtendedOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2777,11 +3299,14 @@ func (m *ExtendedOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } if m.Options == nil { - m.Options = &google_protobuf.Struct{} + m.Options = &types.Struct{} } if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2793,7 +3318,7 @@ func (m *ExtendedOptions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -2811,6 +3336,7 @@ func (m *ExtendedOptions) Unmarshal(dAtA []byte) error { func skipNamespace(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2842,10 +3368,8 @@ func skipNamespace(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2862,124 +3386,34 @@ func skipNamespace(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthNamespace } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNamespace - } - 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 := skipNamespace(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupNamespace + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthNamespace + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupNamespace = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/namespace/namespace.proto", fileDescriptorNamespace) -} - -var fileDescriptorNamespace = []byte{ - // 1001 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xdd, 0x6e, 0x1b, 0x45, - 0x14, 0x80, 0xbb, 0xf9, 0x73, 0x72, 0xec, 0x24, 0xce, 0xa8, 0x10, 0x2b, 0x2d, 0xa6, 0x5a, 0x7e, - 0x14, 0x55, 0xc8, 0xa6, 0xc9, 0x0d, 0x14, 0xa9, 0xe0, 0x24, 0x26, 0x72, 0x29, 0x8e, 0x35, 0x69, - 0x29, 0xe4, 0x6e, 0x76, 0xf7, 0x78, 0xb3, 0xea, 0x7a, 0x66, 0x35, 0x33, 0xdb, 0x24, 0x3c, 0x43, - 0x2f, 0x78, 0x0f, 0x5e, 0x84, 0x4b, 0x1e, 0x01, 0x05, 0x21, 0x71, 0xc3, 0x3b, 0xa0, 0x9d, 0xf5, - 0x3a, 0xfb, 0xe3, 0x96, 0x88, 0x9b, 0x68, 0x72, 0xce, 0x77, 0x7e, 0xe6, 0xfc, 0xcc, 0x1a, 0x8e, - 0xfd, 0x40, 0x9f, 0xc7, 0x4e, 0xc7, 0x15, 0x93, 0xee, 0x64, 0xdf, 0x73, 0xba, 0x93, 0xfd, 0xae, - 0x92, 0x6e, 0xd7, 0x73, 0xb8, 0xf0, 0xb0, 0xeb, 0x23, 0x47, 0xc9, 0x34, 0x7a, 0xdd, 0x48, 0x0a, - 0x2d, 0xba, 0x9c, 0x4d, 0x50, 0x45, 0xcc, 0xc5, 0x9b, 0x53, 0xc7, 0x68, 0xc8, 0xda, 0x4c, 0xb0, - 0x73, 0xdf, 0x17, 0xc2, 0x0f, 0x31, 0x35, 0x71, 0xe2, 0x71, 0x57, 0x69, 0x19, 0xbb, 0x3a, 0x05, - 0x77, 0xda, 0x65, 0xed, 0x85, 0x64, 0x51, 0x84, 0x52, 0x4d, 0xf5, 0x47, 0xff, 0x37, 0x23, 0xe5, - 0x9e, 0xe3, 0x84, 0xa5, 0x5e, 0xec, 0x37, 0x8b, 0xd0, 0xa4, 0xa8, 0x91, 0xeb, 0x40, 0xf0, 0x93, - 0x28, 0xf9, 0xab, 0xc8, 0x1e, 0xdc, 0x95, 0x99, 0x6c, 0x84, 0x32, 0x10, 0xde, 0x90, 0x71, 0xa1, - 0x5a, 0xd6, 0x03, 0x6b, 0x77, 0x91, 0xce, 0xd5, 0x91, 0x4f, 0x61, 0xc3, 0x09, 0x85, 0xfb, 0xea, - 0x34, 0xf8, 0x19, 0x53, 0x7a, 0xc1, 0xd0, 0x25, 0x29, 0xf9, 0x0c, 0xb6, 0x9c, 0x78, 0x3c, 0x46, - 0xf9, 0x6d, 0xac, 0x63, 0x39, 0x45, 0x17, 0x0d, 0x5a, 0x55, 0x90, 0x5d, 0xd8, 0x4c, 0x85, 0x23, -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x9c, 0x15, 0x13, 0x66, 0xff, 0xdf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x48, 0x8b, 0xb8, 0x2d, 0x28, 0x0a, 0x00, 0x00, -} diff --git a/src/dbnode/generated/proto/namespace/schema.pb.go b/src/dbnode/generated/proto/namespace/schema.pb.go index 537d9f3816..22fa4cd2b8 100644 --- a/src/dbnode/generated/proto/namespace/schema.pb.go +++ b/src/dbnode/generated/proto/namespace/schema.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/dbnode/generated/proto/namespace/schema.proto -// Copyright (c) 2019 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,29 +23,65 @@ package namespace -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // 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 + // SchemaOptions contains schema information for a namespace. type SchemaOptions struct { // history contains a history of deployed schema definitions. - History *SchemaHistory `protobuf:"bytes,1,opt,name=history" json:"history,omitempty"` + History *SchemaHistory `protobuf:"bytes,1,opt,name=history,proto3" json:"history,omitempty"` // defaultMessageName identifies the proto message that contains the default schema for the namespace. DefaultMessageName string `protobuf:"bytes,2,opt,name=defaultMessageName,proto3" json:"defaultMessageName,omitempty"` } -func (m *SchemaOptions) Reset() { *m = SchemaOptions{} } -func (m *SchemaOptions) String() string { return proto.CompactTextString(m) } -func (*SchemaOptions) ProtoMessage() {} -func (*SchemaOptions) Descriptor() ([]byte, []int) { return fileDescriptorSchema, []int{0} } +func (m *SchemaOptions) Reset() { *m = SchemaOptions{} } +func (m *SchemaOptions) String() string { return proto.CompactTextString(m) } +func (*SchemaOptions) ProtoMessage() {} +func (*SchemaOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_745828f361790dec, []int{0} +} +func (m *SchemaOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SchemaOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SchemaOptions.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 *SchemaOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_SchemaOptions.Merge(m, src) +} +func (m *SchemaOptions) XXX_Size() int { + return m.Size() +} +func (m *SchemaOptions) XXX_DiscardUnknown() { + xxx_messageInfo_SchemaOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_SchemaOptions proto.InternalMessageInfo func (m *SchemaOptions) GetHistory() *SchemaHistory { if m != nil { @@ -65,13 +101,41 @@ func (m *SchemaOptions) GetDefaultMessageName() string { type SchemaHistory struct { // versions is a list of FileDescriptorSet sorted by version in ascending order. // the list is a linked list and we use FileDescriptorSet.prevId to ensure the order is ascending. - Versions []*FileDescriptorSet `protobuf:"bytes,1,rep,name=versions" json:"versions,omitempty"` + Versions []*FileDescriptorSet `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions,omitempty"` +} + +func (m *SchemaHistory) Reset() { *m = SchemaHistory{} } +func (m *SchemaHistory) String() string { return proto.CompactTextString(m) } +func (*SchemaHistory) ProtoMessage() {} +func (*SchemaHistory) Descriptor() ([]byte, []int) { + return fileDescriptor_745828f361790dec, []int{1} +} +func (m *SchemaHistory) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SchemaHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SchemaHistory.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 *SchemaHistory) XXX_Merge(src proto.Message) { + xxx_messageInfo_SchemaHistory.Merge(m, src) +} +func (m *SchemaHistory) XXX_Size() int { + return m.Size() +} +func (m *SchemaHistory) XXX_DiscardUnknown() { + xxx_messageInfo_SchemaHistory.DiscardUnknown(m) } -func (m *SchemaHistory) Reset() { *m = SchemaHistory{} } -func (m *SchemaHistory) String() string { return proto.CompactTextString(m) } -func (*SchemaHistory) ProtoMessage() {} -func (*SchemaHistory) Descriptor() ([]byte, []int) { return fileDescriptorSchema, []int{1} } +var xxx_messageInfo_SchemaHistory proto.InternalMessageInfo func (m *SchemaHistory) GetVersions() []*FileDescriptorSet { if m != nil { @@ -87,13 +151,41 @@ type FileDescriptorSet struct { // prevId identifies the previous deploy id of FileDescriptorSet. PrevId string `protobuf:"bytes,2,opt,name=prevId,proto3" json:"prevId,omitempty"` // descriptors is a list of proto file descriptors sorted by dependency in topological order. - Descriptors [][]byte `protobuf:"bytes,3,rep,name=descriptors" json:"descriptors,omitempty"` + Descriptors [][]byte `protobuf:"bytes,3,rep,name=descriptors,proto3" json:"descriptors,omitempty"` +} + +func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} } +func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) } +func (*FileDescriptorSet) ProtoMessage() {} +func (*FileDescriptorSet) Descriptor() ([]byte, []int) { + return fileDescriptor_745828f361790dec, []int{2} +} +func (m *FileDescriptorSet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FileDescriptorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FileDescriptorSet.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 *FileDescriptorSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileDescriptorSet.Merge(m, src) +} +func (m *FileDescriptorSet) XXX_Size() int { + return m.Size() +} +func (m *FileDescriptorSet) XXX_DiscardUnknown() { + xxx_messageInfo_FileDescriptorSet.DiscardUnknown(m) } -func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} } -func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) } -func (*FileDescriptorSet) ProtoMessage() {} -func (*FileDescriptorSet) Descriptor() ([]byte, []int) { return fileDescriptorSchema, []int{2} } +var xxx_messageInfo_FileDescriptorSet proto.InternalMessageInfo func (m *FileDescriptorSet) GetDeployId() string { if m != nil { @@ -121,10 +213,38 @@ func init() { proto.RegisterType((*SchemaHistory)(nil), "namespace.SchemaHistory") proto.RegisterType((*FileDescriptorSet)(nil), "namespace.FileDescriptorSet") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/namespace/schema.proto", fileDescriptor_745828f361790dec) +} + +var fileDescriptor_745828f361790dec = []byte{ + // 292 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4a, 0xc3, 0x30, + 0x18, 0xc7, 0x17, 0x07, 0x73, 0xcb, 0xf4, 0x60, 0x0e, 0x12, 0x44, 0x42, 0xd9, 0xa9, 0xa7, 0x06, + 0xb6, 0x8b, 0x67, 0x19, 0xe2, 0x0e, 0x2a, 0x74, 0x4f, 0x90, 0x36, 0x9f, 0x6b, 0xa0, 0x69, 0x42, + 0x92, 0x0d, 0xf6, 0x16, 0x3e, 0x96, 0xc7, 0x1d, 0x3d, 0x4a, 0xfb, 0x22, 0x62, 0xd7, 0x95, 0x81, + 0x1e, 0xbf, 0xff, 0xef, 0xc7, 0xf7, 0xfd, 0x13, 0xbc, 0xdc, 0xa8, 0x50, 0x6c, 0xb3, 0x24, 0x37, + 0x9a, 0xeb, 0x85, 0x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 0x0d, 0x1b, 0x1c, 0x1a, 0x36, 0xf8, 0x6a, + 0xd8, 0x20, 0x1b, 0xb5, 0xdf, 0xba, 0xf8, 0x09, 0x00, 0x00, 0xff, 0xff, 0x16, 0xb3, 0x97, 0x19, + 0x9e, 0x01, 0x00, 0x00, +} + func (m *SchemaOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -132,33 +252,41 @@ func (m *SchemaOptions) Marshal() (dAtA []byte, err error) { } func (m *SchemaOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SchemaOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.History != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintSchema(dAtA, i, uint64(m.History.Size())) - n1, err := m.History.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } if len(m.DefaultMessageName) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.DefaultMessageName) + copy(dAtA[i:], m.DefaultMessageName) i = encodeVarintSchema(dAtA, i, uint64(len(m.DefaultMessageName))) - i += copy(dAtA[i:], m.DefaultMessageName) + i-- + dAtA[i] = 0x12 + } + if m.History != nil { + { + size, err := m.History.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSchema(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *SchemaHistory) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -166,29 +294,36 @@ func (m *SchemaHistory) Marshal() (dAtA []byte, err error) { } func (m *SchemaHistory) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SchemaHistory) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Versions) > 0 { - for _, msg := range m.Versions { - dAtA[i] = 0xa - i++ - i = encodeVarintSchema(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Versions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Versions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSchema(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *FileDescriptorSet) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -196,43 +331,56 @@ func (m *FileDescriptorSet) Marshal() (dAtA []byte, err error) { } func (m *FileDescriptorSet) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FileDescriptorSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.DeployId) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSchema(dAtA, i, uint64(len(m.DeployId))) - i += copy(dAtA[i:], m.DeployId) + if len(m.Descriptors) > 0 { + for iNdEx := len(m.Descriptors) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Descriptors[iNdEx]) + copy(dAtA[i:], m.Descriptors[iNdEx]) + i = encodeVarintSchema(dAtA, i, uint64(len(m.Descriptors[iNdEx]))) + i-- + dAtA[i] = 0x1a + } } if len(m.PrevId) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.PrevId) + copy(dAtA[i:], m.PrevId) i = encodeVarintSchema(dAtA, i, uint64(len(m.PrevId))) - i += copy(dAtA[i:], m.PrevId) + i-- + dAtA[i] = 0x12 } - if len(m.Descriptors) > 0 { - for _, b := range m.Descriptors { - dAtA[i] = 0x1a - i++ - i = encodeVarintSchema(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } + if len(m.DeployId) > 0 { + i -= len(m.DeployId) + copy(dAtA[i:], m.DeployId) + i = encodeVarintSchema(dAtA, i, uint64(len(m.DeployId))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintSchema(dAtA []byte, offset int, v uint64) int { + offset -= sovSchema(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *SchemaOptions) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.History != nil { @@ -247,6 +395,9 @@ func (m *SchemaOptions) Size() (n int) { } func (m *SchemaHistory) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Versions) > 0 { @@ -259,6 +410,9 @@ func (m *SchemaHistory) Size() (n int) { } func (m *FileDescriptorSet) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.DeployId) @@ -279,14 +433,7 @@ func (m *FileDescriptorSet) Size() (n int) { } func sovSchema(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozSchema(x uint64) (n int) { return sovSchema(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -306,7 +453,7 @@ func (m *SchemaOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -334,7 +481,7 @@ func (m *SchemaOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -343,6 +490,9 @@ func (m *SchemaOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSchema } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSchema + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -367,7 +517,7 @@ func (m *SchemaOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -377,6 +527,9 @@ func (m *SchemaOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSchema } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSchema + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -388,7 +541,7 @@ func (m *SchemaOptions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSchema } if (iNdEx + skippy) > l { @@ -418,7 +571,7 @@ func (m *SchemaHistory) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -446,7 +599,7 @@ func (m *SchemaHistory) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -455,6 +608,9 @@ func (m *SchemaHistory) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSchema } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSchema + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -469,7 +625,7 @@ func (m *SchemaHistory) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSchema } if (iNdEx + skippy) > l { @@ -499,7 +655,7 @@ func (m *FileDescriptorSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -527,7 +683,7 @@ func (m *FileDescriptorSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -537,6 +693,9 @@ func (m *FileDescriptorSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSchema } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSchema + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -556,7 +715,7 @@ func (m *FileDescriptorSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -566,6 +725,9 @@ func (m *FileDescriptorSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSchema } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSchema + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -585,7 +747,7 @@ func (m *FileDescriptorSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -594,6 +756,9 @@ func (m *FileDescriptorSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSchema } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSchema + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -606,7 +771,7 @@ func (m *FileDescriptorSet) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSchema } if (iNdEx + skippy) > l { @@ -624,6 +789,7 @@ func (m *FileDescriptorSet) Unmarshal(dAtA []byte) error { func skipSchema(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -655,10 +821,8 @@ func skipSchema(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -675,79 +839,34 @@ func skipSchema(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthSchema } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSchema - } - 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 := skipSchema(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSchema + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthSchema + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthSchema = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSchema = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthSchema = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSchema = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSchema = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/namespace/schema.proto", fileDescriptorSchema) -} - -var fileDescriptorSchema = []byte{ - // 286 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4a, 0xec, 0x30, - 0x14, 0x86, 0x6f, 0xee, 0xc0, 0x38, 0x4d, 0x15, 0x34, 0x0b, 0x29, 0x22, 0xa5, 0x74, 0xd5, 0x55, - 0x03, 0xed, 0xc6, 0xb5, 0x0c, 0x62, 0x17, 0x2a, 0x74, 0x9e, 0x20, 0x6d, 0x8e, 0x6d, 0xa0, 0x69, - 0x42, 0x92, 0x19, 0x98, 0xb7, 0xf0, 0xb1, 0x5c, 0xfa, 0x08, 0x52, 0x5f, 0x44, 0xec, 0x74, 0xca, - 0x80, 0x2e, 0xcf, 0xff, 0x7d, 0x9c, 0xf3, 0x27, 0x78, 0xdd, 0x08, 0xd7, 0x6e, 0xab, 0xb4, 0x56, - 0x92, 0xca, 0x9c, 0x57, 0x54, 0xe6, 0xd4, 0x9a, 0x9a, 0xf2, 0xaa, 0x57, 0x1c, 0x68, 0x03, 0x3d, - 0x18, 0xe6, 0x80, 0x53, 0x6d, 0x94, 0x53, 0xb4, 0x67, 0x12, 0xac, 0x66, 0x35, 0x50, 0x5b, 0xb7, - 0x20, 0x59, 0x3a, 0xc6, 0xc4, 0x9b, 0xf3, 0xd8, 0xe2, 0x8b, 0xcd, 0x88, 0x5e, 0xb4, 0x13, 0xaa, - 0xb7, 0x24, 0xc3, 0x67, 0xad, 0xb0, 0x4e, 0x99, 0x7d, 0x80, 0x22, 0x94, 0xf8, 0x59, 0x90, 0xce, - 0x76, 0x7a, 0x50, 0x1f, 0x0f, 0xbc, 0x3c, 0x8a, 0x24, 0xc5, 0x84, 0xc3, 0x2b, 0xdb, 0x76, 0xee, - 0x09, 0xac, 0x65, 0x0d, 0x3c, 0x33, 0x09, 0xc1, 0xff, 0x08, 0x25, 0x5e, 0xf9, 0x07, 0x89, 0x8b, - 0xe3, 0xd1, 0x69, 0x13, 0xb9, 0xc3, 0xab, 0x1d, 0x18, 0xfb, 0x53, 0x20, 0x40, 0xd1, 0x22, 0xf1, - 0xb3, 0xdb, 0x93, 0xab, 0x0f, 0xa2, 0x83, 0x35, 0xd8, 0xda, 0x08, 0xed, 0x94, 0xd9, 0x80, 0x2b, - 0x67, 0x3b, 0x16, 0xf8, 0xea, 0x17, 0x26, 0x37, 0x78, 0xc5, 0x41, 0x77, 0x6a, 0x5f, 0xf0, 0xf1, - 0x11, 0x5e, 0x39, 0xcf, 0xe4, 0x1a, 0x2f, 0xb5, 0x81, 0x5d, 0xc1, 0xa7, 0x7e, 0xd3, 0x44, 0x22, - 0xec, 0xf3, 0x79, 0x89, 0x0d, 0x16, 0xd1, 0x22, 0x39, 0x2f, 0x4f, 0xa3, 0xfb, 0xcb, 0xf7, 0x21, - 0x44, 0x1f, 0x43, 0x88, 0x3e, 0x87, 0x10, 0xbd, 0x7d, 0x85, 0xff, 0xaa, 0xe5, 0xf8, 0x9d, 0xf9, - 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x98, 0xeb, 0x4b, 0x47, 0x96, 0x01, 0x00, 0x00, -} diff --git a/src/dbnode/generated/proto/pagetoken/pagetoken.pb.go b/src/dbnode/generated/proto/pagetoken/pagetoken.pb.go index 9f5bd68a9f..9f7ef0e7ef 100644 --- a/src/dbnode/generated/proto/pagetoken/pagetoken.pb.go +++ b/src/dbnode/generated/proto/pagetoken/pagetoken.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/dbnode/generated/proto/pagetoken/pagetoken.proto -// Copyright (c) 2019 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,22 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package pagetoken is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/dbnode/generated/proto/pagetoken/pagetoken.proto - - It has these top-level messages: - PageToken -*/ package pagetoken -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -47,17 +40,45 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type PageToken struct { - ActiveSeriesPhase *PageToken_ActiveSeriesPhase `protobuf:"bytes,1,opt,name=active_series_phase,json=activeSeriesPhase" json:"active_series_phase,omitempty"` - FlushedSeriesPhase *PageToken_FlushedSeriesPhase `protobuf:"bytes,2,opt,name=flushed_series_phase,json=flushedSeriesPhase" json:"flushed_series_phase,omitempty"` + ActiveSeriesPhase *PageToken_ActiveSeriesPhase `protobuf:"bytes,1,opt,name=active_series_phase,json=activeSeriesPhase,proto3" json:"active_series_phase,omitempty"` + FlushedSeriesPhase *PageToken_FlushedSeriesPhase `protobuf:"bytes,2,opt,name=flushed_series_phase,json=flushedSeriesPhase,proto3" json:"flushed_series_phase,omitempty"` +} + +func (m *PageToken) Reset() { *m = PageToken{} } +func (m *PageToken) String() string { return proto.CompactTextString(m) } +func (*PageToken) ProtoMessage() {} +func (*PageToken) Descriptor() ([]byte, []int) { + return fileDescriptor_cdf6e87727ef4431, []int{0} +} +func (m *PageToken) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PageToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PageToken.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 *PageToken) XXX_Merge(src proto.Message) { + xxx_messageInfo_PageToken.Merge(m, src) +} +func (m *PageToken) XXX_Size() int { + return m.Size() +} +func (m *PageToken) XXX_DiscardUnknown() { + xxx_messageInfo_PageToken.DiscardUnknown(m) } -func (m *PageToken) Reset() { *m = PageToken{} } -func (m *PageToken) String() string { return proto.CompactTextString(m) } -func (*PageToken) ProtoMessage() {} -func (*PageToken) Descriptor() ([]byte, []int) { return fileDescriptorPagetoken, []int{0} } +var xxx_messageInfo_PageToken proto.InternalMessageInfo func (m *PageToken) GetActiveSeriesPhase() *PageToken_ActiveSeriesPhase { if m != nil { @@ -81,8 +102,34 @@ func (m *PageToken_ActiveSeriesPhase) Reset() { *m = PageToken_ActiveSer func (m *PageToken_ActiveSeriesPhase) String() string { return proto.CompactTextString(m) } func (*PageToken_ActiveSeriesPhase) ProtoMessage() {} func (*PageToken_ActiveSeriesPhase) Descriptor() ([]byte, []int) { - return fileDescriptorPagetoken, []int{0, 0} + return fileDescriptor_cdf6e87727ef4431, []int{0, 0} } +func (m *PageToken_ActiveSeriesPhase) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PageToken_ActiveSeriesPhase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PageToken_ActiveSeriesPhase.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 *PageToken_ActiveSeriesPhase) XXX_Merge(src proto.Message) { + xxx_messageInfo_PageToken_ActiveSeriesPhase.Merge(m, src) +} +func (m *PageToken_ActiveSeriesPhase) XXX_Size() int { + return m.Size() +} +func (m *PageToken_ActiveSeriesPhase) XXX_DiscardUnknown() { + xxx_messageInfo_PageToken_ActiveSeriesPhase.DiscardUnknown(m) +} + +var xxx_messageInfo_PageToken_ActiveSeriesPhase proto.InternalMessageInfo func (m *PageToken_ActiveSeriesPhase) GetIndexCursor() int64 { if m != nil { @@ -101,8 +148,34 @@ func (m *PageToken_FlushedSeriesPhase) Reset() { *m = PageToken_FlushedS func (m *PageToken_FlushedSeriesPhase) String() string { return proto.CompactTextString(m) } func (*PageToken_FlushedSeriesPhase) ProtoMessage() {} func (*PageToken_FlushedSeriesPhase) Descriptor() ([]byte, []int) { - return fileDescriptorPagetoken, []int{0, 1} + return fileDescriptor_cdf6e87727ef4431, []int{0, 1} +} +func (m *PageToken_FlushedSeriesPhase) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PageToken_FlushedSeriesPhase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PageToken_FlushedSeriesPhase.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 *PageToken_FlushedSeriesPhase) XXX_Merge(src proto.Message) { + xxx_messageInfo_PageToken_FlushedSeriesPhase.Merge(m, src) +} +func (m *PageToken_FlushedSeriesPhase) XXX_Size() int { + return m.Size() +} +func (m *PageToken_FlushedSeriesPhase) XXX_DiscardUnknown() { + xxx_messageInfo_PageToken_FlushedSeriesPhase.DiscardUnknown(m) +} + +var xxx_messageInfo_PageToken_FlushedSeriesPhase proto.InternalMessageInfo func (m *PageToken_FlushedSeriesPhase) GetCurrBlockStartUnixNanos() int64 { if m != nil { @@ -130,10 +203,39 @@ func init() { proto.RegisterType((*PageToken_ActiveSeriesPhase)(nil), "pagetoken.PageToken.ActiveSeriesPhase") proto.RegisterType((*PageToken_FlushedSeriesPhase)(nil), "pagetoken.PageToken.FlushedSeriesPhase") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/pagetoken/pagetoken.proto", fileDescriptor_cdf6e87727ef4431) +} + +var fileDescriptor_cdf6e87727ef4431 = []byte{ + // 316 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x31, 0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x4c, 0x46, 0x25, 0xad, 0x75, 0x8a, 0x1b, 0xa5, 0x0a, 0xa4, 0x8d, 0xeb, 0xb1, 0x14, + 0xb0, 0xb8, 0x48, 0xb5, 0x51, 0xda, 0xf5, 0xf7, 0xfa, 0xdb, 0x52, 0xeb, 0x15, 0x61, 0x52, 0xbe, + 0x81, 0x9c, 0xe1, 0xbd, 0x30, 0xd5, 0xba, 0x3b, 0x55, 0xe1, 0x64, 0x60, 0xb9, 0xb6, 0xf7, 0x32, + 0x5e, 0xdc, 0x72, 0xa9, 0xcc, 0x1a, 0xf2, 0x97, 0x4d, 0x8e, 0x71, 0xa3, 0xb0, 0x2e, 0xa5, 0xd5, + 0x4f, 0x37, 0x62, 0xe1, 0xde, 0xe7, 0xf5, 0xcb, 0x06, 0xd9, 0xc5, 0xd5, 0xb9, 0x9a, 0xa6, 0x09, + 0x34, 0x3d, 0x17, 0x59, 0x4f, 0xdd, 0xe6, 0x5b, 0x46, 0xd1, 0x32, 0xa3, 0xe8, 0x23, 0xa3, 0xe8, + 0x25, 0xa7, 0x95, 0x65, 0x4e, 0x2b, 0xef, 0x39, 0xad, 0x04, 0x55, 0xf7, 0x75, 0x9d, 0xcf, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x73, 0xb0, 0x1d, 0x23, 0x05, 0x02, 0x00, 0x00, +} + func (m *PageToken) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -141,37 +243,46 @@ func (m *PageToken) Marshal() (dAtA []byte, err error) { } func (m *PageToken) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PageToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ActiveSeriesPhase != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPagetoken(dAtA, i, uint64(m.ActiveSeriesPhase.Size())) - n1, err := m.ActiveSeriesPhase.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } if m.FlushedSeriesPhase != nil { + { + size, err := m.FlushedSeriesPhase.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPagetoken(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintPagetoken(dAtA, i, uint64(m.FlushedSeriesPhase.Size())) - n2, err := m.FlushedSeriesPhase.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if m.ActiveSeriesPhase != nil { + { + size, err := m.ActiveSeriesPhase.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPagetoken(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *PageToken_ActiveSeriesPhase) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -179,22 +290,27 @@ func (m *PageToken_ActiveSeriesPhase) Marshal() (dAtA []byte, err error) { } func (m *PageToken_ActiveSeriesPhase) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PageToken_ActiveSeriesPhase) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.IndexCursor != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintPagetoken(dAtA, i, uint64(m.IndexCursor)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *PageToken_FlushedSeriesPhase) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -202,38 +318,48 @@ func (m *PageToken_FlushedSeriesPhase) Marshal() (dAtA []byte, err error) { } func (m *PageToken_FlushedSeriesPhase) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PageToken_FlushedSeriesPhase) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CurrBlockStartUnixNanos != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPagetoken(dAtA, i, uint64(m.CurrBlockStartUnixNanos)) + if m.Volume != 0 { + i = encodeVarintPagetoken(dAtA, i, uint64(m.Volume)) + i-- + dAtA[i] = 0x18 } if m.CurrBlockEntryIdx != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintPagetoken(dAtA, i, uint64(m.CurrBlockEntryIdx)) + i-- + dAtA[i] = 0x10 } - if m.Volume != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintPagetoken(dAtA, i, uint64(m.Volume)) + if m.CurrBlockStartUnixNanos != 0 { + i = encodeVarintPagetoken(dAtA, i, uint64(m.CurrBlockStartUnixNanos)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintPagetoken(dAtA []byte, offset int, v uint64) int { + offset -= sovPagetoken(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *PageToken) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.ActiveSeriesPhase != nil { @@ -248,6 +374,9 @@ func (m *PageToken) Size() (n int) { } func (m *PageToken_ActiveSeriesPhase) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.IndexCursor != 0 { @@ -257,6 +386,9 @@ func (m *PageToken_ActiveSeriesPhase) Size() (n int) { } func (m *PageToken_FlushedSeriesPhase) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.CurrBlockStartUnixNanos != 0 { @@ -272,14 +404,7 @@ func (m *PageToken_FlushedSeriesPhase) Size() (n int) { } func sovPagetoken(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPagetoken(x uint64) (n int) { return sovPagetoken(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -299,7 +424,7 @@ func (m *PageToken) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -327,7 +452,7 @@ func (m *PageToken) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -336,6 +461,9 @@ func (m *PageToken) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPagetoken } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPagetoken + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -360,7 +488,7 @@ func (m *PageToken) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -369,6 +497,9 @@ func (m *PageToken) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPagetoken } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPagetoken + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -385,7 +516,7 @@ func (m *PageToken) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPagetoken } if (iNdEx + skippy) > l { @@ -415,7 +546,7 @@ func (m *PageToken_ActiveSeriesPhase) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -443,7 +574,7 @@ func (m *PageToken_ActiveSeriesPhase) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.IndexCursor |= (int64(b) & 0x7F) << shift + m.IndexCursor |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -454,7 +585,7 @@ func (m *PageToken_ActiveSeriesPhase) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPagetoken } if (iNdEx + skippy) > l { @@ -484,7 +615,7 @@ func (m *PageToken_FlushedSeriesPhase) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -512,7 +643,7 @@ func (m *PageToken_FlushedSeriesPhase) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CurrBlockStartUnixNanos |= (int64(b) & 0x7F) << shift + m.CurrBlockStartUnixNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -531,7 +662,7 @@ func (m *PageToken_FlushedSeriesPhase) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CurrBlockEntryIdx |= (int64(b) & 0x7F) << shift + m.CurrBlockEntryIdx |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -550,7 +681,7 @@ func (m *PageToken_FlushedSeriesPhase) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Volume |= (int64(b) & 0x7F) << shift + m.Volume |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -561,7 +692,7 @@ func (m *PageToken_FlushedSeriesPhase) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPagetoken } if (iNdEx + skippy) > l { @@ -579,6 +710,7 @@ func (m *PageToken_FlushedSeriesPhase) Unmarshal(dAtA []byte) error { func skipPagetoken(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -610,10 +742,8 @@ func skipPagetoken(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -630,81 +760,34 @@ func skipPagetoken(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthPagetoken } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPagetoken - } - 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 := skipPagetoken(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPagetoken + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthPagetoken + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthPagetoken = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPagetoken = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthPagetoken = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPagetoken = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPagetoken = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/pagetoken/pagetoken.proto", fileDescriptorPagetoken) -} - -var fileDescriptorPagetoken = []byte{ - // 307 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4a, 0xc3, 0x30, - 0x1c, 0xc6, 0x8d, 0x85, 0xc1, 0xb2, 0x8b, 0x8b, 0xa2, 0x63, 0x87, 0x32, 0x3c, 0xa8, 0x07, 0x69, - 0xc0, 0x21, 0x78, 0x75, 0xa2, 0xe2, 0x45, 0xc6, 0xa6, 0x82, 0xa7, 0x91, 0x36, 0xff, 0xb5, 0x65, - 0x6d, 0x52, 0x92, 0x74, 0xd4, 0x77, 0xf0, 0xe0, 0xc1, 0x87, 0xf2, 0xe8, 0x23, 0x48, 0x7d, 0x11, - 0x59, 0x1c, 0xdd, 0xb4, 0x7a, 0xcb, 0xff, 0xfb, 0xbe, 0xff, 0x2f, 0x5f, 0x08, 0xbe, 0x0e, 0x63, - 0x13, 0xe5, 0xbe, 0x17, 0xc8, 0x94, 0xa6, 0x7d, 0xee, 0xd3, 0xb4, 0x4f, 0xb5, 0x0a, 0x28, 0xf7, - 0x85, 0xe4, 0x40, 0x43, 0x10, 0xa0, 0x98, 0x01, 0x4e, 0x33, 0x25, 0x8d, 0xa4, 0x19, 0x0b, 0xc1, - 0xc8, 0x19, 0x88, 0xd5, 0xc9, 0xb3, 0x0e, 0x69, 0x56, 0xc2, 0xfe, 0xb3, 0x83, 0x9b, 0x43, 0x16, - 0xc2, 0xdd, 0x62, 0x22, 0x0f, 0x78, 0x9b, 0x05, 0x26, 0x9e, 0xc3, 0x44, 0x83, 0x8a, 0x41, 0x4f, - 0xb2, 0x88, 0x69, 0xe8, 0xa0, 0x1e, 0x3a, 0x6a, 0x9d, 0x1c, 0x78, 0x2b, 0x4e, 0xb5, 0xe2, 0x9d, - 0xdb, 0xfc, 0xd8, 0xc6, 0x87, 0x8b, 0xf4, 0xa8, 0xcd, 0x7e, 0x4b, 0xe4, 0x11, 0xef, 0x4c, 0x93, - 0x5c, 0x47, 0xc0, 0x7f, 0x82, 0x37, 0x2d, 0xf8, 0xf0, 0x4f, 0xf0, 0xd5, 0xf7, 0xc2, 0x3a, 0x99, - 0x4c, 0x6b, 0x5a, 0xf7, 0x14, 0xb7, 0x6b, 0x15, 0x48, 0x0f, 0xb7, 0x62, 0xc1, 0xa1, 0xb8, 0xc8, - 0x95, 0x96, 0xca, 0xf6, 0x77, 0x46, 0xeb, 0x52, 0xf7, 0x15, 0x61, 0x52, 0xbf, 0x81, 0x9c, 0xe1, - 0xbd, 0x20, 0x57, 0x6a, 0x90, 0xc8, 0x60, 0x36, 0x36, 0x4c, 0x99, 0x7b, 0x11, 0x17, 0xb7, 0x4c, - 0x48, 0xbd, 0x84, 0xfc, 0x67, 0x93, 0x63, 0xdc, 0xae, 0xac, 0x4b, 0x61, 0xd4, 0xd3, 0x0d, 0x2f, - 0xec, 0xfb, 0x9c, 0x51, 0xdd, 0x20, 0xbb, 0xb8, 0x31, 0x97, 0x49, 0x9e, 0x42, 0xc7, 0xb1, 0x91, - 0xe5, 0x34, 0xd8, 0x7a, 0x2b, 0x5d, 0xf4, 0x5e, 0xba, 0xe8, 0xa3, 0x74, 0xd1, 0xcb, 0xa7, 0xbb, - 0xe1, 0x37, 0xec, 0x97, 0xf5, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x8d, 0x80, 0xf2, 0xfd, - 0x01, 0x00, 0x00, -} diff --git a/src/dbnode/generated/proto/snapshot/snapshot_metadata.pb.go b/src/dbnode/generated/proto/snapshot/snapshot_metadata.pb.go index 2cbdf8d343..574b0677ef 100644 --- a/src/dbnode/generated/proto/snapshot/snapshot_metadata.pb.go +++ b/src/dbnode/generated/proto/snapshot/snapshot_metadata.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/dbnode/generated/proto/snapshot/snapshot_metadata.proto -// Copyright (c) 2019 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,23 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package snapshot is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/dbnode/generated/proto/snapshot/snapshot_metadata.proto - - It has these top-level messages: - Metadata - CommitLogID -*/ package snapshot -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -48,18 +40,46 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Metadata struct { SnapshotIndex int64 `protobuf:"varint,1,opt,name=snapshotIndex,proto3" json:"snapshotIndex,omitempty"` SnapshotUUID []byte `protobuf:"bytes,2,opt,name=snapshotUUID,proto3" json:"snapshotUUID,omitempty"` - CommitlogID *CommitLogID `protobuf:"bytes,3,opt,name=commitlogID" json:"commitlogID,omitempty"` + CommitlogID *CommitLogID `protobuf:"bytes,3,opt,name=commitlogID,proto3" json:"commitlogID,omitempty"` +} + +func (m *Metadata) Reset() { *m = Metadata{} } +func (m *Metadata) String() string { return proto.CompactTextString(m) } +func (*Metadata) ProtoMessage() {} +func (*Metadata) Descriptor() ([]byte, []int) { + return fileDescriptor_586251e410c0be25, []int{0} +} +func (m *Metadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metadata.Merge(m, src) +} +func (m *Metadata) XXX_Size() int { + return m.Size() +} +func (m *Metadata) XXX_DiscardUnknown() { + xxx_messageInfo_Metadata.DiscardUnknown(m) } -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { return fileDescriptorSnapshotMetadata, []int{0} } +var xxx_messageInfo_Metadata proto.InternalMessageInfo func (m *Metadata) GetSnapshotIndex() int64 { if m != nil { @@ -87,10 +107,38 @@ type CommitLogID struct { Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` } -func (m *CommitLogID) Reset() { *m = CommitLogID{} } -func (m *CommitLogID) String() string { return proto.CompactTextString(m) } -func (*CommitLogID) ProtoMessage() {} -func (*CommitLogID) Descriptor() ([]byte, []int) { return fileDescriptorSnapshotMetadata, []int{1} } +func (m *CommitLogID) Reset() { *m = CommitLogID{} } +func (m *CommitLogID) String() string { return proto.CompactTextString(m) } +func (*CommitLogID) ProtoMessage() {} +func (*CommitLogID) Descriptor() ([]byte, []int) { + return fileDescriptor_586251e410c0be25, []int{1} +} +func (m *CommitLogID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommitLogID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommitLogID.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 *CommitLogID) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitLogID.Merge(m, src) +} +func (m *CommitLogID) XXX_Size() int { + return m.Size() +} +func (m *CommitLogID) XXX_DiscardUnknown() { + xxx_messageInfo_CommitLogID.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitLogID proto.InternalMessageInfo func (m *CommitLogID) GetFilePath() string { if m != nil { @@ -110,10 +158,35 @@ func init() { proto.RegisterType((*Metadata)(nil), "snapshot.Metadata") proto.RegisterType((*CommitLogID)(nil), "snapshot.CommitLogID") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/snapshot/snapshot_metadata.proto", fileDescriptor_586251e410c0be25) +} + +var fileDescriptor_586251e410c0be25 = []byte{ + // 249 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0x4b, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, + 0x2e, 0x4a, 0xd6, 0x4f, 0x49, 0xca, 0xcb, 0x4f, 0x49, 0xd5, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, + 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0xce, 0x4b, 0x2c, 0x28, 0xce, + 0xc8, 0x2f, 0x81, 0x33, 0xe2, 0x73, 0x53, 0x4b, 0x12, 0x53, 0x12, 0x4b, 0x12, 0xf5, 0xc0, 0x0a, + 0x84, 0x38, 0x60, 0x12, 0x4a, 0xbd, 0x8c, 0x5c, 0x1c, 0xbe, 0x50, 0x49, 0x21, 0x15, 0x2e, 0x5e, + 0x98, 0x84, 0x67, 0x5e, 0x4a, 0x6a, 0x85, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x73, 0x10, 0xaa, 0xa0, + 0x90, 0x12, 0x17, 0x0f, 0x4c, 0x20, 0x34, 0xd4, 0xd3, 0x45, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, + 0x08, 0x45, 0x4c, 0xc8, 0x9c, 0x8b, 0x3b, 0x39, 0x3f, 0x37, 0x37, 0xb3, 0x24, 0x27, 0x3f, 0xdd, + 0xd3, 0x45, 0x82, 0x59, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x54, 0x0f, 0xa6, 0x46, 0xcf, 0x19, 0x2c, + 0xe9, 0x03, 0x92, 0x0c, 0x42, 0x56, 0xa9, 0x64, 0xcf, 0xc5, 0x8d, 0x24, 0x27, 0x24, 0xc5, 0xc5, + 0x91, 0x96, 0x99, 0x93, 0x1a, 0x90, 0x58, 0x92, 0x01, 0x76, 0x0c, 0x67, 0x10, 0x9c, 0x2f, 0x24, + 0xc2, 0xc5, 0x9a, 0x09, 0x76, 0x25, 0x13, 0xd8, 0x95, 0x10, 0x8e, 0x93, 0xc4, 0x89, 0x47, 0x72, + 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, + 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x24, 0xb1, 0x81, 0xfd, 0x6e, 0x0c, 0x08, 0x00, 0x00, 0xff, + 0xff, 0x18, 0xa3, 0xc2, 0x9b, 0x4d, 0x01, 0x00, 0x00, +} + func (m *Metadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -121,38 +194,46 @@ func (m *Metadata) Marshal() (dAtA []byte, err error) { } func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.SnapshotIndex != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintSnapshotMetadata(dAtA, i, uint64(m.SnapshotIndex)) + if m.CommitlogID != nil { + { + size, err := m.CommitlogID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshotMetadata(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } if len(m.SnapshotUUID) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.SnapshotUUID) + copy(dAtA[i:], m.SnapshotUUID) i = encodeVarintSnapshotMetadata(dAtA, i, uint64(len(m.SnapshotUUID))) - i += copy(dAtA[i:], m.SnapshotUUID) + i-- + dAtA[i] = 0x12 } - if m.CommitlogID != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintSnapshotMetadata(dAtA, i, uint64(m.CommitlogID.Size())) - n1, err := m.CommitlogID.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 + if m.SnapshotIndex != 0 { + i = encodeVarintSnapshotMetadata(dAtA, i, uint64(m.SnapshotIndex)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *CommitLogID) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -160,34 +241,45 @@ func (m *CommitLogID) Marshal() (dAtA []byte, err error) { } func (m *CommitLogID) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitLogID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.FilePath) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshotMetadata(dAtA, i, uint64(len(m.FilePath))) - i += copy(dAtA[i:], m.FilePath) - } if m.Index != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintSnapshotMetadata(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x10 + } + if len(m.FilePath) > 0 { + i -= len(m.FilePath) + copy(dAtA[i:], m.FilePath) + i = encodeVarintSnapshotMetadata(dAtA, i, uint64(len(m.FilePath))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintSnapshotMetadata(dAtA []byte, offset int, v uint64) int { + offset -= sovSnapshotMetadata(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Metadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.SnapshotIndex != 0 { @@ -205,6 +297,9 @@ func (m *Metadata) Size() (n int) { } func (m *CommitLogID) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.FilePath) @@ -218,14 +313,7 @@ func (m *CommitLogID) Size() (n int) { } func sovSnapshotMetadata(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozSnapshotMetadata(x uint64) (n int) { return sovSnapshotMetadata(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -245,7 +333,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -273,7 +361,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SnapshotIndex |= (int64(b) & 0x7F) << shift + m.SnapshotIndex |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -292,7 +380,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -301,6 +389,9 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSnapshotMetadata } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshotMetadata + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -323,7 +414,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -332,6 +423,9 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSnapshotMetadata } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshotMetadata + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -348,7 +442,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSnapshotMetadata } if (iNdEx + skippy) > l { @@ -378,7 +472,7 @@ func (m *CommitLogID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -406,7 +500,7 @@ func (m *CommitLogID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -416,6 +510,9 @@ func (m *CommitLogID) Unmarshal(dAtA []byte) error { return ErrInvalidLengthSnapshotMetadata } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSnapshotMetadata + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -435,7 +532,7 @@ func (m *CommitLogID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Index |= (int64(b) & 0x7F) << shift + m.Index |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -446,7 +543,7 @@ func (m *CommitLogID) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSnapshotMetadata } if (iNdEx + skippy) > l { @@ -464,6 +561,7 @@ func (m *CommitLogID) Unmarshal(dAtA []byte) error { func skipSnapshotMetadata(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -495,10 +593,8 @@ func skipSnapshotMetadata(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -515,77 +611,34 @@ func skipSnapshotMetadata(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthSnapshotMetadata } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshotMetadata - } - 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 := skipSnapshotMetadata(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSnapshotMetadata + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthSnapshotMetadata + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthSnapshotMetadata = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSnapshotMetadata = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthSnapshotMetadata = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSnapshotMetadata = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSnapshotMetadata = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/snapshot/snapshot_metadata.proto", fileDescriptorSnapshotMetadata) -} - -var fileDescriptorSnapshotMetadata = []byte{ - // 241 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0x4b, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, - 0x2e, 0x4a, 0xd6, 0x4f, 0x49, 0xca, 0xcb, 0x4f, 0x49, 0xd5, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, - 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0xce, 0x4b, 0x2c, 0x28, 0xce, - 0xc8, 0x2f, 0x81, 0x33, 0xe2, 0x73, 0x53, 0x4b, 0x12, 0x53, 0x12, 0x4b, 0x12, 0xf5, 0xc0, 0x0a, - 0x84, 0x38, 0x60, 0x12, 0x4a, 0xbd, 0x8c, 0x5c, 0x1c, 0xbe, 0x50, 0x49, 0x21, 0x15, 0x2e, 0x5e, - 0x98, 0x84, 0x67, 0x5e, 0x4a, 0x6a, 0x85, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x73, 0x10, 0xaa, 0xa0, - 0x90, 0x12, 0x17, 0x0f, 0x4c, 0x20, 0x34, 0xd4, 0xd3, 0x45, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, - 0x08, 0x45, 0x4c, 0xc8, 0x9c, 0x8b, 0x3b, 0x39, 0x3f, 0x37, 0x37, 0xb3, 0x24, 0x27, 0x3f, 0xdd, - 0xd3, 0x45, 0x82, 0x59, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x54, 0x0f, 0xa6, 0x46, 0xcf, 0x19, 0x2c, - 0xe9, 0x03, 0x92, 0x0c, 0x42, 0x56, 0xa9, 0x64, 0xcf, 0xc5, 0x8d, 0x24, 0x27, 0x24, 0xc5, 0xc5, - 0x91, 0x96, 0x99, 0x93, 0x1a, 0x90, 0x58, 0x92, 0x01, 0x76, 0x0c, 0x67, 0x10, 0x9c, 0x2f, 0x24, - 0xc2, 0xc5, 0x9a, 0x09, 0x76, 0x25, 0x13, 0xd8, 0x95, 0x10, 0x8e, 0x93, 0xc0, 0x89, 0x47, 0x72, - 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0x43, 0x12, 0x1b, - 0xd8, 0xcf, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x66, 0xf1, 0x77, 0x45, 0x01, 0x00, - 0x00, -} diff --git a/src/dbnode/generated/thrift/generate.sh b/src/dbnode/generated/thrift/generate.sh index 7ac8c85c30..6f1d4b486b 100755 --- a/src/dbnode/generated/thrift/generate.sh +++ b/src/dbnode/generated/thrift/generate.sh @@ -1,23 +1,9 @@ #!/bin/bash # paranoia, ftw -set -e +set -ex -# ensure docker is running -docker run --rm hello-world >/dev/null - -# generate files using dockerized thrift-gen -THRIFT_IMAGE_VERSION=${THRIFT_IMAGE_VERSION:-"quay.io/m3db/thrift-gen:latest"} -echo "Generating thrift files with image: $THRIFT_IMAGE_VERSION" - -UID_FLAGS="-u $(id -u)" -if [[ -n "$BUILDKITE" ]]; then - UID_FLAGS="-u root" -fi - -docker run --rm -v "$(pwd):/data" $UID_FLAGS \ - "$THRIFT_IMAGE_VERSION" --generateThrift \ - --inputFile /data/rpc.thrift --outputDir /data +thrift --gen go rpc.thrift # ensure formatting is correct go fmt github.com/m3db/m3/src/dbnode/generated/thrift/rpc diff --git a/src/dbnode/generated/thrift/rpc/rpc.go b/src/dbnode/generated/thrift/rpc/rpc.go index bb1dff9426..ebdb3c071b 100644 --- a/src/dbnode/generated/thrift/rpc/rpc.go +++ b/src/dbnode/generated/thrift/rpc/rpc.go @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -425,9 +425,9 @@ func (p *EqualTimestampStrategy) Value() (driver.Value, error) { } // Attributes: -// - Type -// - Message -// - Flags +// - Type +// - Message +// - Flags type Error struct { Type ErrorType `thrift:"type,1,required" db:"type" json:"type"` Message string `thrift:"message,2,required" db:"message" json:"message"` @@ -614,7 +614,7 @@ func (p *Error) Error() string { } // Attributes: -// - Errors +// - Errors type WriteBatchRawErrors struct { Errors []*WriteBatchRawError `thrift:"errors,1,required" db:"errors" json:"errors"` } @@ -736,13 +736,13 @@ func (p *WriteBatchRawErrors) Error() string { } // Attributes: -// - RangeStart -// - RangeEnd -// - NameSpace -// - ID -// - RangeType -// - ResultTimeType -// - Source +// - RangeStart +// - RangeEnd +// - NameSpace +// - ID +// - RangeType +// - ResultTimeType +// - Source type FetchRequest struct { RangeStart int64 `thrift:"rangeStart,1,required" db:"rangeStart" json:"rangeStart"` RangeEnd int64 `thrift:"rangeEnd,2,required" db:"rangeEnd" json:"rangeEnd"` @@ -1090,7 +1090,7 @@ func (p *FetchRequest) String() string { } // Attributes: -// - Datapoints +// - Datapoints type FetchResult_ struct { Datapoints []*Datapoint `thrift:"datapoints,1,required" db:"datapoints" json:"datapoints"` } @@ -1210,10 +1210,10 @@ func (p *FetchResult_) String() string { } // Attributes: -// - Timestamp -// - Value -// - Annotation -// - TimestampTimeType +// - Timestamp +// - Value +// - Annotation +// - TimestampTimeType type Datapoint struct { Timestamp int64 `thrift:"timestamp,1,required" db:"timestamp" json:"timestamp"` Value float64 `thrift:"value,2,required" db:"value" json:"value"` @@ -1438,9 +1438,9 @@ func (p *Datapoint) String() string { } // Attributes: -// - NameSpace -// - ID -// - Datapoint +// - NameSpace +// - ID +// - Datapoint type WriteRequest struct { NameSpace string `thrift:"nameSpace,1,required" db:"nameSpace" json:"nameSpace"` ID string `thrift:"id,2,required" db:"id" json:"id"` @@ -1627,10 +1627,10 @@ func (p *WriteRequest) String() string { } // Attributes: -// - NameSpace -// - ID -// - Tags -// - Datapoint +// - NameSpace +// - ID +// - Tags +// - Datapoint type WriteTaggedRequest struct { NameSpace string `thrift:"nameSpace,1,required" db:"nameSpace" json:"nameSpace"` ID string `thrift:"id,2,required" db:"id" json:"id"` @@ -1875,12 +1875,12 @@ func (p *WriteTaggedRequest) String() string { } // Attributes: -// - RangeStart -// - RangeEnd -// - NameSpace -// - Ids -// - RangeTimeType -// - Source +// - RangeStart +// - RangeEnd +// - NameSpace +// - Ids +// - RangeTimeType +// - Source type FetchBatchRawRequest struct { RangeStart int64 `thrift:"rangeStart,1,required" db:"rangeStart" json:"rangeStart"` RangeEnd int64 `thrift:"rangeEnd,2,required" db:"rangeEnd" json:"rangeEnd"` @@ -2204,9 +2204,9 @@ func (p *FetchBatchRawRequest) String() string { } // Attributes: -// - NameSpaces -// - Elements -// - Source +// - NameSpaces +// - Elements +// - Source type FetchBatchRawV2Request struct { NameSpaces [][]byte `thrift:"nameSpaces,1,required" db:"nameSpaces" json:"nameSpaces"` Elements []*FetchBatchRawV2RequestElement `thrift:"elements,2,required" db:"elements" json:"elements"` @@ -2428,11 +2428,11 @@ func (p *FetchBatchRawV2Request) String() string { } // Attributes: -// - NameSpace -// - RangeStart -// - RangeEnd -// - ID -// - RangeTimeType +// - NameSpace +// - RangeStart +// - RangeEnd +// - ID +// - RangeTimeType type FetchBatchRawV2RequestElement struct { NameSpace int64 `thrift:"nameSpace,1,required" db:"nameSpace" json:"nameSpace"` RangeStart int64 `thrift:"rangeStart,2,required" db:"rangeStart" json:"rangeStart"` @@ -2693,7 +2693,7 @@ func (p *FetchBatchRawV2RequestElement) String() string { } // Attributes: -// - Elements +// - Elements type FetchBatchRawResult_ struct { Elements []*FetchRawResult_ `thrift:"elements,1,required" db:"elements" json:"elements"` } @@ -2811,8 +2811,8 @@ func (p *FetchBatchRawResult_) String() string { } // Attributes: -// - Segments -// - Err +// - Segments +// - Err type FetchRawResult_ struct { Segments []*Segments `thrift:"segments,1,required" db:"segments" json:"segments"` Err *Error `thrift:"err,2" db:"err" json:"err,omitempty"` @@ -2976,8 +2976,8 @@ func (p *FetchRawResult_) String() string { } // Attributes: -// - Merged -// - Unmerged +// - Merged +// - Unmerged type Segments struct { Merged *Segment `thrift:"merged,1" db:"merged" json:"merged,omitempty"` Unmerged []*Segment `thrift:"unmerged,2" db:"unmerged" json:"unmerged,omitempty"` @@ -3141,11 +3141,11 @@ func (p *Segments) String() string { } // Attributes: -// - Head -// - Tail -// - StartTime -// - BlockSize -// - Checksum +// - Head +// - Tail +// - StartTime +// - BlockSize +// - Checksum type Segment struct { Head []byte `thrift:"head,1,required" db:"head" json:"head"` Tail []byte `thrift:"tail,2,required" db:"tail" json:"tail"` @@ -3418,17 +3418,17 @@ func (p *Segment) String() string { } // Attributes: -// - NameSpace -// - Query -// - RangeStart -// - RangeEnd -// - FetchData -// - SeriesLimit -// - RangeTimeType -// - RequireExhaustive -// - DocsLimit -// - Source -// - RequireNoWait +// - NameSpace +// - Query +// - RangeStart +// - RangeEnd +// - FetchData +// - SeriesLimit +// - RangeTimeType +// - RequireExhaustive +// - DocsLimit +// - Source +// - RequireNoWait type FetchTaggedRequest struct { NameSpace []byte `thrift:"nameSpace,1,required" db:"nameSpace" json:"nameSpace"` Query []byte `thrift:"query,2,required" db:"query" json:"query"` @@ -3946,10 +3946,10 @@ func (p *FetchTaggedRequest) String() string { } // Attributes: -// - Elements -// - Exhaustive -// - WaitedIndex -// - WaitedSeriesRead +// - Elements +// - Exhaustive +// - WaitedIndex +// - WaitedSeriesRead type FetchTaggedResult_ struct { Elements []*FetchTaggedIDResult_ `thrift:"elements,1,required" db:"elements" json:"elements"` Exhaustive bool `thrift:"exhaustive,2,required" db:"exhaustive" json:"exhaustive"` @@ -4196,11 +4196,11 @@ func (p *FetchTaggedResult_) String() string { } // Attributes: -// - ID -// - NameSpace -// - EncodedTags -// - Segments -// - Err +// - ID +// - NameSpace +// - EncodedTags +// - Segments +// - Err type FetchTaggedIDResult_ struct { ID []byte `thrift:"id,1,required" db:"id" json:"id"` NameSpace []byte `thrift:"nameSpace,2,required" db:"nameSpace" json:"nameSpace"` @@ -4484,10 +4484,10 @@ func (p *FetchTaggedIDResult_) String() string { } // Attributes: -// - NameSpace -// - Shard -// - Elements -// - Source +// - NameSpace +// - Shard +// - Elements +// - Source type FetchBlocksRawRequest struct { NameSpace []byte `thrift:"nameSpace,1,required" db:"nameSpace" json:"nameSpace"` Shard int32 `thrift:"shard,2,required" db:"shard" json:"shard"` @@ -4725,8 +4725,8 @@ func (p *FetchBlocksRawRequest) String() string { } // Attributes: -// - ID -// - Starts +// - ID +// - Starts type FetchBlocksRawRequestElement struct { ID []byte `thrift:"id,1,required" db:"id" json:"id"` Starts []int64 `thrift:"starts,2,required" db:"starts" json:"starts"` @@ -4885,7 +4885,7 @@ func (p *FetchBlocksRawRequestElement) String() string { } // Attributes: -// - Elements +// - Elements type FetchBlocksRawResult_ struct { Elements []*Blocks `thrift:"elements,1,required" db:"elements" json:"elements"` } @@ -5003,8 +5003,8 @@ func (p *FetchBlocksRawResult_) String() string { } // Attributes: -// - ID -// - Blocks +// - ID +// - Blocks type Blocks struct { ID []byte `thrift:"id,1,required" db:"id" json:"id"` Blocks []*Block `thrift:"blocks,2,required" db:"blocks" json:"blocks"` @@ -5161,10 +5161,10 @@ func (p *Blocks) String() string { } // Attributes: -// - Start -// - Segments -// - Err -// - Checksum +// - Start +// - Segments +// - Err +// - Checksum type Block struct { Start int64 `thrift:"start,1,required" db:"start" json:"start"` Segments *Segments `thrift:"segments,2" db:"segments" json:"segments,omitempty"` @@ -5398,8 +5398,8 @@ func (p *Block) String() string { } // Attributes: -// - Name -// - Value +// - Name +// - Value type Tag struct { Name string `thrift:"name,1,required" db:"name" json:"name"` Value string `thrift:"value,2,required" db:"value" json:"value"` @@ -5537,15 +5537,15 @@ func (p *Tag) String() string { } // Attributes: -// - NameSpace -// - Shard -// - RangeStart -// - RangeEnd -// - Limit -// - PageToken -// - IncludeSizes -// - IncludeChecksums -// - IncludeLastRead +// - NameSpace +// - Shard +// - RangeStart +// - RangeEnd +// - Limit +// - PageToken +// - IncludeSizes +// - IncludeChecksums +// - IncludeLastRead type FetchBlocksMetadataRawV2Request struct { NameSpace []byte `thrift:"nameSpace,1,required" db:"nameSpace" json:"nameSpace"` Shard int32 `thrift:"shard,2,required" db:"shard" json:"shard"` @@ -5977,8 +5977,8 @@ func (p *FetchBlocksMetadataRawV2Request) String() string { } // Attributes: -// - Elements -// - NextPageToken +// - Elements +// - NextPageToken type FetchBlocksMetadataRawV2Result_ struct { Elements []*BlockMetadataV2 `thrift:"elements,1,required" db:"elements" json:"elements"` NextPageToken []byte `thrift:"nextPageToken,2" db:"nextPageToken" json:"nextPageToken,omitempty"` @@ -6140,14 +6140,14 @@ func (p *FetchBlocksMetadataRawV2Result_) String() string { } // Attributes: -// - ID -// - Start -// - Err -// - Size -// - Checksum -// - LastRead -// - LastReadTimeType -// - EncodedTags +// - ID +// - Start +// - Err +// - Size +// - Checksum +// - LastRead +// - LastReadTimeType +// - EncodedTags type BlockMetadataV2 struct { ID []byte `thrift:"id,1,required" db:"id" json:"id"` Start int64 `thrift:"start,2,required" db:"start" json:"start"` @@ -6553,8 +6553,8 @@ func (p *BlockMetadataV2) String() string { } // Attributes: -// - NameSpace -// - Elements +// - NameSpace +// - Elements type WriteBatchRawRequest struct { NameSpace []byte `thrift:"nameSpace,1,required" db:"nameSpace" json:"nameSpace"` Elements []*WriteBatchRawRequestElement `thrift:"elements,2,required" db:"elements" json:"elements"` @@ -6711,8 +6711,8 @@ func (p *WriteBatchRawRequest) String() string { } // Attributes: -// - NameSpaces -// - Elements +// - NameSpaces +// - Elements type WriteBatchRawV2Request struct { NameSpaces [][]byte `thrift:"nameSpaces,1,required" db:"nameSpaces" json:"nameSpaces"` Elements []*WriteBatchRawV2RequestElement `thrift:"elements,2,required" db:"elements" json:"elements"` @@ -6890,8 +6890,8 @@ func (p *WriteBatchRawV2Request) String() string { } // Attributes: -// - ID -// - Datapoint +// - ID +// - Datapoint type WriteBatchRawRequestElement struct { ID []byte `thrift:"id,1,required" db:"id" json:"id"` Datapoint *Datapoint `thrift:"datapoint,2,required" db:"datapoint" json:"datapoint"` @@ -7039,9 +7039,9 @@ func (p *WriteBatchRawRequestElement) String() string { } // Attributes: -// - ID -// - Datapoint -// - NameSpace +// - ID +// - Datapoint +// - NameSpace type WriteBatchRawV2RequestElement struct { ID []byte `thrift:"id,1,required" db:"id" json:"id"` Datapoint *Datapoint `thrift:"datapoint,2,required" db:"datapoint" json:"datapoint"` @@ -7228,8 +7228,8 @@ func (p *WriteBatchRawV2RequestElement) String() string { } // Attributes: -// - NameSpace -// - Elements +// - NameSpace +// - Elements type WriteTaggedBatchRawRequest struct { NameSpace []byte `thrift:"nameSpace,1,required" db:"nameSpace" json:"nameSpace"` Elements []*WriteTaggedBatchRawRequestElement `thrift:"elements,2,required" db:"elements" json:"elements"` @@ -7386,8 +7386,8 @@ func (p *WriteTaggedBatchRawRequest) String() string { } // Attributes: -// - NameSpaces -// - Elements +// - NameSpaces +// - Elements type WriteTaggedBatchRawV2Request struct { NameSpaces [][]byte `thrift:"nameSpaces,1,required" db:"nameSpaces" json:"nameSpaces"` Elements []*WriteTaggedBatchRawV2RequestElement `thrift:"elements,2,required" db:"elements" json:"elements"` @@ -7565,9 +7565,9 @@ func (p *WriteTaggedBatchRawV2Request) String() string { } // Attributes: -// - ID -// - EncodedTags -// - Datapoint +// - ID +// - EncodedTags +// - Datapoint type WriteTaggedBatchRawRequestElement struct { ID []byte `thrift:"id,1,required" db:"id" json:"id"` EncodedTags []byte `thrift:"encodedTags,2,required" db:"encodedTags" json:"encodedTags"` @@ -7754,10 +7754,10 @@ func (p *WriteTaggedBatchRawRequestElement) String() string { } // Attributes: -// - ID -// - EncodedTags -// - Datapoint -// - NameSpace +// - ID +// - EncodedTags +// - Datapoint +// - NameSpace type WriteTaggedBatchRawV2RequestElement struct { ID []byte `thrift:"id,1,required" db:"id" json:"id"` EncodedTags []byte `thrift:"encodedTags,2,required" db:"encodedTags" json:"encodedTags"` @@ -7983,8 +7983,8 @@ func (p *WriteTaggedBatchRawV2RequestElement) String() string { } // Attributes: -// - Index -// - Err +// - Index +// - Err type WriteBatchRawError struct { Index int64 `thrift:"index,1,required" db:"index" json:"index"` Err *Error `thrift:"err,2,required" db:"err" json:"err"` @@ -8132,7 +8132,7 @@ func (p *WriteBatchRawError) String() string { } // Attributes: -// - NameSpace +// - NameSpace type TruncateRequest struct { NameSpace []byte `thrift:"nameSpace,1,required" db:"nameSpace" json:"nameSpace"` } @@ -8231,7 +8231,7 @@ func (p *TruncateRequest) String() string { } // Attributes: -// - NumSeries +// - NumSeries type TruncateResult_ struct { NumSeries int64 `thrift:"numSeries,1,required" db:"numSeries" json:"numSeries"` } @@ -8330,10 +8330,10 @@ func (p *TruncateResult_) String() string { } // Attributes: -// - Ok -// - Status -// - Bootstrapped -// - Metadata +// - Ok +// - Status +// - Bootstrapped +// - Metadata type NodeHealthResult_ struct { Ok bool `thrift:"ok,1,required" db:"ok" json:"ok"` Status string `thrift:"status,2,required" db:"status" json:"status"` @@ -8692,9 +8692,9 @@ func (p *NodeBootstrappedInPlacementOrNoPlacementResult_) String() string { } // Attributes: -// - LimitEnabled -// - LimitMbps -// - LimitCheckEvery +// - LimitEnabled +// - LimitMbps +// - LimitCheckEvery type NodePersistRateLimitResult_ struct { LimitEnabled bool `thrift:"limitEnabled,1,required" db:"limitEnabled" json:"limitEnabled"` LimitMbps float64 `thrift:"limitMbps,2,required" db:"limitMbps" json:"limitMbps"` @@ -8871,9 +8871,9 @@ func (p *NodePersistRateLimitResult_) String() string { } // Attributes: -// - LimitEnabled -// - LimitMbps -// - LimitCheckEvery +// - LimitEnabled +// - LimitMbps +// - LimitCheckEvery type NodeSetPersistRateLimitRequest struct { LimitEnabled *bool `thrift:"limitEnabled,1" db:"limitEnabled" json:"limitEnabled,omitempty"` LimitMbps *float64 `thrift:"limitMbps,2" db:"limitMbps" json:"limitMbps,omitempty"` @@ -9067,7 +9067,7 @@ func (p *NodeSetPersistRateLimitRequest) String() string { } // Attributes: -// - WriteNewSeriesAsync +// - WriteNewSeriesAsync type NodeWriteNewSeriesAsyncResult_ struct { WriteNewSeriesAsync bool `thrift:"writeNewSeriesAsync,1,required" db:"writeNewSeriesAsync" json:"writeNewSeriesAsync"` } @@ -9166,7 +9166,7 @@ func (p *NodeWriteNewSeriesAsyncResult_) String() string { } // Attributes: -// - WriteNewSeriesAsync +// - WriteNewSeriesAsync type NodeSetWriteNewSeriesAsyncRequest struct { WriteNewSeriesAsync bool `thrift:"writeNewSeriesAsync,1,required" db:"writeNewSeriesAsync" json:"writeNewSeriesAsync"` } @@ -9265,8 +9265,8 @@ func (p *NodeSetWriteNewSeriesAsyncRequest) String() string { } // Attributes: -// - WriteNewSeriesBackoffDuration -// - DurationType +// - WriteNewSeriesBackoffDuration +// - DurationType type NodeWriteNewSeriesBackoffDurationResult_ struct { WriteNewSeriesBackoffDuration int64 `thrift:"writeNewSeriesBackoffDuration,1,required" db:"writeNewSeriesBackoffDuration" json:"writeNewSeriesBackoffDuration"` DurationType TimeType `thrift:"durationType,2,required" db:"durationType" json:"durationType"` @@ -9405,8 +9405,8 @@ func (p *NodeWriteNewSeriesBackoffDurationResult_) String() string { } // Attributes: -// - WriteNewSeriesBackoffDuration -// - DurationType +// - WriteNewSeriesBackoffDuration +// - DurationType type NodeSetWriteNewSeriesBackoffDurationRequest struct { WriteNewSeriesBackoffDuration int64 `thrift:"writeNewSeriesBackoffDuration,1,required" db:"writeNewSeriesBackoffDuration" json:"writeNewSeriesBackoffDuration"` DurationType TimeType `thrift:"durationType,2" db:"durationType" json:"durationType,omitempty"` @@ -9550,7 +9550,7 @@ func (p *NodeSetWriteNewSeriesBackoffDurationRequest) String() string { } // Attributes: -// - WriteNewSeriesLimitPerShardPerSecond +// - WriteNewSeriesLimitPerShardPerSecond type NodeWriteNewSeriesLimitPerShardPerSecondResult_ struct { WriteNewSeriesLimitPerShardPerSecond int64 `thrift:"writeNewSeriesLimitPerShardPerSecond,1,required" db:"writeNewSeriesLimitPerShardPerSecond" json:"writeNewSeriesLimitPerShardPerSecond"` } @@ -9649,7 +9649,7 @@ func (p *NodeWriteNewSeriesLimitPerShardPerSecondResult_) String() string { } // Attributes: -// - WriteNewSeriesLimitPerShardPerSecond +// - WriteNewSeriesLimitPerShardPerSecond type NodeSetWriteNewSeriesLimitPerShardPerSecondRequest struct { WriteNewSeriesLimitPerShardPerSecond int64 `thrift:"writeNewSeriesLimitPerShardPerSecond,1,required" db:"writeNewSeriesLimitPerShardPerSecond" json:"writeNewSeriesLimitPerShardPerSecond"` } @@ -9748,8 +9748,8 @@ func (p *NodeSetWriteNewSeriesLimitPerShardPerSecondRequest) String() string { } // Attributes: -// - Ok -// - Status +// - Ok +// - Status type HealthResult_ struct { Ok bool `thrift:"ok,1,required" db:"ok" json:"ok"` Status string `thrift:"status,2,required" db:"status" json:"status"` @@ -9887,18 +9887,18 @@ func (p *HealthResult_) String() string { } // Attributes: -// - Query -// - RangeStart -// - RangeEnd -// - NameSpace -// - SeriesLimit -// - TagNameFilter -// - AggregateQueryType -// - RangeType -// - Source -// - DocsLimit -// - RequireExhaustive -// - RequireNoWait +// - Query +// - RangeStart +// - RangeEnd +// - NameSpace +// - SeriesLimit +// - TagNameFilter +// - AggregateQueryType +// - RangeType +// - Source +// - DocsLimit +// - RequireExhaustive +// - RequireNoWait type AggregateQueryRawRequest struct { Query []byte `thrift:"query,1,required" db:"query" json:"query"` RangeStart int64 `thrift:"rangeStart,2,required" db:"rangeStart" json:"rangeStart"` @@ -10489,9 +10489,9 @@ func (p *AggregateQueryRawRequest) String() string { } // Attributes: -// - Results -// - Exhaustive -// - WaitedIndex +// - Results +// - Exhaustive +// - WaitedIndex type AggregateQueryRawResult_ struct { Results []*AggregateQueryRawResultTagNameElement `thrift:"results,1,required" db:"results" json:"results"` Exhaustive bool `thrift:"exhaustive,2,required" db:"exhaustive" json:"exhaustive"` @@ -10693,8 +10693,8 @@ func (p *AggregateQueryRawResult_) String() string { } // Attributes: -// - TagName -// - TagValues +// - TagName +// - TagValues type AggregateQueryRawResultTagNameElement struct { TagName []byte `thrift:"tagName,1,required" db:"tagName" json:"tagName"` TagValues []*AggregateQueryRawResultTagValueElement `thrift:"tagValues,2" db:"tagValues" json:"tagValues,omitempty"` @@ -10854,7 +10854,7 @@ func (p *AggregateQueryRawResultTagNameElement) String() string { } // Attributes: -// - TagValue +// - TagValue type AggregateQueryRawResultTagValueElement struct { TagValue []byte `thrift:"tagValue,1,required" db:"tagValue" json:"tagValue"` } @@ -10953,18 +10953,18 @@ func (p *AggregateQueryRawResultTagValueElement) String() string { } // Attributes: -// - Query -// - RangeStart -// - RangeEnd -// - NameSpace -// - SeriesLimit -// - TagNameFilter -// - AggregateQueryType -// - RangeType -// - Source -// - DocsLimit -// - RequireExhaustive -// - RequireNoWait +// - Query +// - RangeStart +// - RangeEnd +// - NameSpace +// - SeriesLimit +// - TagNameFilter +// - AggregateQueryType +// - RangeType +// - Source +// - DocsLimit +// - RequireExhaustive +// - RequireNoWait type AggregateQueryRequest struct { Query *Query `thrift:"query,1" db:"query" json:"query,omitempty"` RangeStart int64 `thrift:"rangeStart,2,required" db:"rangeStart" json:"rangeStart"` @@ -11560,8 +11560,8 @@ func (p *AggregateQueryRequest) String() string { } // Attributes: -// - Results -// - Exhaustive +// - Results +// - Exhaustive type AggregateQueryResult_ struct { Results []*AggregateQueryResultTagNameElement `thrift:"results,1,required" db:"results" json:"results"` Exhaustive bool `thrift:"exhaustive,2,required" db:"exhaustive" json:"exhaustive"` @@ -11718,8 +11718,8 @@ func (p *AggregateQueryResult_) String() string { } // Attributes: -// - TagName -// - TagValues +// - TagName +// - TagValues type AggregateQueryResultTagNameElement struct { TagName string `thrift:"tagName,1,required" db:"tagName" json:"tagName"` TagValues []*AggregateQueryResultTagValueElement `thrift:"tagValues,2" db:"tagValues" json:"tagValues,omitempty"` @@ -11879,7 +11879,7 @@ func (p *AggregateQueryResultTagNameElement) String() string { } // Attributes: -// - TagValue +// - TagValue type AggregateQueryResultTagValueElement struct { TagValue string `thrift:"tagValue,1,required" db:"tagValue" json:"tagValue"` } @@ -11978,16 +11978,16 @@ func (p *AggregateQueryResultTagValueElement) String() string { } // Attributes: -// - Query -// - RangeStart -// - RangeEnd -// - NameSpace -// - Limit -// - NoData -// - RangeType -// - ResultTimeType -// - Source -// - ClusterOptions +// - Query +// - RangeStart +// - RangeEnd +// - NameSpace +// - Limit +// - NoData +// - RangeType +// - ResultTimeType +// - Source +// - ClusterOptions type QueryRequest struct { Query *Query `thrift:"query,1,required" db:"query" json:"query"` RangeStart int64 `thrift:"rangeStart,2,required" db:"rangeStart" json:"rangeStart"` @@ -12477,8 +12477,8 @@ func (p *QueryRequest) String() string { } // Attributes: -// - ReadConsistency -// - ConflictResolutionStrategy +// - ReadConsistency +// - ConflictResolutionStrategy type ClusterQueryOptions struct { ReadConsistency *ReadConsistency `thrift:"readConsistency,1" db:"readConsistency" json:"readConsistency,omitempty"` ConflictResolutionStrategy *EqualTimestampStrategy `thrift:"conflictResolutionStrategy,2" db:"conflictResolutionStrategy" json:"conflictResolutionStrategy,omitempty"` @@ -12629,8 +12629,8 @@ func (p *ClusterQueryOptions) String() string { } // Attributes: -// - Results -// - Exhaustive +// - Results +// - Exhaustive type QueryResult_ struct { Results []*QueryResultElement `thrift:"results,1,required" db:"results" json:"results"` Exhaustive bool `thrift:"exhaustive,2,required" db:"exhaustive" json:"exhaustive"` @@ -12787,9 +12787,9 @@ func (p *QueryResult_) String() string { } // Attributes: -// - ID -// - Tags -// - Datapoints +// - ID +// - Tags +// - Datapoints type QueryResultElement struct { ID string `thrift:"id,1,required" db:"id" json:"id"` Tags []*Tag `thrift:"tags,2,required" db:"tags" json:"tags"` @@ -13006,8 +13006,8 @@ func (p *QueryResultElement) String() string { } // Attributes: -// - Field -// - Term +// - Field +// - Term type TermQuery struct { Field string `thrift:"field,1,required" db:"field" json:"field"` Term string `thrift:"term,2,required" db:"term" json:"term"` @@ -13145,8 +13145,8 @@ func (p *TermQuery) String() string { } // Attributes: -// - Field -// - Regexp +// - Field +// - Regexp type RegexpQuery struct { Field string `thrift:"field,1,required" db:"field" json:"field"` Regexp string `thrift:"regexp,2,required" db:"regexp" json:"regexp"` @@ -13284,7 +13284,7 @@ func (p *RegexpQuery) String() string { } // Attributes: -// - Query +// - Query type NegationQuery struct { Query *Query `thrift:"query,1,required" db:"query" json:"query"` } @@ -13391,7 +13391,7 @@ func (p *NegationQuery) String() string { } // Attributes: -// - Queries +// - Queries type ConjunctionQuery struct { Queries []*Query `thrift:"queries,1,required" db:"queries" json:"queries"` } @@ -13509,7 +13509,7 @@ func (p *ConjunctionQuery) String() string { } // Attributes: -// - Queries +// - Queries type DisjunctionQuery struct { Queries []*Query `thrift:"queries,1,required" db:"queries" json:"queries"` } @@ -13682,7 +13682,7 @@ func (p *AllQuery) String() string { } // Attributes: -// - Field +// - Field type FieldQuery struct { Field string `thrift:"field,1,required" db:"field" json:"field"` } @@ -13781,13 +13781,13 @@ func (p *FieldQuery) String() string { } // Attributes: -// - Term -// - Regexp -// - Negation -// - Conjunction -// - Disjunction -// - All -// - Field +// - Term +// - Regexp +// - Negation +// - Conjunction +// - Disjunction +// - All +// - Field type Query struct { Term *TermQuery `thrift:"term,1" db:"term" json:"term,omitempty"` Regexp *RegexpQuery `thrift:"regexp,2" db:"regexp" json:"regexp,omitempty"` @@ -14154,12 +14154,12 @@ func (p *Query) String() string { } // Attributes: -// - SourceNamespace -// - TargetNamespace -// - RangeStart -// - RangeEnd -// - Step -// - RangeType +// - SourceNamespace +// - TargetNamespace +// - RangeStart +// - RangeEnd +// - Step +// - RangeType type AggregateTilesRequest struct { SourceNamespace string `thrift:"sourceNamespace,1,required" db:"sourceNamespace" json:"sourceNamespace"` TargetNamespace string `thrift:"targetNamespace,2,required" db:"targetNamespace" json:"targetNamespace"` @@ -14459,7 +14459,7 @@ func (p *AggregateTilesRequest) String() string { } // Attributes: -// - ProcessedTileCount +// - ProcessedTileCount type AggregateTilesResult_ struct { ProcessedTileCount int64 `thrift:"processedTileCount,1,required" db:"processedTileCount" json:"processedTileCount"` } @@ -14558,14 +14558,14 @@ func (p *AggregateTilesResult_) String() string { } // Attributes: -// - Name -// - FilePathTemplate -// - Interval -// - Duration -// - Debug -// - ConditionalNumGoroutinesGreaterThan -// - ConditionalNumGoroutinesLessThan -// - ConditionalIsOverloaded +// - Name +// - FilePathTemplate +// - Interval +// - Duration +// - Debug +// - ConditionalNumGoroutinesGreaterThan +// - ConditionalNumGoroutinesLessThan +// - ConditionalIsOverloaded type DebugProfileStartRequest struct { Name string `thrift:"name,1,required" db:"name" json:"name"` FilePathTemplate string `thrift:"filePathTemplate,2,required" db:"filePathTemplate" json:"filePathTemplate"` @@ -15028,7 +15028,7 @@ func (p *DebugProfileStartResult_) String() string { } // Attributes: -// - Name +// - Name type DebugProfileStopRequest struct { Name string `thrift:"name,1,required" db:"name" json:"name"` } @@ -15182,7 +15182,7 @@ func (p *DebugProfileStopResult_) String() string { } // Attributes: -// - Directory +// - Directory type DebugIndexMemorySegmentsRequest struct { Directory string `thrift:"directory,1,required" db:"directory" json:"directory"` } @@ -15445,7 +15445,7 @@ func NewNodeClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot th } // Parameters: -// - Req +// - Req func (p *NodeClient) Query(req *QueryRequest) (r *QueryResult_, err error) { if err = p.sendQuery(req); err != nil { return @@ -15526,7 +15526,7 @@ func (p *NodeClient) recvQuery() (value *QueryResult_, err error) { } // Parameters: -// - Req +// - Req func (p *NodeClient) Aggregate(req *AggregateQueryRequest) (r *AggregateQueryResult_, err error) { if err = p.sendAggregate(req); err != nil { return @@ -15607,7 +15607,7 @@ func (p *NodeClient) recvAggregate() (value *AggregateQueryResult_, err error) { } // Parameters: -// - Req +// - Req func (p *NodeClient) Fetch(req *FetchRequest) (r *FetchResult_, err error) { if err = p.sendFetch(req); err != nil { return @@ -15688,7 +15688,7 @@ func (p *NodeClient) recvFetch() (value *FetchResult_, err error) { } // Parameters: -// - Req +// - Req func (p *NodeClient) Write(req *WriteRequest) (err error) { if err = p.sendWrite(req); err != nil { return @@ -15768,7 +15768,7 @@ func (p *NodeClient) recvWrite() (err error) { } // Parameters: -// - Req +// - Req func (p *NodeClient) WriteTagged(req *WriteTaggedRequest) (err error) { if err = p.sendWriteTagged(req); err != nil { return @@ -15848,7 +15848,7 @@ func (p *NodeClient) recvWriteTagged() (err error) { } // Parameters: -// - Req +// - Req func (p *NodeClient) AggregateRaw(req *AggregateQueryRawRequest) (r *AggregateQueryRawResult_, err error) { if err = p.sendAggregateRaw(req); err != nil { return @@ -15929,7 +15929,7 @@ func (p *NodeClient) recvAggregateRaw() (value *AggregateQueryRawResult_, err er } // Parameters: -// - Req +// - Req func (p *NodeClient) FetchBatchRaw(req *FetchBatchRawRequest) (r *FetchBatchRawResult_, err error) { if err = p.sendFetchBatchRaw(req); err != nil { return @@ -16010,7 +16010,7 @@ func (p *NodeClient) recvFetchBatchRaw() (value *FetchBatchRawResult_, err error } // Parameters: -// - Req +// - Req func (p *NodeClient) FetchBatchRawV2(req *FetchBatchRawV2Request) (r *FetchBatchRawResult_, err error) { if err = p.sendFetchBatchRawV2(req); err != nil { return @@ -16091,7 +16091,7 @@ func (p *NodeClient) recvFetchBatchRawV2() (value *FetchBatchRawResult_, err err } // Parameters: -// - Req +// - Req func (p *NodeClient) FetchBlocksRaw(req *FetchBlocksRawRequest) (r *FetchBlocksRawResult_, err error) { if err = p.sendFetchBlocksRaw(req); err != nil { return @@ -16172,7 +16172,7 @@ func (p *NodeClient) recvFetchBlocksRaw() (value *FetchBlocksRawResult_, err err } // Parameters: -// - Req +// - Req func (p *NodeClient) FetchTagged(req *FetchTaggedRequest) (r *FetchTaggedResult_, err error) { if err = p.sendFetchTagged(req); err != nil { return @@ -16253,7 +16253,7 @@ func (p *NodeClient) recvFetchTagged() (value *FetchTaggedResult_, err error) { } // Parameters: -// - Req +// - Req func (p *NodeClient) FetchBlocksMetadataRawV2(req *FetchBlocksMetadataRawV2Request) (r *FetchBlocksMetadataRawV2Result_, err error) { if err = p.sendFetchBlocksMetadataRawV2(req); err != nil { return @@ -16334,7 +16334,7 @@ func (p *NodeClient) recvFetchBlocksMetadataRawV2() (value *FetchBlocksMetadataR } // Parameters: -// - Req +// - Req func (p *NodeClient) WriteBatchRaw(req *WriteBatchRawRequest) (err error) { if err = p.sendWriteBatchRaw(req); err != nil { return @@ -16414,7 +16414,7 @@ func (p *NodeClient) recvWriteBatchRaw() (err error) { } // Parameters: -// - Req +// - Req func (p *NodeClient) WriteBatchRawV2(req *WriteBatchRawV2Request) (err error) { if err = p.sendWriteBatchRawV2(req); err != nil { return @@ -16494,7 +16494,7 @@ func (p *NodeClient) recvWriteBatchRawV2() (err error) { } // Parameters: -// - Req +// - Req func (p *NodeClient) WriteTaggedBatchRaw(req *WriteTaggedBatchRawRequest) (err error) { if err = p.sendWriteTaggedBatchRaw(req); err != nil { return @@ -16574,7 +16574,7 @@ func (p *NodeClient) recvWriteTaggedBatchRaw() (err error) { } // Parameters: -// - Req +// - Req func (p *NodeClient) WriteTaggedBatchRawV2(req *WriteTaggedBatchRawV2Request) (err error) { if err = p.sendWriteTaggedBatchRawV2(req); err != nil { return @@ -16730,7 +16730,7 @@ func (p *NodeClient) recvRepair() (err error) { } // Parameters: -// - Req +// - Req func (p *NodeClient) Truncate(req *TruncateRequest) (r *TruncateResult_, err error) { if err = p.sendTruncate(req); err != nil { return @@ -16811,7 +16811,7 @@ func (p *NodeClient) recvTruncate() (value *TruncateResult_, err error) { } // Parameters: -// - Req +// - Req func (p *NodeClient) AggregateTiles(req *AggregateTilesRequest) (r *AggregateTilesResult_, err error) { if err = p.sendAggregateTiles(req); err != nil { return @@ -17200,7 +17200,7 @@ func (p *NodeClient) recvGetPersistRateLimit() (value *NodePersistRateLimitResul } // Parameters: -// - Req +// - Req func (p *NodeClient) SetPersistRateLimit(req *NodeSetPersistRateLimitRequest) (r *NodePersistRateLimitResult_, err error) { if err = p.sendSetPersistRateLimit(req); err != nil { return @@ -17358,7 +17358,7 @@ func (p *NodeClient) recvGetWriteNewSeriesAsync() (value *NodeWriteNewSeriesAsyn } // Parameters: -// - Req +// - Req func (p *NodeClient) SetWriteNewSeriesAsync(req *NodeSetWriteNewSeriesAsyncRequest) (r *NodeWriteNewSeriesAsyncResult_, err error) { if err = p.sendSetWriteNewSeriesAsync(req); err != nil { return @@ -17516,7 +17516,7 @@ func (p *NodeClient) recvGetWriteNewSeriesBackoffDuration() (value *NodeWriteNew } // Parameters: -// - Req +// - Req func (p *NodeClient) SetWriteNewSeriesBackoffDuration(req *NodeSetWriteNewSeriesBackoffDurationRequest) (r *NodeWriteNewSeriesBackoffDurationResult_, err error) { if err = p.sendSetWriteNewSeriesBackoffDuration(req); err != nil { return @@ -17674,7 +17674,7 @@ func (p *NodeClient) recvGetWriteNewSeriesLimitPerShardPerSecond() (value *NodeW } // Parameters: -// - Req +// - Req func (p *NodeClient) SetWriteNewSeriesLimitPerShardPerSecond(req *NodeSetWriteNewSeriesLimitPerShardPerSecondRequest) (r *NodeWriteNewSeriesLimitPerShardPerSecondResult_, err error) { if err = p.sendSetWriteNewSeriesLimitPerShardPerSecond(req); err != nil { return @@ -17755,7 +17755,7 @@ func (p *NodeClient) recvSetWriteNewSeriesLimitPerShardPerSecond() (value *NodeW } // Parameters: -// - Req +// - Req func (p *NodeClient) DebugProfileStart(req *DebugProfileStartRequest) (r *DebugProfileStartResult_, err error) { if err = p.sendDebugProfileStart(req); err != nil { return @@ -17836,7 +17836,7 @@ func (p *NodeClient) recvDebugProfileStart() (value *DebugProfileStartResult_, e } // Parameters: -// - Req +// - Req func (p *NodeClient) DebugProfileStop(req *DebugProfileStopRequest) (r *DebugProfileStopResult_, err error) { if err = p.sendDebugProfileStop(req); err != nil { return @@ -17917,7 +17917,7 @@ func (p *NodeClient) recvDebugProfileStop() (value *DebugProfileStopResult_, err } // Parameters: -// - Req +// - Req func (p *NodeClient) DebugIndexMemorySegments(req *DebugIndexMemorySegmentsRequest) (r *DebugIndexMemorySegmentsResult_, err error) { if err = p.sendDebugIndexMemorySegments(req); err != nil { return @@ -19750,7 +19750,7 @@ func (p *nodeProcessorDebugIndexMemorySegments) Process(seqId int32, iprot, opro // HELPER FUNCTIONS AND STRUCTURES // Attributes: -// - Req +// - Req type NodeQueryArgs struct { Req *QueryRequest `thrift:"req,1" db:"req" json:"req"` } @@ -19855,8 +19855,8 @@ func (p *NodeQueryArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeQueryResult struct { Success *QueryResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -20005,7 +20005,7 @@ func (p *NodeQueryResult) String() string { } // Attributes: -// - Req +// - Req type NodeAggregateArgs struct { Req *AggregateQueryRequest `thrift:"req,1" db:"req" json:"req"` } @@ -20110,8 +20110,8 @@ func (p *NodeAggregateArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeAggregateResult struct { Success *AggregateQueryResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -20260,7 +20260,7 @@ func (p *NodeAggregateResult) String() string { } // Attributes: -// - Req +// - Req type NodeFetchArgs struct { Req *FetchRequest `thrift:"req,1" db:"req" json:"req"` } @@ -20365,8 +20365,8 @@ func (p *NodeFetchArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeFetchResult struct { Success *FetchResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -20515,7 +20515,7 @@ func (p *NodeFetchResult) String() string { } // Attributes: -// - Req +// - Req type NodeWriteArgs struct { Req *WriteRequest `thrift:"req,1" db:"req" json:"req"` } @@ -20616,7 +20616,7 @@ func (p *NodeWriteArgs) String() string { } // Attributes: -// - Err +// - Err type NodeWriteResult struct { Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` } @@ -20721,7 +20721,7 @@ func (p *NodeWriteResult) String() string { } // Attributes: -// - Req +// - Req type NodeWriteTaggedArgs struct { Req *WriteTaggedRequest `thrift:"req,1" db:"req" json:"req"` } @@ -20822,7 +20822,7 @@ func (p *NodeWriteTaggedArgs) String() string { } // Attributes: -// - Err +// - Err type NodeWriteTaggedResult struct { Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` } @@ -20927,7 +20927,7 @@ func (p *NodeWriteTaggedResult) String() string { } // Attributes: -// - Req +// - Req type NodeAggregateRawArgs struct { Req *AggregateQueryRawRequest `thrift:"req,1" db:"req" json:"req"` } @@ -21032,8 +21032,8 @@ func (p *NodeAggregateRawArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeAggregateRawResult struct { Success *AggregateQueryRawResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -21182,7 +21182,7 @@ func (p *NodeAggregateRawResult) String() string { } // Attributes: -// - Req +// - Req type NodeFetchBatchRawArgs struct { Req *FetchBatchRawRequest `thrift:"req,1" db:"req" json:"req"` } @@ -21285,8 +21285,8 @@ func (p *NodeFetchBatchRawArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeFetchBatchRawResult struct { Success *FetchBatchRawResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -21435,7 +21435,7 @@ func (p *NodeFetchBatchRawResult) String() string { } // Attributes: -// - Req +// - Req type NodeFetchBatchRawV2Args struct { Req *FetchBatchRawV2Request `thrift:"req,1" db:"req" json:"req"` } @@ -21536,8 +21536,8 @@ func (p *NodeFetchBatchRawV2Args) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeFetchBatchRawV2Result struct { Success *FetchBatchRawResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -21686,7 +21686,7 @@ func (p *NodeFetchBatchRawV2Result) String() string { } // Attributes: -// - Req +// - Req type NodeFetchBlocksRawArgs struct { Req *FetchBlocksRawRequest `thrift:"req,1" db:"req" json:"req"` } @@ -21787,8 +21787,8 @@ func (p *NodeFetchBlocksRawArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeFetchBlocksRawResult struct { Success *FetchBlocksRawResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -21937,7 +21937,7 @@ func (p *NodeFetchBlocksRawResult) String() string { } // Attributes: -// - Req +// - Req type NodeFetchTaggedArgs struct { Req *FetchTaggedRequest `thrift:"req,1" db:"req" json:"req"` } @@ -22042,8 +22042,8 @@ func (p *NodeFetchTaggedArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeFetchTaggedResult struct { Success *FetchTaggedResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -22192,7 +22192,7 @@ func (p *NodeFetchTaggedResult) String() string { } // Attributes: -// - Req +// - Req type NodeFetchBlocksMetadataRawV2Args struct { Req *FetchBlocksMetadataRawV2Request `thrift:"req,1" db:"req" json:"req"` } @@ -22293,8 +22293,8 @@ func (p *NodeFetchBlocksMetadataRawV2Args) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeFetchBlocksMetadataRawV2Result struct { Success *FetchBlocksMetadataRawV2Result_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -22443,7 +22443,7 @@ func (p *NodeFetchBlocksMetadataRawV2Result) String() string { } // Attributes: -// - Req +// - Req type NodeWriteBatchRawArgs struct { Req *WriteBatchRawRequest `thrift:"req,1" db:"req" json:"req"` } @@ -22544,7 +22544,7 @@ func (p *NodeWriteBatchRawArgs) String() string { } // Attributes: -// - Err +// - Err type NodeWriteBatchRawResult struct { Err *WriteBatchRawErrors `thrift:"err,1" db:"err" json:"err,omitempty"` } @@ -22647,7 +22647,7 @@ func (p *NodeWriteBatchRawResult) String() string { } // Attributes: -// - Req +// - Req type NodeWriteBatchRawV2Args struct { Req *WriteBatchRawV2Request `thrift:"req,1" db:"req" json:"req"` } @@ -22748,7 +22748,7 @@ func (p *NodeWriteBatchRawV2Args) String() string { } // Attributes: -// - Err +// - Err type NodeWriteBatchRawV2Result struct { Err *WriteBatchRawErrors `thrift:"err,1" db:"err" json:"err,omitempty"` } @@ -22851,7 +22851,7 @@ func (p *NodeWriteBatchRawV2Result) String() string { } // Attributes: -// - Req +// - Req type NodeWriteTaggedBatchRawArgs struct { Req *WriteTaggedBatchRawRequest `thrift:"req,1" db:"req" json:"req"` } @@ -22952,7 +22952,7 @@ func (p *NodeWriteTaggedBatchRawArgs) String() string { } // Attributes: -// - Err +// - Err type NodeWriteTaggedBatchRawResult struct { Err *WriteBatchRawErrors `thrift:"err,1" db:"err" json:"err,omitempty"` } @@ -23055,7 +23055,7 @@ func (p *NodeWriteTaggedBatchRawResult) String() string { } // Attributes: -// - Req +// - Req type NodeWriteTaggedBatchRawV2Args struct { Req *WriteTaggedBatchRawV2Request `thrift:"req,1" db:"req" json:"req"` } @@ -23156,7 +23156,7 @@ func (p *NodeWriteTaggedBatchRawV2Args) String() string { } // Attributes: -// - Err +// - Err type NodeWriteTaggedBatchRawV2Result struct { Err *WriteBatchRawErrors `thrift:"err,1" db:"err" json:"err,omitempty"` } @@ -23314,7 +23314,7 @@ func (p *NodeRepairArgs) String() string { } // Attributes: -// - Err +// - Err type NodeRepairResult struct { Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` } @@ -23419,7 +23419,7 @@ func (p *NodeRepairResult) String() string { } // Attributes: -// - Req +// - Req type NodeTruncateArgs struct { Req *TruncateRequest `thrift:"req,1" db:"req" json:"req"` } @@ -23520,8 +23520,8 @@ func (p *NodeTruncateArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeTruncateResult struct { Success *TruncateResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -23670,7 +23670,7 @@ func (p *NodeTruncateResult) String() string { } // Attributes: -// - Req +// - Req type NodeAggregateTilesArgs struct { Req *AggregateTilesRequest `thrift:"req,1" db:"req" json:"req"` } @@ -23773,8 +23773,8 @@ func (p *NodeAggregateTilesArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeAggregateTilesResult struct { Success *AggregateTilesResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -23978,8 +23978,8 @@ func (p *NodeHealthArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeHealthResult struct { Success *NodeHealthResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -24183,8 +24183,8 @@ func (p *NodeBootstrappedArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeBootstrappedResult struct { Success *NodeBootstrappedResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -24388,8 +24388,8 @@ func (p *NodeBootstrappedInPlacementOrNoPlacementArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeBootstrappedInPlacementOrNoPlacementResult struct { Success *NodeBootstrappedInPlacementOrNoPlacementResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -24593,8 +24593,8 @@ func (p *NodeGetPersistRateLimitArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeGetPersistRateLimitResult struct { Success *NodePersistRateLimitResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -24743,7 +24743,7 @@ func (p *NodeGetPersistRateLimitResult) String() string { } // Attributes: -// - Req +// - Req type NodeSetPersistRateLimitArgs struct { Req *NodeSetPersistRateLimitRequest `thrift:"req,1" db:"req" json:"req"` } @@ -24844,8 +24844,8 @@ func (p *NodeSetPersistRateLimitArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeSetPersistRateLimitResult struct { Success *NodePersistRateLimitResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -25049,8 +25049,8 @@ func (p *NodeGetWriteNewSeriesAsyncArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeGetWriteNewSeriesAsyncResult struct { Success *NodeWriteNewSeriesAsyncResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -25199,7 +25199,7 @@ func (p *NodeGetWriteNewSeriesAsyncResult) String() string { } // Attributes: -// - Req +// - Req type NodeSetWriteNewSeriesAsyncArgs struct { Req *NodeSetWriteNewSeriesAsyncRequest `thrift:"req,1" db:"req" json:"req"` } @@ -25300,8 +25300,8 @@ func (p *NodeSetWriteNewSeriesAsyncArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeSetWriteNewSeriesAsyncResult struct { Success *NodeWriteNewSeriesAsyncResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -25505,8 +25505,8 @@ func (p *NodeGetWriteNewSeriesBackoffDurationArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeGetWriteNewSeriesBackoffDurationResult struct { Success *NodeWriteNewSeriesBackoffDurationResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -25655,7 +25655,7 @@ func (p *NodeGetWriteNewSeriesBackoffDurationResult) String() string { } // Attributes: -// - Req +// - Req type NodeSetWriteNewSeriesBackoffDurationArgs struct { Req *NodeSetWriteNewSeriesBackoffDurationRequest `thrift:"req,1" db:"req" json:"req"` } @@ -25758,8 +25758,8 @@ func (p *NodeSetWriteNewSeriesBackoffDurationArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeSetWriteNewSeriesBackoffDurationResult struct { Success *NodeWriteNewSeriesBackoffDurationResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -25963,8 +25963,8 @@ func (p *NodeGetWriteNewSeriesLimitPerShardPerSecondArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeGetWriteNewSeriesLimitPerShardPerSecondResult struct { Success *NodeWriteNewSeriesLimitPerShardPerSecondResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -26113,7 +26113,7 @@ func (p *NodeGetWriteNewSeriesLimitPerShardPerSecondResult) String() string { } // Attributes: -// - Req +// - Req type NodeSetWriteNewSeriesLimitPerShardPerSecondArgs struct { Req *NodeSetWriteNewSeriesLimitPerShardPerSecondRequest `thrift:"req,1" db:"req" json:"req"` } @@ -26214,8 +26214,8 @@ func (p *NodeSetWriteNewSeriesLimitPerShardPerSecondArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeSetWriteNewSeriesLimitPerShardPerSecondResult struct { Success *NodeWriteNewSeriesLimitPerShardPerSecondResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -26364,7 +26364,7 @@ func (p *NodeSetWriteNewSeriesLimitPerShardPerSecondResult) String() string { } // Attributes: -// - Req +// - Req type NodeDebugProfileStartArgs struct { Req *DebugProfileStartRequest `thrift:"req,1" db:"req" json:"req"` } @@ -26465,8 +26465,8 @@ func (p *NodeDebugProfileStartArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeDebugProfileStartResult struct { Success *DebugProfileStartResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -26615,7 +26615,7 @@ func (p *NodeDebugProfileStartResult) String() string { } // Attributes: -// - Req +// - Req type NodeDebugProfileStopArgs struct { Req *DebugProfileStopRequest `thrift:"req,1" db:"req" json:"req"` } @@ -26716,8 +26716,8 @@ func (p *NodeDebugProfileStopArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeDebugProfileStopResult struct { Success *DebugProfileStopResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -26866,7 +26866,7 @@ func (p *NodeDebugProfileStopResult) String() string { } // Attributes: -// - Req +// - Req type NodeDebugIndexMemorySegmentsArgs struct { Req *DebugIndexMemorySegmentsRequest `thrift:"req,1" db:"req" json:"req"` } @@ -26967,8 +26967,8 @@ func (p *NodeDebugIndexMemorySegmentsArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type NodeDebugIndexMemorySegmentsResult struct { Success *DebugIndexMemorySegmentsResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -27242,7 +27242,7 @@ func (p *ClusterClient) recvHealth() (value *HealthResult_, err error) { } // Parameters: -// - Req +// - Req func (p *ClusterClient) Write(req *WriteRequest) (err error) { if err = p.sendWrite(req); err != nil { return @@ -27322,7 +27322,7 @@ func (p *ClusterClient) recvWrite() (err error) { } // Parameters: -// - Req +// - Req func (p *ClusterClient) WriteTagged(req *WriteTaggedRequest) (err error) { if err = p.sendWriteTagged(req); err != nil { return @@ -27402,7 +27402,7 @@ func (p *ClusterClient) recvWriteTagged() (err error) { } // Parameters: -// - Req +// - Req func (p *ClusterClient) Query(req *QueryRequest) (r *QueryResult_, err error) { if err = p.sendQuery(req); err != nil { return @@ -27483,7 +27483,7 @@ func (p *ClusterClient) recvQuery() (value *QueryResult_, err error) { } // Parameters: -// - Req +// - Req func (p *ClusterClient) Aggregate(req *AggregateQueryRequest) (r *AggregateQueryResult_, err error) { if err = p.sendAggregate(req); err != nil { return @@ -27564,7 +27564,7 @@ func (p *ClusterClient) recvAggregate() (value *AggregateQueryResult_, err error } // Parameters: -// - Req +// - Req func (p *ClusterClient) Fetch(req *FetchRequest) (r *FetchResult_, err error) { if err = p.sendFetch(req); err != nil { return @@ -27645,7 +27645,7 @@ func (p *ClusterClient) recvFetch() (value *FetchResult_, err error) { } // Parameters: -// - Req +// - Req func (p *ClusterClient) Truncate(req *TruncateRequest) (r *TruncateResult_, err error) { if err = p.sendTruncate(req); err != nil { return @@ -28198,8 +28198,8 @@ func (p *ClusterHealthArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type ClusterHealthResult struct { Success *HealthResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -28348,7 +28348,7 @@ func (p *ClusterHealthResult) String() string { } // Attributes: -// - Req +// - Req type ClusterWriteArgs struct { Req *WriteRequest `thrift:"req,1" db:"req" json:"req"` } @@ -28449,7 +28449,7 @@ func (p *ClusterWriteArgs) String() string { } // Attributes: -// - Err +// - Err type ClusterWriteResult struct { Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` } @@ -28554,7 +28554,7 @@ func (p *ClusterWriteResult) String() string { } // Attributes: -// - Req +// - Req type ClusterWriteTaggedArgs struct { Req *WriteTaggedRequest `thrift:"req,1" db:"req" json:"req"` } @@ -28655,7 +28655,7 @@ func (p *ClusterWriteTaggedArgs) String() string { } // Attributes: -// - Err +// - Err type ClusterWriteTaggedResult struct { Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` } @@ -28760,7 +28760,7 @@ func (p *ClusterWriteTaggedResult) String() string { } // Attributes: -// - Req +// - Req type ClusterQueryArgs struct { Req *QueryRequest `thrift:"req,1" db:"req" json:"req"` } @@ -28865,8 +28865,8 @@ func (p *ClusterQueryArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type ClusterQueryResult struct { Success *QueryResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -29015,7 +29015,7 @@ func (p *ClusterQueryResult) String() string { } // Attributes: -// - Req +// - Req type ClusterAggregateArgs struct { Req *AggregateQueryRequest `thrift:"req,1" db:"req" json:"req"` } @@ -29120,8 +29120,8 @@ func (p *ClusterAggregateArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type ClusterAggregateResult struct { Success *AggregateQueryResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -29270,7 +29270,7 @@ func (p *ClusterAggregateResult) String() string { } // Attributes: -// - Req +// - Req type ClusterFetchArgs struct { Req *FetchRequest `thrift:"req,1" db:"req" json:"req"` } @@ -29375,8 +29375,8 @@ func (p *ClusterFetchArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type ClusterFetchResult struct { Success *FetchResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` @@ -29525,7 +29525,7 @@ func (p *ClusterFetchResult) String() string { } // Attributes: -// - Req +// - Req type ClusterTruncateArgs struct { Req *TruncateRequest `thrift:"req,1" db:"req" json:"req"` } @@ -29626,8 +29626,8 @@ func (p *ClusterTruncateArgs) String() string { } // Attributes: -// - Success -// - Err +// - Success +// - Err type ClusterTruncateResult struct { Success *TruncateResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` Err *Error `thrift:"err,1" db:"err" json:"err,omitempty"` diff --git a/src/dbnode/integration/admin_session_fetch_bootstrap_blocks_metadata_test.go b/src/dbnode/integration/admin_session_fetch_bootstrap_blocks_metadata_test.go index c9a883b525..9fcc984f9e 100644 --- a/src/dbnode/integration/admin_session_fetch_bootstrap_blocks_metadata_test.go +++ b/src/dbnode/integration/admin_session_fetch_bootstrap_blocks_metadata_test.go @@ -1,3 +1,23 @@ +// Copyright (c) 2024 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + package integration import ( diff --git a/src/m3em/generated/proto/heartbeat/heartbeat.pb.go b/src/m3em/generated/proto/heartbeat/heartbeat.pb.go index 665d383455..ff985a2d6b 100644 --- a/src/m3em/generated/proto/heartbeat/heartbeat.pb.go +++ b/src/m3em/generated/proto/heartbeat/heartbeat.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/m3em/generated/proto/heartbeat/heartbeat.proto -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,26 +21,19 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package heartbeat is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/m3em/generated/proto/heartbeat/heartbeat.proto - - It has these top-level messages: - HeartbeatRequest - HeartbeatResponse -*/ package heartbeat -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import context "golang.org/x/net/context" -import grpc "google.golang.org/grpc" - -import io "io" +import ( + context "context" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -51,7 +44,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type HeartbeatCode int32 @@ -68,6 +61,7 @@ var HeartbeatCode_name = map[int32]string{ 2: "PROCESS_TERMINATION", 3: "OVERWRITTEN", } + var HeartbeatCode_value = map[string]int32{ "UNKNOWN": 0, "HEALTHY": 1, @@ -78,7 +72,10 @@ var HeartbeatCode_value = map[string]int32{ func (x HeartbeatCode) String() string { return proto.EnumName(HeartbeatCode_name, int32(x)) } -func (HeartbeatCode) EnumDescriptor() ([]byte, []int) { return fileDescriptorHeartbeat, []int{0} } + +func (HeartbeatCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_aa2e22f71a707392, []int{0} +} type HeartbeatRequest struct { OperatorUuid string `protobuf:"bytes,1,opt,name=operator_uuid,json=operatorUuid,proto3" json:"operator_uuid,omitempty"` @@ -87,10 +84,38 @@ type HeartbeatRequest struct { ProcessRunning bool `protobuf:"varint,4,opt,name=process_running,json=processRunning,proto3" json:"process_running,omitempty"` } -func (m *HeartbeatRequest) Reset() { *m = HeartbeatRequest{} } -func (m *HeartbeatRequest) String() string { return proto.CompactTextString(m) } -func (*HeartbeatRequest) ProtoMessage() {} -func (*HeartbeatRequest) Descriptor() ([]byte, []int) { return fileDescriptorHeartbeat, []int{0} } +func (m *HeartbeatRequest) Reset() { *m = HeartbeatRequest{} } +func (m *HeartbeatRequest) String() string { return proto.CompactTextString(m) } +func (*HeartbeatRequest) ProtoMessage() {} +func (*HeartbeatRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_aa2e22f71a707392, []int{0} +} +func (m *HeartbeatRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HeartbeatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HeartbeatRequest.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 *HeartbeatRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_HeartbeatRequest.Merge(m, src) +} +func (m *HeartbeatRequest) XXX_Size() int { + return m.Size() +} +func (m *HeartbeatRequest) XXX_DiscardUnknown() { + xxx_messageInfo_HeartbeatRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_HeartbeatRequest proto.InternalMessageInfo func (m *HeartbeatRequest) GetOperatorUuid() string { if m != nil { @@ -123,15 +148,73 @@ func (m *HeartbeatRequest) GetProcessRunning() bool { type HeartbeatResponse struct { } -func (m *HeartbeatResponse) Reset() { *m = HeartbeatResponse{} } -func (m *HeartbeatResponse) String() string { return proto.CompactTextString(m) } -func (*HeartbeatResponse) ProtoMessage() {} -func (*HeartbeatResponse) Descriptor() ([]byte, []int) { return fileDescriptorHeartbeat, []int{1} } +func (m *HeartbeatResponse) Reset() { *m = HeartbeatResponse{} } +func (m *HeartbeatResponse) String() string { return proto.CompactTextString(m) } +func (*HeartbeatResponse) ProtoMessage() {} +func (*HeartbeatResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_aa2e22f71a707392, []int{1} +} +func (m *HeartbeatResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HeartbeatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HeartbeatResponse.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 *HeartbeatResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_HeartbeatResponse.Merge(m, src) +} +func (m *HeartbeatResponse) XXX_Size() int { + return m.Size() +} +func (m *HeartbeatResponse) XXX_DiscardUnknown() { + xxx_messageInfo_HeartbeatResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_HeartbeatResponse proto.InternalMessageInfo func init() { + proto.RegisterEnum("heartbeat.HeartbeatCode", HeartbeatCode_name, HeartbeatCode_value) proto.RegisterType((*HeartbeatRequest)(nil), "heartbeat.HeartbeatRequest") proto.RegisterType((*HeartbeatResponse)(nil), "heartbeat.HeartbeatResponse") - proto.RegisterEnum("heartbeat.HeartbeatCode", HeartbeatCode_name, HeartbeatCode_value) +} + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/m3em/generated/proto/heartbeat/heartbeat.proto", fileDescriptor_aa2e22f71a707392) +} + +var fileDescriptor_aa2e22f71a707392 = []byte{ + // 343 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x4f, 0x4e, 0xc2, 0x40, + 0x14, 0x87, 0x3b, 0x80, 0x7f, 0x18, 0x04, 0xea, 0x60, 0x62, 0xa3, 0xa6, 0x21, 0xb8, 0x90, 0x18, + 0xc3, 0x24, 0xf4, 0x04, 0x48, 0x6a, 0x20, 0x6a, 0x6b, 0x86, 0x22, 0x71, 0x45, 0x68, 0xfb, 0x02, + 0x5d, 0xb4, 0x53, 0xa7, 0xed, 0x3d, 0x3c, 0x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x55, 0xe8, + 0xe9, 0x9d, 0x27, 0xab, 0xf7, 0x26, 0x23, 0x72, 0x8e, 0x6b, 0x2f, 0xcc, 0xec, 0xea, 0x83, 0xc1, + 0xd8, 0xd2, 0xd9, 0x73, 0xdf, 0xe8, 0x58, 0x7d, 0xd3, 0x90, 0x73, 0xa4, 0x8a, 0x4b, 0xe6, 0xab, + 0xce, 0x46, 0xac, 0x6f, 0x59, 0xba, 0x21, 0xe7, 0xdb, 0x43, 0x5c, 0xca, 0xa4, 0x20, 0xc8, 0x03, + 0x2e, 0x66, 0x91, 0x5c, 0xee, 0x7b, 0xe4, 0xe6, 0xd3, 0x2e, 0xae, 0xf6, 0x17, 0xd7, 0xb3, 0xde, + 0x2b, 0x5f, 0x0b, 0x15, 0xcd, 0x17, 0x2a, 0xfa, 0x59, 0xa8, 0xe8, 0x63, 0xa9, 0x4a, 0xf3, 0xa5, + 0x2a, 0x7d, 0x2f, 0x55, 0xc9, 0x3e, 0x4c, 0x77, 0xa2, 0xfd, 0x06, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xf4, 0x88, 0xe2, 0xdc, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -142,8 +225,9 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for Heartbeater service - +// HeartbeaterClient is the client API for Heartbeater service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type HeartbeaterClient interface { Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error) } @@ -158,19 +242,26 @@ func NewHeartbeaterClient(cc *grpc.ClientConn) HeartbeaterClient { func (c *heartbeaterClient) Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error) { out := new(HeartbeatResponse) - err := grpc.Invoke(ctx, "/heartbeat.Heartbeater/Heartbeat", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/heartbeat.Heartbeater/Heartbeat", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for Heartbeater service - +// HeartbeaterServer is the server API for Heartbeater service. type HeartbeaterServer interface { Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error) } +// UnimplementedHeartbeaterServer can be embedded to have forward compatible implementations. +type UnimplementedHeartbeaterServer struct { +} + +func (*UnimplementedHeartbeaterServer) Heartbeat(ctx context.Context, req *HeartbeatRequest) (*HeartbeatResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Heartbeat not implemented") +} + func RegisterHeartbeaterServer(s *grpc.Server, srv HeartbeaterServer) { s.RegisterService(&_Heartbeater_serviceDesc, srv) } @@ -209,7 +300,7 @@ var _Heartbeater_serviceDesc = grpc.ServiceDesc{ func (m *HeartbeatRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -217,44 +308,51 @@ func (m *HeartbeatRequest) Marshal() (dAtA []byte, err error) { } func (m *HeartbeatRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HeartbeatRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.OperatorUuid) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintHeartbeat(dAtA, i, uint64(len(m.OperatorUuid))) - i += copy(dAtA[i:], m.OperatorUuid) - } - if m.Code != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintHeartbeat(dAtA, i, uint64(m.Code)) - } - if len(m.Error) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintHeartbeat(dAtA, i, uint64(len(m.Error))) - i += copy(dAtA[i:], m.Error) - } if m.ProcessRunning { - dAtA[i] = 0x20 - i++ + i-- if m.ProcessRunning { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x20 } - return i, nil + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintHeartbeat(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0x1a + } + if m.Code != 0 { + i = encodeVarintHeartbeat(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x10 + } + if len(m.OperatorUuid) > 0 { + i -= len(m.OperatorUuid) + copy(dAtA[i:], m.OperatorUuid) + i = encodeVarintHeartbeat(dAtA, i, uint64(len(m.OperatorUuid))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *HeartbeatResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -262,23 +360,33 @@ func (m *HeartbeatResponse) Marshal() (dAtA []byte, err error) { } func (m *HeartbeatResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HeartbeatResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - return i, nil + return len(dAtA) - i, nil } func encodeVarintHeartbeat(dAtA []byte, offset int, v uint64) int { + offset -= sovHeartbeat(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *HeartbeatRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.OperatorUuid) @@ -299,20 +407,16 @@ func (m *HeartbeatRequest) Size() (n int) { } func (m *HeartbeatResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l return n } func sovHeartbeat(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozHeartbeat(x uint64) (n int) { return sovHeartbeat(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -332,7 +436,7 @@ func (m *HeartbeatRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -360,7 +464,7 @@ func (m *HeartbeatRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -370,6 +474,9 @@ func (m *HeartbeatRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthHeartbeat } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHeartbeat + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -389,7 +496,7 @@ func (m *HeartbeatRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= (HeartbeatCode(b) & 0x7F) << shift + m.Code |= HeartbeatCode(b&0x7F) << shift if b < 0x80 { break } @@ -408,7 +515,7 @@ func (m *HeartbeatRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -418,6 +525,9 @@ func (m *HeartbeatRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthHeartbeat } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHeartbeat + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -437,7 +547,7 @@ func (m *HeartbeatRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -449,7 +559,7 @@ func (m *HeartbeatRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthHeartbeat } if (iNdEx + skippy) > l { @@ -479,7 +589,7 @@ func (m *HeartbeatResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -499,7 +609,7 @@ func (m *HeartbeatResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthHeartbeat } if (iNdEx + skippy) > l { @@ -517,6 +627,7 @@ func (m *HeartbeatResponse) Unmarshal(dAtA []byte) error { func skipHeartbeat(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -548,10 +659,8 @@ func skipHeartbeat(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -568,83 +677,34 @@ func skipHeartbeat(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthHeartbeat } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHeartbeat - } - 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 := skipHeartbeat(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupHeartbeat + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthHeartbeat + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthHeartbeat = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHeartbeat = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthHeartbeat = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowHeartbeat = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupHeartbeat = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/m3em/generated/proto/heartbeat/heartbeat.proto", fileDescriptorHeartbeat) -} - -var fileDescriptorHeartbeat = []byte{ - // 337 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x5f, 0x4e, 0xea, 0x40, - 0x14, 0x87, 0x19, 0xe0, 0xfe, 0xe1, 0x70, 0x81, 0xde, 0xc1, 0xc4, 0x46, 0x4d, 0x43, 0xf0, 0x41, - 0x62, 0x0c, 0x93, 0xd0, 0x15, 0x20, 0xa9, 0x81, 0xa8, 0xad, 0x19, 0x8a, 0xc4, 0x27, 0x42, 0xdb, - 0x13, 0xe8, 0x43, 0x3b, 0x75, 0xda, 0xee, 0xc3, 0x45, 0xb8, 0x18, 0x1f, 0x5d, 0x82, 0xc1, 0x8d, - 0x18, 0x0a, 0x14, 0x4d, 0x78, 0x9b, 0xdf, 0x77, 0x26, 0xdf, 0x39, 0x33, 0x07, 0x8c, 0x85, 0x9f, - 0x2c, 0x53, 0xa7, 0xeb, 0x8a, 0x80, 0x05, 0xba, 0xe7, 0xb0, 0x40, 0x67, 0xb1, 0x74, 0x59, 0xa0, - 0x63, 0xc0, 0x16, 0x18, 0xa2, 0x9c, 0x27, 0xe8, 0xb1, 0x48, 0x8a, 0x44, 0xb0, 0x25, 0xce, 0x65, - 0xe2, 0xe0, 0x3c, 0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0x3b, 0x39, 0x3b, 0x5c, 0xdc, 0xcc, 0x7a, - 0xad, 0xbc, 0xad, 0x34, 0xf2, 0xbe, 0xd2, 0xc8, 0xc7, 0x4a, 0x23, 0x2f, 0x9f, 0x5a, 0xc1, 0xf9, - 0x9d, 0xed, 0x42, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x69, 0x51, 0x07, 0x63, 0xd4, 0x01, 0x00, - 0x00, -} diff --git a/src/m3em/generated/proto/m3em/operator.pb.go b/src/m3em/generated/proto/m3em/operator.pb.go index dd8287af72..0618dec618 100644 --- a/src/m3em/generated/proto/m3em/operator.pb.go +++ b/src/m3em/generated/proto/m3em/operator.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/m3em/generated/proto/m3em/operator.proto -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,37 +21,19 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package m3em is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/m3em/generated/proto/m3em/operator.proto - - It has these top-level messages: - SetupRequest - SetupResponse - StartRequest - StartResponse - StopRequest - StopResponse - TeardownRequest - TeardownResponse - PullFileRequest - PullFileResponse - PushFileRequest - PushFileResponse - DataChunk -*/ package m3em -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import context "golang.org/x/net/context" -import grpc "google.golang.org/grpc" - -import io "io" +import ( + context "context" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -62,7 +44,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type PullFileType int32 @@ -77,6 +59,7 @@ var PullFileType_name = map[int32]string{ 1: "PULL_FILE_TYPE_SERVICE_STDOUT", 2: "PULL_FILE_TYPE_SERVICE_STDERR", } + var PullFileType_value = map[string]int32{ "PULL_FILE_TYPE_UNKNOWN": 0, "PULL_FILE_TYPE_SERVICE_STDOUT": 1, @@ -86,7 +69,10 @@ var PullFileType_value = map[string]int32{ func (x PullFileType) String() string { return proto.EnumName(PullFileType_name, int32(x)) } -func (PullFileType) EnumDescriptor() ([]byte, []int) { return fileDescriptorOperator, []int{0} } + +func (PullFileType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{0} +} type PullFileContentType int32 @@ -101,6 +87,7 @@ var PullFileContentType_name = map[int32]string{ 1: "PULL_FILE_CONTENT_TYPE_LAST", 2: "PULL_FILE_CONTENT_TYPE_FULL", } + var PullFileContentType_value = map[string]int32{ "PULL_FILE_CONTENT_TYPE_UNKNOWN": 0, "PULL_FILE_CONTENT_TYPE_LAST": 1, @@ -110,7 +97,10 @@ var PullFileContentType_value = map[string]int32{ func (x PullFileContentType) String() string { return proto.EnumName(PullFileContentType_name, int32(x)) } -func (PullFileContentType) EnumDescriptor() ([]byte, []int) { return fileDescriptorOperator, []int{1} } + +func (PullFileContentType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{1} +} type PushFileType int32 @@ -127,6 +117,7 @@ var PushFileType_name = map[int32]string{ 2: "PUSH_FILE_TYPE_SERVICE_CONFIG", 3: "PUSH_FILE_TYPE_DATA_FILE", } + var PushFileType_value = map[string]int32{ "PUSH_FILE_TYPE_UNKNOWN": 0, "PUSH_FILE_TYPE_SERVICE_BINARY": 1, @@ -137,7 +128,10 @@ var PushFileType_value = map[string]int32{ func (x PushFileType) String() string { return proto.EnumName(PushFileType_name, int32(x)) } -func (PushFileType) EnumDescriptor() ([]byte, []int) { return fileDescriptorOperator, []int{2} } + +func (PushFileType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{2} +} type SetupRequest struct { SessionToken string `protobuf:"bytes,1,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"` @@ -148,10 +142,38 @@ type SetupRequest struct { HeartbeatFrequencySecs uint32 `protobuf:"varint,6,opt,name=heartbeat_frequency_secs,json=heartbeatFrequencySecs,proto3" json:"heartbeat_frequency_secs,omitempty"` } -func (m *SetupRequest) Reset() { *m = SetupRequest{} } -func (m *SetupRequest) String() string { return proto.CompactTextString(m) } -func (*SetupRequest) ProtoMessage() {} -func (*SetupRequest) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{0} } +func (m *SetupRequest) Reset() { *m = SetupRequest{} } +func (m *SetupRequest) String() string { return proto.CompactTextString(m) } +func (*SetupRequest) ProtoMessage() {} +func (*SetupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{0} +} +func (m *SetupRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetupRequest.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 *SetupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetupRequest.Merge(m, src) +} +func (m *SetupRequest) XXX_Size() int { + return m.Size() +} +func (m *SetupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SetupRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SetupRequest proto.InternalMessageInfo func (m *SetupRequest) GetSessionToken() string { if m != nil { @@ -198,58 +220,254 @@ func (m *SetupRequest) GetHeartbeatFrequencySecs() uint32 { type SetupResponse struct { } -func (m *SetupResponse) Reset() { *m = SetupResponse{} } -func (m *SetupResponse) String() string { return proto.CompactTextString(m) } -func (*SetupResponse) ProtoMessage() {} -func (*SetupResponse) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{1} } +func (m *SetupResponse) Reset() { *m = SetupResponse{} } +func (m *SetupResponse) String() string { return proto.CompactTextString(m) } +func (*SetupResponse) ProtoMessage() {} +func (*SetupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{1} +} +func (m *SetupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetupResponse.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 *SetupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetupResponse.Merge(m, src) +} +func (m *SetupResponse) XXX_Size() int { + return m.Size() +} +func (m *SetupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SetupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SetupResponse proto.InternalMessageInfo type StartRequest struct { } -func (m *StartRequest) Reset() { *m = StartRequest{} } -func (m *StartRequest) String() string { return proto.CompactTextString(m) } -func (*StartRequest) ProtoMessage() {} -func (*StartRequest) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{2} } +func (m *StartRequest) Reset() { *m = StartRequest{} } +func (m *StartRequest) String() string { return proto.CompactTextString(m) } +func (*StartRequest) ProtoMessage() {} +func (*StartRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{2} +} +func (m *StartRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StartRequest.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 *StartRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_StartRequest.Merge(m, src) +} +func (m *StartRequest) XXX_Size() int { + return m.Size() +} +func (m *StartRequest) XXX_DiscardUnknown() { + xxx_messageInfo_StartRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_StartRequest proto.InternalMessageInfo type StartResponse struct { } -func (m *StartResponse) Reset() { *m = StartResponse{} } -func (m *StartResponse) String() string { return proto.CompactTextString(m) } -func (*StartResponse) ProtoMessage() {} -func (*StartResponse) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{3} } +func (m *StartResponse) Reset() { *m = StartResponse{} } +func (m *StartResponse) String() string { return proto.CompactTextString(m) } +func (*StartResponse) ProtoMessage() {} +func (*StartResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{3} +} +func (m *StartResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StartResponse.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 *StartResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_StartResponse.Merge(m, src) +} +func (m *StartResponse) XXX_Size() int { + return m.Size() +} +func (m *StartResponse) XXX_DiscardUnknown() { + xxx_messageInfo_StartResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_StartResponse proto.InternalMessageInfo type StopRequest struct { } -func (m *StopRequest) Reset() { *m = StopRequest{} } -func (m *StopRequest) String() string { return proto.CompactTextString(m) } -func (*StopRequest) ProtoMessage() {} -func (*StopRequest) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{4} } +func (m *StopRequest) Reset() { *m = StopRequest{} } +func (m *StopRequest) String() string { return proto.CompactTextString(m) } +func (*StopRequest) ProtoMessage() {} +func (*StopRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{4} +} +func (m *StopRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StopRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StopRequest.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 *StopRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_StopRequest.Merge(m, src) +} +func (m *StopRequest) XXX_Size() int { + return m.Size() +} +func (m *StopRequest) XXX_DiscardUnknown() { + xxx_messageInfo_StopRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_StopRequest proto.InternalMessageInfo type StopResponse struct { } -func (m *StopResponse) Reset() { *m = StopResponse{} } -func (m *StopResponse) String() string { return proto.CompactTextString(m) } -func (*StopResponse) ProtoMessage() {} -func (*StopResponse) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{5} } +func (m *StopResponse) Reset() { *m = StopResponse{} } +func (m *StopResponse) String() string { return proto.CompactTextString(m) } +func (*StopResponse) ProtoMessage() {} +func (*StopResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{5} +} +func (m *StopResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StopResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StopResponse.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 *StopResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_StopResponse.Merge(m, src) +} +func (m *StopResponse) XXX_Size() int { + return m.Size() +} +func (m *StopResponse) XXX_DiscardUnknown() { + xxx_messageInfo_StopResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_StopResponse proto.InternalMessageInfo type TeardownRequest struct { } -func (m *TeardownRequest) Reset() { *m = TeardownRequest{} } -func (m *TeardownRequest) String() string { return proto.CompactTextString(m) } -func (*TeardownRequest) ProtoMessage() {} -func (*TeardownRequest) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{6} } +func (m *TeardownRequest) Reset() { *m = TeardownRequest{} } +func (m *TeardownRequest) String() string { return proto.CompactTextString(m) } +func (*TeardownRequest) ProtoMessage() {} +func (*TeardownRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{6} +} +func (m *TeardownRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TeardownRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TeardownRequest.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 *TeardownRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TeardownRequest.Merge(m, src) +} +func (m *TeardownRequest) XXX_Size() int { + return m.Size() +} +func (m *TeardownRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TeardownRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TeardownRequest proto.InternalMessageInfo type TeardownResponse struct { } -func (m *TeardownResponse) Reset() { *m = TeardownResponse{} } -func (m *TeardownResponse) String() string { return proto.CompactTextString(m) } -func (*TeardownResponse) ProtoMessage() {} -func (*TeardownResponse) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{7} } +func (m *TeardownResponse) Reset() { *m = TeardownResponse{} } +func (m *TeardownResponse) String() string { return proto.CompactTextString(m) } +func (*TeardownResponse) ProtoMessage() {} +func (*TeardownResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{7} +} +func (m *TeardownResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TeardownResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TeardownResponse.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 *TeardownResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TeardownResponse.Merge(m, src) +} +func (m *TeardownResponse) XXX_Size() int { + return m.Size() +} +func (m *TeardownResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TeardownResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TeardownResponse proto.InternalMessageInfo // PullFileRequest(s) are used to transfer files from remote agents to the master. type PullFileRequest struct { @@ -258,10 +476,38 @@ type PullFileRequest struct { MaxSize int64 `protobuf:"varint,3,opt,name=max_size,json=maxSize,proto3" json:"max_size,omitempty"` } -func (m *PullFileRequest) Reset() { *m = PullFileRequest{} } -func (m *PullFileRequest) String() string { return proto.CompactTextString(m) } -func (*PullFileRequest) ProtoMessage() {} -func (*PullFileRequest) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{8} } +func (m *PullFileRequest) Reset() { *m = PullFileRequest{} } +func (m *PullFileRequest) String() string { return proto.CompactTextString(m) } +func (*PullFileRequest) ProtoMessage() {} +func (*PullFileRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{8} +} +func (m *PullFileRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PullFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PullFileRequest.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 *PullFileRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullFileRequest.Merge(m, src) +} +func (m *PullFileRequest) XXX_Size() int { + return m.Size() +} +func (m *PullFileRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PullFileRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PullFileRequest proto.InternalMessageInfo func (m *PullFileRequest) GetFileType() PullFileType { if m != nil { @@ -285,14 +531,42 @@ func (m *PullFileRequest) GetMaxSize() int64 { } type PullFileResponse struct { - Data *DataChunk `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` + Data *DataChunk `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` Truncated bool `protobuf:"varint,2,opt,name=truncated,proto3" json:"truncated,omitempty"` } -func (m *PullFileResponse) Reset() { *m = PullFileResponse{} } -func (m *PullFileResponse) String() string { return proto.CompactTextString(m) } -func (*PullFileResponse) ProtoMessage() {} -func (*PullFileResponse) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{9} } +func (m *PullFileResponse) Reset() { *m = PullFileResponse{} } +func (m *PullFileResponse) String() string { return proto.CompactTextString(m) } +func (*PullFileResponse) ProtoMessage() {} +func (*PullFileResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{9} +} +func (m *PullFileResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PullFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PullFileResponse.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 *PullFileResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullFileResponse.Merge(m, src) +} +func (m *PullFileResponse) XXX_Size() int { + return m.Size() +} +func (m *PullFileResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PullFileResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PullFileResponse proto.InternalMessageInfo func (m *PullFileResponse) GetData() *DataChunk { if m != nil { @@ -312,14 +586,42 @@ func (m *PullFileResponse) GetTruncated() bool { type PushFileRequest struct { Type PushFileType `protobuf:"varint,1,opt,name=type,proto3,enum=m3em.PushFileType" json:"type,omitempty"` Overwrite bool `protobuf:"varint,2,opt,name=overwrite,proto3" json:"overwrite,omitempty"` - Data *DataChunk `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"` - TargetPaths []string `protobuf:"bytes,4,rep,name=target_paths,json=targetPaths" json:"target_paths,omitempty"` + Data *DataChunk `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + TargetPaths []string `protobuf:"bytes,4,rep,name=target_paths,json=targetPaths,proto3" json:"target_paths,omitempty"` } -func (m *PushFileRequest) Reset() { *m = PushFileRequest{} } -func (m *PushFileRequest) String() string { return proto.CompactTextString(m) } -func (*PushFileRequest) ProtoMessage() {} -func (*PushFileRequest) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{10} } +func (m *PushFileRequest) Reset() { *m = PushFileRequest{} } +func (m *PushFileRequest) String() string { return proto.CompactTextString(m) } +func (*PushFileRequest) ProtoMessage() {} +func (*PushFileRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{10} +} +func (m *PushFileRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PushFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PushFileRequest.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 *PushFileRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PushFileRequest.Merge(m, src) +} +func (m *PushFileRequest) XXX_Size() int { + return m.Size() +} +func (m *PushFileRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PushFileRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PushFileRequest proto.InternalMessageInfo func (m *PushFileRequest) GetType() PushFileType { if m != nil { @@ -354,10 +656,38 @@ type PushFileResponse struct { NumChunksRecvd int32 `protobuf:"varint,2,opt,name=num_chunks_recvd,json=numChunksRecvd,proto3" json:"num_chunks_recvd,omitempty"` } -func (m *PushFileResponse) Reset() { *m = PushFileResponse{} } -func (m *PushFileResponse) String() string { return proto.CompactTextString(m) } -func (*PushFileResponse) ProtoMessage() {} -func (*PushFileResponse) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{11} } +func (m *PushFileResponse) Reset() { *m = PushFileResponse{} } +func (m *PushFileResponse) String() string { return proto.CompactTextString(m) } +func (*PushFileResponse) ProtoMessage() {} +func (*PushFileResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{11} +} +func (m *PushFileResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PushFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PushFileResponse.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 *PushFileResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PushFileResponse.Merge(m, src) +} +func (m *PushFileResponse) XXX_Size() int { + return m.Size() +} +func (m *PushFileResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PushFileResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PushFileResponse proto.InternalMessageInfo func (m *PushFileResponse) GetFileChecksum() uint32 { if m != nil { @@ -378,10 +708,38 @@ type DataChunk struct { Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` } -func (m *DataChunk) Reset() { *m = DataChunk{} } -func (m *DataChunk) String() string { return proto.CompactTextString(m) } -func (*DataChunk) ProtoMessage() {} -func (*DataChunk) Descriptor() ([]byte, []int) { return fileDescriptorOperator, []int{12} } +func (m *DataChunk) Reset() { *m = DataChunk{} } +func (m *DataChunk) String() string { return proto.CompactTextString(m) } +func (*DataChunk) ProtoMessage() {} +func (*DataChunk) Descriptor() ([]byte, []int) { + return fileDescriptor_73be41c2fcc7ce5e, []int{12} +} +func (m *DataChunk) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DataChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DataChunk.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 *DataChunk) XXX_Merge(src proto.Message) { + xxx_messageInfo_DataChunk.Merge(m, src) +} +func (m *DataChunk) XXX_Size() int { + return m.Size() +} +func (m *DataChunk) XXX_DiscardUnknown() { + xxx_messageInfo_DataChunk.DiscardUnknown(m) +} + +var xxx_messageInfo_DataChunk proto.InternalMessageInfo func (m *DataChunk) GetIdx() int32 { if m != nil { @@ -398,6 +756,9 @@ func (m *DataChunk) GetBytes() []byte { } func init() { + proto.RegisterEnum("m3em.PullFileType", PullFileType_name, PullFileType_value) + proto.RegisterEnum("m3em.PullFileContentType", PullFileContentType_name, PullFileContentType_value) + proto.RegisterEnum("m3em.PushFileType", PushFileType_name, PushFileType_value) proto.RegisterType((*SetupRequest)(nil), "m3em.SetupRequest") proto.RegisterType((*SetupResponse)(nil), "m3em.SetupResponse") proto.RegisterType((*StartRequest)(nil), "m3em.StartRequest") @@ -411,9 +772,68 @@ func init() { proto.RegisterType((*PushFileRequest)(nil), "m3em.PushFileRequest") proto.RegisterType((*PushFileResponse)(nil), "m3em.PushFileResponse") proto.RegisterType((*DataChunk)(nil), "m3em.DataChunk") - proto.RegisterEnum("m3em.PullFileType", PullFileType_name, PullFileType_value) - proto.RegisterEnum("m3em.PullFileContentType", PullFileContentType_name, PullFileContentType_value) - proto.RegisterEnum("m3em.PushFileType", PushFileType_name, PushFileType_value) +} + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/m3em/generated/proto/m3em/operator.proto", fileDescriptor_73be41c2fcc7ce5e) +} + +var fileDescriptor_73be41c2fcc7ce5e = []byte{ + // 850 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0xcf, 0x6f, 0xdb, 0x36, + 0x18, 0x8d, 0xfc, 0xa3, 0xb3, 0xbf, 0xd8, 0x89, 0xc2, 0x6e, 0x81, 0x96, 0xb5, 0x5e, 0xea, 0x02, + 0x83, 0x91, 0xa1, 0x71, 0x11, 0x5f, 0x36, 0xec, 0x30, 0xa4, 0x8e, 0xbd, 0x05, 0x33, 0xec, 0x80, + 0x92, 0x37, 0xf4, 0x24, 0xc8, 0x12, 0x13, 0x0b, 0xb1, 0x7e, 0x4c, 0xa4, 0xda, 0xa4, 0xdb, 0x71, + 0xe7, 0x61, 0xff, 0xc1, 0xfe, 0x9d, 0x1d, 0x8b, 0x9d, 0x76, 0x1c, 0x92, 0x7f, 0xa4, 0x20, 0x29, + 0x4a, 0x8a, 0xd1, 0xe4, 0x66, 0xbe, 0xf7, 0x3e, 0x7e, 0xdf, 0x23, 0xa9, 0x67, 0xf8, 0xfe, 0xc2, + 0x67, 0xcb, 0x74, 0x71, 0xe8, 0x46, 0x41, 0x3f, 0x18, 0x78, 0x8b, 0x7e, 0x30, 0xe8, 0xd3, 0xc4, + 0xed, 0x07, 0x03, 0x12, 0xf4, 0x2f, 0x48, 0x48, 0x12, 0x87, 0x11, 0xaf, 0x1f, 0x27, 0x11, 0x8b, + 0x24, 0x18, 0xc5, 0x1c, 0x8b, 0x92, 0x43, 0x81, 0xa1, 0x1a, 0x07, 0xbb, 0x7f, 0x54, 0xa0, 0x65, + 0x12, 0x96, 0xc6, 0x98, 0xfc, 0x9a, 0x12, 0xca, 0xd0, 0x73, 0x68, 0x53, 0x42, 0xa9, 0x1f, 0x85, + 0x36, 0x8b, 0x2e, 0x49, 0x68, 0x68, 0xfb, 0x5a, 0xaf, 0x89, 0x5b, 0x19, 0x68, 0x71, 0x8c, 0x8b, + 0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f, 0xd0, 0x53, 0x00, 0x77, 0x99, 0x86, 0x97, 0x36, 0xf5, + 0xdf, 0x11, 0x71, 0x13, 0x55, 0xdc, 0x14, 0x88, 0xe9, 0xbf, 0x23, 0xe8, 0x73, 0x68, 0x04, 0xce, + 0x95, 0x24, 0xab, 0x82, 0xfc, 0x24, 0x70, 0xae, 0x38, 0xd5, 0x9d, 0x83, 0x5e, 0x74, 0x97, 0x13, + 0xa1, 0xe7, 0x50, 0xf3, 0x1c, 0xe6, 0x88, 0xce, 0x9b, 0x47, 0xdb, 0xb2, 0xf3, 0x89, 0xc3, 0x9c, + 0x21, 0xdf, 0x11, 0x0b, 0x12, 0x3d, 0x81, 0x26, 0x4b, 0xd2, 0xd0, 0xe5, 0x4f, 0x4c, 0x74, 0x6c, + 0xe0, 0x02, 0xe8, 0xfe, 0xad, 0x71, 0x57, 0x74, 0x59, 0x76, 0xf5, 0x15, 0xd4, 0x3e, 0x66, 0x48, + 0x8a, 0x84, 0x21, 0xc1, 0xf3, 0x9d, 0xa3, 0x37, 0x24, 0x79, 0x9b, 0xf8, 0x8c, 0xa8, 0x9d, 0x73, + 0x20, 0x1f, 0xae, 0xfa, 0xd0, 0x70, 0xcf, 0xa0, 0xc5, 0x9c, 0xe4, 0x82, 0x30, 0x3b, 0x76, 0xd8, + 0x92, 0x1a, 0xb5, 0xfd, 0x6a, 0xaf, 0x89, 0x37, 0x25, 0x76, 0xc6, 0xa1, 0xae, 0xc3, 0x8d, 0xab, + 0x01, 0x73, 0xe3, 0x6d, 0x71, 0xee, 0xee, 0x92, 0xb8, 0x97, 0x34, 0x0d, 0xc4, 0xa8, 0x6d, 0xdc, + 0xe2, 0xe0, 0x30, 0xc3, 0x50, 0x0f, 0xf4, 0x30, 0x0d, 0x6c, 0x71, 0xba, 0xd4, 0x4e, 0x88, 0xfb, + 0x46, 0xfa, 0xaf, 0xe3, 0xad, 0x30, 0x0d, 0xc4, 0x14, 0x14, 0x73, 0xb4, 0x3b, 0x80, 0x66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0x6b, 0x39, 0x26, 0xf7, 0x1e, 0xdf, 0xc1, 0xb2, 0x27, 0xc4, 0x2b, 0x78, 0x48, + 0xe4, 0x15, 0xa5, 0x04, 0xc9, 0x2b, 0xca, 0x29, 0x82, 0x5e, 0x40, 0x8d, 0xc7, 0x06, 0xda, 0x51, + 0x64, 0x9e, 0x28, 0x7b, 0xa8, 0x0c, 0x65, 0xf2, 0x6f, 0xa1, 0xa1, 0x22, 0x04, 0x7d, 0x26, 0xf9, + 0xb5, 0x94, 0xd9, 0xdb, 0x5d, 0x87, 0xb3, 0xd2, 0xef, 0xa0, 0xa1, 0x2e, 0x5a, 0x95, 0xae, 0x25, + 0x8f, 0x2a, 0x5d, 0x8f, 0x84, 0x97, 0x9a, 0x2c, 0x96, 0xf7, 0x54, 0x14, 0xdf, 0xf9, 0xc0, 0x8b, + 0xe2, 0xbb, 0x9f, 0x55, 0x4f, 0x7b, 0x65, 0xfc, 0x73, 0xd3, 0xd1, 0xde, 0xdf, 0x74, 0xb4, 0xff, + 0x6f, 0x3a, 0xda, 0x5f, 0xb7, 0x9d, 0x8d, 0xf7, 0xb7, 0x9d, 0x8d, 0xff, 0x6e, 0x3b, 0x1b, 0x8b, + 0x47, 0xe2, 0x9f, 0x68, 0xf0, 0x21, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x18, 0xe2, 0x3d, 0xcc, 0x06, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -424,8 +844,9 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for Operator service - +// OperatorClient is the client API for Operator service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type OperatorClient interface { Setup(ctx context.Context, in *SetupRequest, opts ...grpc.CallOption) (*SetupResponse, error) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error) @@ -445,7 +866,7 @@ func NewOperatorClient(cc *grpc.ClientConn) OperatorClient { func (c *operatorClient) Setup(ctx context.Context, in *SetupRequest, opts ...grpc.CallOption) (*SetupResponse, error) { out := new(SetupResponse) - err := grpc.Invoke(ctx, "/m3em.Operator/Setup", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/m3em.Operator/Setup", in, out, opts...) if err != nil { return nil, err } @@ -454,7 +875,7 @@ func (c *operatorClient) Setup(ctx context.Context, in *SetupRequest, opts ...gr func (c *operatorClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error) { out := new(StartResponse) - err := grpc.Invoke(ctx, "/m3em.Operator/Start", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/m3em.Operator/Start", in, out, opts...) if err != nil { return nil, err } @@ -463,7 +884,7 @@ func (c *operatorClient) Start(ctx context.Context, in *StartRequest, opts ...gr func (c *operatorClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) { out := new(StopResponse) - err := grpc.Invoke(ctx, "/m3em.Operator/Stop", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/m3em.Operator/Stop", in, out, opts...) if err != nil { return nil, err } @@ -472,7 +893,7 @@ func (c *operatorClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc func (c *operatorClient) Teardown(ctx context.Context, in *TeardownRequest, opts ...grpc.CallOption) (*TeardownResponse, error) { out := new(TeardownResponse) - err := grpc.Invoke(ctx, "/m3em.Operator/Teardown", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/m3em.Operator/Teardown", in, out, opts...) if err != nil { return nil, err } @@ -480,7 +901,7 @@ func (c *operatorClient) Teardown(ctx context.Context, in *TeardownRequest, opts } func (c *operatorClient) PullFile(ctx context.Context, in *PullFileRequest, opts ...grpc.CallOption) (Operator_PullFileClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Operator_serviceDesc.Streams[0], c.cc, "/m3em.Operator/PullFile", opts...) + stream, err := c.cc.NewStream(ctx, &_Operator_serviceDesc.Streams[0], "/m3em.Operator/PullFile", opts...) if err != nil { return nil, err } @@ -512,7 +933,7 @@ func (x *operatorPullFileClient) Recv() (*PullFileResponse, error) { } func (c *operatorClient) PushFile(ctx context.Context, opts ...grpc.CallOption) (Operator_PushFileClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Operator_serviceDesc.Streams[1], c.cc, "/m3em.Operator/PushFile", opts...) + stream, err := c.cc.NewStream(ctx, &_Operator_serviceDesc.Streams[1], "/m3em.Operator/PushFile", opts...) if err != nil { return nil, err } @@ -545,8 +966,7 @@ func (x *operatorPushFileClient) CloseAndRecv() (*PushFileResponse, error) { return m, nil } -// Server API for Operator service - +// OperatorServer is the server API for Operator service. type OperatorServer interface { Setup(context.Context, *SetupRequest) (*SetupResponse, error) Start(context.Context, *StartRequest) (*StartResponse, error) @@ -556,6 +976,29 @@ type OperatorServer interface { PushFile(Operator_PushFileServer) error } +// UnimplementedOperatorServer can be embedded to have forward compatible implementations. +type UnimplementedOperatorServer struct { +} + +func (*UnimplementedOperatorServer) Setup(ctx context.Context, req *SetupRequest) (*SetupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Setup not implemented") +} +func (*UnimplementedOperatorServer) Start(ctx context.Context, req *StartRequest) (*StartResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Start not implemented") +} +func (*UnimplementedOperatorServer) Stop(ctx context.Context, req *StopRequest) (*StopResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") +} +func (*UnimplementedOperatorServer) Teardown(ctx context.Context, req *TeardownRequest) (*TeardownResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Teardown not implemented") +} +func (*UnimplementedOperatorServer) PullFile(req *PullFileRequest, srv Operator_PullFileServer) error { + return status.Errorf(codes.Unimplemented, "method PullFile not implemented") +} +func (*UnimplementedOperatorServer) PushFile(srv Operator_PushFileServer) error { + return status.Errorf(codes.Unimplemented, "method PushFile not implemented") +} + func RegisterOperatorServer(s *grpc.Server, srv OperatorServer) { s.RegisterService(&_Operator_serviceDesc, srv) } @@ -718,7 +1161,7 @@ var _Operator_serviceDesc = grpc.ServiceDesc{ func (m *SetupRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -726,60 +1169,68 @@ func (m *SetupRequest) Marshal() (dAtA []byte, err error) { } func (m *SetupRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.SessionToken) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintOperator(dAtA, i, uint64(len(m.SessionToken))) - i += copy(dAtA[i:], m.SessionToken) + if m.HeartbeatFrequencySecs != 0 { + i = encodeVarintOperator(dAtA, i, uint64(m.HeartbeatFrequencySecs)) + i-- + dAtA[i] = 0x30 } - if len(m.OperatorUuid) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintOperator(dAtA, i, uint64(len(m.OperatorUuid))) - i += copy(dAtA[i:], m.OperatorUuid) + if len(m.HeartbeatEndpoint) > 0 { + i -= len(m.HeartbeatEndpoint) + copy(dAtA[i:], m.HeartbeatEndpoint) + i = encodeVarintOperator(dAtA, i, uint64(len(m.HeartbeatEndpoint))) + i-- + dAtA[i] = 0x2a } - if m.Force { - dAtA[i] = 0x18 - i++ - if m.Force { + if m.HeartbeatEnabled { + i-- + if m.HeartbeatEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ - } - if m.HeartbeatEnabled { + i-- dAtA[i] = 0x20 - i++ - if m.HeartbeatEnabled { + } + if m.Force { + i-- + if m.Force { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 } - if len(m.HeartbeatEndpoint) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintOperator(dAtA, i, uint64(len(m.HeartbeatEndpoint))) - i += copy(dAtA[i:], m.HeartbeatEndpoint) + if len(m.OperatorUuid) > 0 { + i -= len(m.OperatorUuid) + copy(dAtA[i:], m.OperatorUuid) + i = encodeVarintOperator(dAtA, i, uint64(len(m.OperatorUuid))) + i-- + dAtA[i] = 0x12 } - if m.HeartbeatFrequencySecs != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintOperator(dAtA, i, uint64(m.HeartbeatFrequencySecs)) + if len(m.SessionToken) > 0 { + i -= len(m.SessionToken) + copy(dAtA[i:], m.SessionToken) + i = encodeVarintOperator(dAtA, i, uint64(len(m.SessionToken))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *SetupResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -787,17 +1238,22 @@ func (m *SetupResponse) Marshal() (dAtA []byte, err error) { } func (m *SetupResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - return i, nil + return len(dAtA) - i, nil } func (m *StartRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -805,17 +1261,22 @@ func (m *StartRequest) Marshal() (dAtA []byte, err error) { } func (m *StartRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StartRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - return i, nil + return len(dAtA) - i, nil } func (m *StartResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -823,17 +1284,22 @@ func (m *StartResponse) Marshal() (dAtA []byte, err error) { } func (m *StartResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StartResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - return i, nil + return len(dAtA) - i, nil } func (m *StopRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -841,17 +1307,22 @@ func (m *StopRequest) Marshal() (dAtA []byte, err error) { } func (m *StopRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StopRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - return i, nil + return len(dAtA) - i, nil } func (m *StopResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -859,17 +1330,22 @@ func (m *StopResponse) Marshal() (dAtA []byte, err error) { } func (m *StopResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StopResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - return i, nil + return len(dAtA) - i, nil } func (m *TeardownRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -877,17 +1353,22 @@ func (m *TeardownRequest) Marshal() (dAtA []byte, err error) { } func (m *TeardownRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TeardownRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - return i, nil + return len(dAtA) - i, nil } func (m *TeardownResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -895,17 +1376,22 @@ func (m *TeardownResponse) Marshal() (dAtA []byte, err error) { } func (m *TeardownResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TeardownResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - return i, nil + return len(dAtA) - i, nil } func (m *PullFileRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -913,32 +1399,37 @@ func (m *PullFileRequest) Marshal() (dAtA []byte, err error) { } func (m *PullFileRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PullFileRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.FileType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintOperator(dAtA, i, uint64(m.FileType)) + if m.MaxSize != 0 { + i = encodeVarintOperator(dAtA, i, uint64(m.MaxSize)) + i-- + dAtA[i] = 0x18 } if m.ChunkSize != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintOperator(dAtA, i, uint64(m.ChunkSize)) + i-- + dAtA[i] = 0x10 } - if m.MaxSize != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintOperator(dAtA, i, uint64(m.MaxSize)) + if m.FileType != 0 { + i = encodeVarintOperator(dAtA, i, uint64(m.FileType)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *PullFileResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -946,37 +1437,44 @@ func (m *PullFileResponse) Marshal() (dAtA []byte, err error) { } func (m *PullFileResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PullFileResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Data != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintOperator(dAtA, i, uint64(m.Data.Size())) - n1, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } if m.Truncated { - dAtA[i] = 0x10 - i++ + i-- if m.Truncated { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 + } + if m.Data != nil { + { + size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOperator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *PushFileRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -984,57 +1482,58 @@ func (m *PushFileRequest) Marshal() (dAtA []byte, err error) { } func (m *PushFileRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PushFileRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintOperator(dAtA, i, uint64(m.Type)) + if len(m.TargetPaths) > 0 { + for iNdEx := len(m.TargetPaths) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TargetPaths[iNdEx]) + copy(dAtA[i:], m.TargetPaths[iNdEx]) + i = encodeVarintOperator(dAtA, i, uint64(len(m.TargetPaths[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if m.Data != nil { + { + size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOperator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } if m.Overwrite { - dAtA[i] = 0x10 - i++ + i-- if m.Overwrite { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ - } - if m.Data != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintOperator(dAtA, i, uint64(m.Data.Size())) - n2, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 + i-- + dAtA[i] = 0x10 } - if len(m.TargetPaths) > 0 { - for _, s := range m.TargetPaths { - dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } + if m.Type != 0 { + i = encodeVarintOperator(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *PushFileResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1042,27 +1541,32 @@ func (m *PushFileResponse) Marshal() (dAtA []byte, err error) { } func (m *PushFileResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PushFileResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.FileChecksum != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintOperator(dAtA, i, uint64(m.FileChecksum)) - } if m.NumChunksRecvd != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintOperator(dAtA, i, uint64(m.NumChunksRecvd)) + i-- + dAtA[i] = 0x10 + } + if m.FileChecksum != 0 { + i = encodeVarintOperator(dAtA, i, uint64(m.FileChecksum)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *DataChunk) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1070,34 +1574,45 @@ func (m *DataChunk) Marshal() (dAtA []byte, err error) { } func (m *DataChunk) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DataChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Idx != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintOperator(dAtA, i, uint64(m.Idx)) - } if len(m.Bytes) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Bytes) + copy(dAtA[i:], m.Bytes) i = encodeVarintOperator(dAtA, i, uint64(len(m.Bytes))) - i += copy(dAtA[i:], m.Bytes) + i-- + dAtA[i] = 0x12 + } + if m.Idx != 0 { + i = encodeVarintOperator(dAtA, i, uint64(m.Idx)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintOperator(dAtA []byte, offset int, v uint64) int { + offset -= sovOperator(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *SetupRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.SessionToken) @@ -1125,48 +1640,72 @@ func (m *SetupRequest) Size() (n int) { } func (m *SetupResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l return n } func (m *StartRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l return n } func (m *StartResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l return n } func (m *StopRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l return n } func (m *StopResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l return n } func (m *TeardownRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l return n } func (m *TeardownResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l return n } func (m *PullFileRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.FileType != 0 { @@ -1182,6 +1721,9 @@ func (m *PullFileRequest) Size() (n int) { } func (m *PullFileResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Data != nil { @@ -1195,6 +1737,9 @@ func (m *PullFileResponse) Size() (n int) { } func (m *PushFileRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -1217,6 +1762,9 @@ func (m *PushFileRequest) Size() (n int) { } func (m *PushFileResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.FileChecksum != 0 { @@ -1229,6 +1777,9 @@ func (m *PushFileResponse) Size() (n int) { } func (m *DataChunk) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Idx != 0 { @@ -1242,14 +1793,7 @@ func (m *DataChunk) Size() (n int) { } func sovOperator(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozOperator(x uint64) (n int) { return sovOperator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1269,7 +1813,7 @@ func (m *SetupRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1297,7 +1841,7 @@ func (m *SetupRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1307,6 +1851,9 @@ func (m *SetupRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthOperator } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOperator + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1326,7 +1873,7 @@ func (m *SetupRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1336,6 +1883,9 @@ func (m *SetupRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthOperator } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOperator + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1355,7 +1905,7 @@ func (m *SetupRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1375,7 +1925,7 @@ func (m *SetupRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1395,7 +1945,7 @@ func (m *SetupRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1405,6 +1955,9 @@ func (m *SetupRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthOperator } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOperator + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1424,7 +1977,7 @@ func (m *SetupRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HeartbeatFrequencySecs |= (uint32(b) & 0x7F) << shift + m.HeartbeatFrequencySecs |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1435,7 +1988,7 @@ func (m *SetupRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -1465,7 +2018,7 @@ func (m *SetupResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1485,7 +2038,7 @@ func (m *SetupResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -1515,7 +2068,7 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1535,7 +2088,7 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -1565,7 +2118,7 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1585,7 +2138,7 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -1615,7 +2168,7 @@ func (m *StopRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1635,7 +2188,7 @@ func (m *StopRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -1665,7 +2218,7 @@ func (m *StopResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1685,7 +2238,7 @@ func (m *StopResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -1715,7 +2268,7 @@ func (m *TeardownRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1735,7 +2288,7 @@ func (m *TeardownRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -1765,7 +2318,7 @@ func (m *TeardownResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1785,7 +2338,7 @@ func (m *TeardownResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -1815,7 +2368,7 @@ func (m *PullFileRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1843,7 +2396,7 @@ func (m *PullFileRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FileType |= (PullFileType(b) & 0x7F) << shift + m.FileType |= PullFileType(b&0x7F) << shift if b < 0x80 { break } @@ -1862,7 +2415,7 @@ func (m *PullFileRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ChunkSize |= (int64(b) & 0x7F) << shift + m.ChunkSize |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1881,7 +2434,7 @@ func (m *PullFileRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MaxSize |= (int64(b) & 0x7F) << shift + m.MaxSize |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1892,7 +2445,7 @@ func (m *PullFileRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -1922,7 +2475,7 @@ func (m *PullFileResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1950,7 +2503,7 @@ func (m *PullFileResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1959,6 +2512,9 @@ func (m *PullFileResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthOperator } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOperator + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1983,7 +2539,7 @@ func (m *PullFileResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1995,7 +2551,7 @@ func (m *PullFileResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -2025,7 +2581,7 @@ func (m *PushFileRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2053,7 +2609,7 @@ func (m *PushFileRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (PushFileType(b) & 0x7F) << shift + m.Type |= PushFileType(b&0x7F) << shift if b < 0x80 { break } @@ -2072,7 +2628,7 @@ func (m *PushFileRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2092,7 +2648,7 @@ func (m *PushFileRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2101,6 +2657,9 @@ func (m *PushFileRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthOperator } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOperator + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2125,7 +2684,7 @@ func (m *PushFileRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2135,6 +2694,9 @@ func (m *PushFileRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthOperator } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOperator + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2146,7 +2708,7 @@ func (m *PushFileRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -2176,7 +2738,7 @@ func (m *PushFileResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2204,7 +2766,7 @@ func (m *PushFileResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FileChecksum |= (uint32(b) & 0x7F) << shift + m.FileChecksum |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -2223,7 +2785,7 @@ func (m *PushFileResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumChunksRecvd |= (int32(b) & 0x7F) << shift + m.NumChunksRecvd |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -2234,7 +2796,7 @@ func (m *PushFileResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -2264,7 +2826,7 @@ func (m *DataChunk) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2292,7 +2854,7 @@ func (m *DataChunk) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Idx |= (int32(b) & 0x7F) << shift + m.Idx |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -2311,7 +2873,7 @@ func (m *DataChunk) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2320,6 +2882,9 @@ func (m *DataChunk) Unmarshal(dAtA []byte) error { return ErrInvalidLengthOperator } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthOperator + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2334,7 +2899,7 @@ func (m *DataChunk) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOperator } if (iNdEx + skippy) > l { @@ -2352,6 +2917,7 @@ func (m *DataChunk) Unmarshal(dAtA []byte) error { func skipOperator(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2383,10 +2949,8 @@ func skipOperator(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2403,114 +2967,34 @@ func skipOperator(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthOperator } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOperator - } - 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 := skipOperator(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupOperator + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthOperator + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthOperator = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOperator = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthOperator = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOperator = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupOperator = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/m3em/generated/proto/m3em/operator.proto", fileDescriptorOperator) -} - -var fileDescriptorOperator = []byte{ - // 841 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0xdd, 0x6e, 0xe3, 0x44, - 0x18, 0x5d, 0xe7, 0x67, 0x49, 0xbe, 0x26, 0xad, 0x3b, 0x0b, 0x95, 0x29, 0xbb, 0xa1, 0xeb, 0x95, - 0x50, 0x54, 0xb4, 0xcd, 0xaa, 0xb9, 0x01, 0x71, 0x81, 0xba, 0x69, 0x02, 0x15, 0x51, 0x52, 0x8d, - 0x1d, 0xd0, 0x5e, 0x59, 0x8e, 0x3d, 0x6d, 0xac, 0xc6, 0x3f, 0x78, 0xc6, 0xbb, 0xed, 0xc2, 0x25, - 0xd7, 0x88, 0x37, 0xe0, 0x75, 0xb8, 0x44, 0x3c, 0x01, 0x2a, 0x2f, 0x82, 0x66, 0xc6, 0x63, 0xbb, - 0xd1, 0xb6, 0x77, 0x99, 0x73, 0xce, 0x37, 0xdf, 0x77, 0x66, 0xc6, 0x27, 0xf0, 0xed, 0x65, 0xc0, - 0x56, 0xd9, 0xf2, 0xc8, 0x8b, 0xc3, 0x41, 0x38, 0xf4, 0x97, 0x83, 0x70, 0x38, 0xa0, 0xa9, 0x37, - 0x08, 0x87, 0x24, 0x1c, 0x5c, 0x92, 0x88, 0xa4, 0x2e, 0x23, 0xfe, 0x20, 0x49, 0x63, 0x16, 0x4b, - 0x30, 0x4e, 0x38, 0x16, 0xa7, 0x47, 0x02, 0x43, 0x0d, 0x0e, 0x9a, 0xbf, 0xd5, 0xa0, 0x63, 0x11, - 0x96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0xf6, 0x9d, 0x5e, 0x43, 0x4f, 0xc1, 0xd8, 0x90, 0x9c, 0x9e, 0xd8, 0x27, 0x62, - 0xa9, 0xd7, 0x8f, 0xff, 0xa9, 0x41, 0x6b, 0x9e, 0x67, 0x18, 0x7a, 0x05, 0x4d, 0x91, 0x09, 0x28, - 0x7f, 0xad, 0xd5, 0x98, 0xdc, 0x7f, 0x72, 0x07, 0xcb, 0x9f, 0x10, 0xaf, 0xe0, 0x21, 0x51, 0x54, - 0x54, 0x12, 0xa4, 0xa8, 0xa8, 0xa6, 0x08, 0x7a, 0x09, 0x0d, 0x1e, 0x1b, 0x68, 0x57, 0x91, 0x45, - 0xa2, 0xec, 0xa3, 0x2a, 0x94, 0xcb, 0xbf, 0x86, 0x96, 0x8a, 0x10, 0xf4, 0x89, 0xe4, 0x37, 0x52, - 0x66, 0x7f, 0x6f, 0x13, 0xce, 0x4b, 0xbf, 0x81, 0x96, 0xba, 0x68, 0x55, 0xba, 0x91, 0x3c, 0xaa, - 0x74, 0x33, 0x12, 0x5e, 0x69, 0xb2, 0x58, 0xde, 0x53, 0x59, 0x7c, 0xe7, 0x03, 0x2f, 0x8b, 0xef, - 0x7e, 0x56, 0x7d, 0xed, 0xb5, 0xfe, 0xd7, 0x6d, 0x4f, 0xfb, 0xfb, 0xb6, 0xa7, 0xfd, 0x7b, 0xdb, - 0xd3, 0xfe, 0xf8, 0xaf, 0xf7, 0x68, 0xf9, 0x58, 0xfc, 0x03, 0x0d, 0xff, 0x0f, 0x00, 0x00, 0xff, - 0xff, 0x5e, 0x54, 0x4b, 0x61, 0xc4, 0x06, 0x00, 0x00, -} diff --git a/src/m3ninx/generated/proto/fswriter/fswriter.pb.go b/src/m3ninx/generated/proto/fswriter/fswriter.pb.go index 6580b9a990..e7d2afb1fc 100644 --- a/src/m3ninx/generated/proto/fswriter/fswriter.pb.go +++ b/src/m3ninx/generated/proto/fswriter/fswriter.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/m3ninx/generated/proto/fswriter/fswriter.proto -// Copyright (c) 2019 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,23 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package fswriter is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/m3ninx/generated/proto/fswriter/fswriter.proto - - It has these top-level messages: - Metadata - FieldData -*/ package fswriter -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -48,7 +40,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type SegmentType int32 @@ -59,6 +51,7 @@ const ( var SegmentType_name = map[int32]string{ 0: "FST_SEGMENT_TYPE", } + var SegmentType_value = map[string]int32{ "FST_SEGMENT_TYPE": 0, } @@ -66,7 +59,10 @@ var SegmentType_value = map[string]int32{ func (x SegmentType) String() string { return proto.EnumName(SegmentType_name, int32(x)) } -func (SegmentType) EnumDescriptor() ([]byte, []int) { return fileDescriptorFswriter, []int{0} } + +func (SegmentType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_68afd461bbf73d08, []int{0} +} type FSTSegmentFileType int32 @@ -85,6 +81,7 @@ var FSTSegmentFileType_name = map[int32]string{ 3: "FST_TERMS", 4: "FST_FIELDS", } + var FSTSegmentFileType_value = map[string]int32{ "DOCUMENTS_INDEX": 0, "DOCUMENTS_DATA": 1, @@ -96,7 +93,10 @@ var FSTSegmentFileType_value = map[string]int32{ func (x FSTSegmentFileType) String() string { return proto.EnumName(FSTSegmentFileType_name, int32(x)) } -func (FSTSegmentFileType) EnumDescriptor() ([]byte, []int) { return fileDescriptorFswriter, []int{1} } + +func (FSTSegmentFileType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_68afd461bbf73d08, []int{1} +} type PostingsFormat int32 @@ -107,6 +107,7 @@ const ( var PostingsFormat_name = map[int32]string{ 0: "PILOSAV1_POSTINGS_FORMAT", } + var PostingsFormat_value = map[string]int32{ "PILOSAV1_POSTINGS_FORMAT": 0, } @@ -114,17 +115,48 @@ var PostingsFormat_value = map[string]int32{ func (x PostingsFormat) String() string { return proto.EnumName(PostingsFormat_name, int32(x)) } -func (PostingsFormat) EnumDescriptor() ([]byte, []int) { return fileDescriptorFswriter, []int{2} } + +func (PostingsFormat) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_68afd461bbf73d08, []int{2} +} type Metadata struct { PostingsFormat PostingsFormat `protobuf:"varint,1,opt,name=postingsFormat,proto3,enum=fswriter.PostingsFormat" json:"postingsFormat,omitempty"` NumDocs int64 `protobuf:"varint,2,opt,name=numDocs,proto3" json:"numDocs,omitempty"` } -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { return fileDescriptorFswriter, []int{0} } +func (m *Metadata) Reset() { *m = Metadata{} } +func (m *Metadata) String() string { return proto.CompactTextString(m) } +func (*Metadata) ProtoMessage() {} +func (*Metadata) Descriptor() ([]byte, []int) { + return fileDescriptor_68afd461bbf73d08, []int{0} +} +func (m *Metadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metadata.Merge(m, src) +} +func (m *Metadata) XXX_Size() int { + return m.Size() +} +func (m *Metadata) XXX_DiscardUnknown() { + xxx_messageInfo_Metadata.DiscardUnknown(m) +} + +var xxx_messageInfo_Metadata proto.InternalMessageInfo func (m *Metadata) GetPostingsFormat() PostingsFormat { if m != nil { @@ -147,10 +179,38 @@ type FieldData struct { FieldPostingsListOffset uint64 `protobuf:"varint,1,opt,name=fieldPostingsListOffset,proto3" json:"fieldPostingsListOffset,omitempty"` } -func (m *FieldData) Reset() { *m = FieldData{} } -func (m *FieldData) String() string { return proto.CompactTextString(m) } -func (*FieldData) ProtoMessage() {} -func (*FieldData) Descriptor() ([]byte, []int) { return fileDescriptorFswriter, []int{1} } +func (m *FieldData) Reset() { *m = FieldData{} } +func (m *FieldData) String() string { return proto.CompactTextString(m) } +func (*FieldData) ProtoMessage() {} +func (*FieldData) Descriptor() ([]byte, []int) { + return fileDescriptor_68afd461bbf73d08, []int{1} +} +func (m *FieldData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FieldData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FieldData.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 *FieldData) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldData.Merge(m, src) +} +func (m *FieldData) XXX_Size() int { + return m.Size() +} +func (m *FieldData) XXX_DiscardUnknown() { + xxx_messageInfo_FieldData.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldData proto.InternalMessageInfo func (m *FieldData) GetFieldPostingsListOffset() uint64 { if m != nil { @@ -160,16 +220,48 @@ func (m *FieldData) GetFieldPostingsListOffset() uint64 { } func init() { - proto.RegisterType((*Metadata)(nil), "fswriter.Metadata") - proto.RegisterType((*FieldData)(nil), "fswriter.FieldData") proto.RegisterEnum("fswriter.SegmentType", SegmentType_name, SegmentType_value) proto.RegisterEnum("fswriter.FSTSegmentFileType", FSTSegmentFileType_name, FSTSegmentFileType_value) proto.RegisterEnum("fswriter.PostingsFormat", PostingsFormat_name, PostingsFormat_value) + proto.RegisterType((*Metadata)(nil), "fswriter.Metadata") + proto.RegisterType((*FieldData)(nil), "fswriter.FieldData") +} + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/m3ninx/generated/proto/fswriter/fswriter.proto", fileDescriptor_68afd461bbf73d08) } + +var fileDescriptor_68afd461bbf73d08 = []byte{ + // 366 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x8f, 0x9a, 0x40, + 0x18, 0x86, 0x41, 0x4d, 0xab, 0x5f, 0x23, 0xa5, 0xd3, 0x26, 0xe5, 0xd0, 0x10, 0x63, 0x2f, 0xc6, + 0x03, 0xa4, 0xe5, 0xd2, 0x63, 0x69, 0x19, 0x0c, 0x89, 0x08, 0x61, 0xa6, 0xcd, 0xee, 0x89, 0xa0, + 0x0c, 0x2c, 0x89, 0x80, 0x81, 0x31, 0xbb, 0xfb, 0x2f, 0xf6, 0x67, 0xed, 0xd1, 0xe3, 0x1e, 0x37, + 0xfa, 0x47, 0x36, 0xb8, 0xea, 0xc6, 0x4d, 0xf6, 0x36, 0xcf, 0xfb, 0x3d, 0xf3, 0xbd, 0xc9, 0x0c, + 0xe0, 0x34, 0xe3, 0x57, 0xeb, 0xb9, 0xb6, 0x28, 0x73, 0x3d, 0x37, 0xe2, 0xb9, 0x9e, 0x1b, 0x7a, + 0x5d, 0x2d, 0xf4, 0xdc, 0x28, 0xb2, 0xe2, 0x46, 0x4f, 0x59, 0xc1, 0xaa, 0x88, 0xb3, 0x58, 0x5f, + 0x55, 0x25, 0x2f, 0xf5, 0xa4, 0xbe, 0xae, 0x32, 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, 0x40, + 0x3a, 0x7f, 0x18, 0xf4, 0x0d, 0x14, 0xdf, 0x99, 0x7a, 0xc4, 0xfc, 0xff, 0x23, 0x3c, 0x2d, 0xb3, + 0xbd, 0xc0, 0x35, 0xa9, 0x2c, 0xfc, 0x51, 0xee, 0xb7, 0xaa, 0xb8, 0xd9, 0xaa, 0xe2, 0xe3, 0x56, + 0x15, 0xef, 0x76, 0xaa, 0xb0, 0xd9, 0xa9, 0xc2, 0xc3, 0x4e, 0x15, 0xe6, 0xef, 0xf6, 0xff, 0x63, + 0x3c, 0x05, 0x00, 0x00, 0xff, 0xff, 0x20, 0x19, 0xf3, 0x01, 0xe8, 0x01, 0x00, 0x00, +} + func (m *Metadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -177,27 +269,32 @@ func (m *Metadata) Marshal() (dAtA []byte, err error) { } func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.PostingsFormat != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintFswriter(dAtA, i, uint64(m.PostingsFormat)) - } if m.NumDocs != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintFswriter(dAtA, i, uint64(m.NumDocs)) + i-- + dAtA[i] = 0x10 + } + if m.PostingsFormat != 0 { + i = encodeVarintFswriter(dAtA, i, uint64(m.PostingsFormat)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *FieldData) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -205,28 +302,38 @@ func (m *FieldData) Marshal() (dAtA []byte, err error) { } func (m *FieldData) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FieldData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.FieldPostingsListOffset != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintFswriter(dAtA, i, uint64(m.FieldPostingsListOffset)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintFswriter(dAtA []byte, offset int, v uint64) int { + offset -= sovFswriter(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Metadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.PostingsFormat != 0 { @@ -239,6 +346,9 @@ func (m *Metadata) Size() (n int) { } func (m *FieldData) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.FieldPostingsListOffset != 0 { @@ -248,14 +358,7 @@ func (m *FieldData) Size() (n int) { } func sovFswriter(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozFswriter(x uint64) (n int) { return sovFswriter(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -275,7 +378,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -303,7 +406,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PostingsFormat |= (PostingsFormat(b) & 0x7F) << shift + m.PostingsFormat |= PostingsFormat(b&0x7F) << shift if b < 0x80 { break } @@ -322,7 +425,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumDocs |= (int64(b) & 0x7F) << shift + m.NumDocs |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -333,7 +436,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFswriter } if (iNdEx + skippy) > l { @@ -363,7 +466,7 @@ func (m *FieldData) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -391,7 +494,7 @@ func (m *FieldData) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FieldPostingsListOffset |= (uint64(b) & 0x7F) << shift + m.FieldPostingsListOffset |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -402,7 +505,7 @@ func (m *FieldData) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFswriter } if (iNdEx + skippy) > l { @@ -420,6 +523,7 @@ func (m *FieldData) Unmarshal(dAtA []byte) error { func skipFswriter(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -451,10 +555,8 @@ func skipFswriter(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -471,84 +573,34 @@ func skipFswriter(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthFswriter } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFswriter - } - 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 := skipFswriter(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFswriter + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthFswriter + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthFswriter = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFswriter = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthFswriter = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFswriter = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFswriter = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/m3ninx/generated/proto/fswriter/fswriter.proto", fileDescriptorFswriter) -} - -var fileDescriptorFswriter = []byte{ - // 359 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x8a, 0x9b, 0x40, - 0x18, 0xc7, 0x35, 0x09, 0x6d, 0xf2, 0x95, 0xd8, 0xe9, 0xb4, 0x50, 0x0f, 0x45, 0x42, 0x7a, 0x09, - 0x39, 0x28, 0xad, 0x97, 0x1e, 0x6b, 0xeb, 0x18, 0x84, 0x18, 0xc5, 0x99, 0x96, 0xf6, 0x24, 0x26, - 0x8e, 0xae, 0x10, 0x35, 0xe8, 0x84, 0xdd, 0x7d, 0x8b, 0x7d, 0xac, 0x3d, 0xee, 0x23, 0x2c, 0xd9, - 0x17, 0x59, 0xcc, 0x26, 0x59, 0xb2, 0xb0, 0xb7, 0xf9, 0xfd, 0xbf, 0xdf, 0x7c, 0x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 0xc9, 0x3f, 0x24, 0x61, 0x0c, 0xca, 0x73, 0x68, 0x5b, 0xcc, 0x42, 0x32, 0xfe, - 0x00, 0xc3, 0xc0, 0xa7, 0xcc, 0x5d, 0xcc, 0x0e, 0x51, 0x07, 0x0f, 0x61, 0xd0, 0xf6, 0x30, 0x12, - 0x7a, 0x14, 0x75, 0xb1, 0x02, 0xd0, 0xa2, 0xe3, 0x92, 0xb9, 0x4d, 0x51, 0x6f, 0xaa, 0x83, 0x72, - 0xfe, 0x30, 0xf8, 0x0b, 0xa8, 0x81, 0x3b, 0xf7, 0xa9, 0xf5, 0xf7, 0x5b, 0x74, 0x5a, 0xe6, 0xf8, - 0xa1, 0x67, 0x31, 0x24, 0xfd, 0x42, 0xb7, 0x3b, 0x4d, 0xbe, 0xdb, 0x69, 0xf2, 0xfd, 0x4e, 0x93, - 0x6f, 0x1e, 0x34, 0x69, 0xf9, 0x66, 0xff, 0x2f, 0xe6, 0x63, 0x00, 0x00, 0x00, 0xff, 0xff, 0x71, - 0xec, 0x67, 0x32, 0xe0, 0x01, 0x00, 0x00, -} diff --git a/src/m3ninx/generated/proto/querypb/query.pb.go b/src/m3ninx/generated/proto/querypb/query.pb.go index b234cd4e8d..049247af0a 100644 --- a/src/m3ninx/generated/proto/querypb/query.pb.go +++ b/src/m3ninx/generated/proto/querypb/query.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/m3ninx/generated/proto/querypb/query.proto -// Copyright (c) 2019 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,29 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package querypb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/m3ninx/generated/proto/querypb/query.proto - - It has these top-level messages: - FieldQuery - TermQuery - RegexpQuery - NegationQuery - ConjunctionQuery - DisjunctionQuery - AllQuery - Query -*/ package querypb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -54,16 +40,44 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type FieldQuery struct { Field []byte `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` } -func (m *FieldQuery) Reset() { *m = FieldQuery{} } -func (m *FieldQuery) String() string { return proto.CompactTextString(m) } -func (*FieldQuery) ProtoMessage() {} -func (*FieldQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{0} } +func (m *FieldQuery) Reset() { *m = FieldQuery{} } +func (m *FieldQuery) String() string { return proto.CompactTextString(m) } +func (*FieldQuery) ProtoMessage() {} +func (*FieldQuery) Descriptor() ([]byte, []int) { + return fileDescriptor_a0057d6187b27ff7, []int{0} +} +func (m *FieldQuery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FieldQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FieldQuery.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 *FieldQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldQuery.Merge(m, src) +} +func (m *FieldQuery) XXX_Size() int { + return m.Size() +} +func (m *FieldQuery) XXX_DiscardUnknown() { + xxx_messageInfo_FieldQuery.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldQuery proto.InternalMessageInfo func (m *FieldQuery) GetField() []byte { if m != nil { @@ -77,10 +91,38 @@ type TermQuery struct { Term []byte `protobuf:"bytes,2,opt,name=term,proto3" json:"term,omitempty"` } -func (m *TermQuery) Reset() { *m = TermQuery{} } -func (m *TermQuery) String() string { return proto.CompactTextString(m) } -func (*TermQuery) ProtoMessage() {} -func (*TermQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{1} } +func (m *TermQuery) Reset() { *m = TermQuery{} } +func (m *TermQuery) String() string { return proto.CompactTextString(m) } +func (*TermQuery) ProtoMessage() {} +func (*TermQuery) Descriptor() ([]byte, []int) { + return fileDescriptor_a0057d6187b27ff7, []int{1} +} +func (m *TermQuery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TermQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TermQuery.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 *TermQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_TermQuery.Merge(m, src) +} +func (m *TermQuery) XXX_Size() int { + return m.Size() +} +func (m *TermQuery) XXX_DiscardUnknown() { + xxx_messageInfo_TermQuery.DiscardUnknown(m) +} + +var xxx_messageInfo_TermQuery proto.InternalMessageInfo func (m *TermQuery) GetField() []byte { if m != nil { @@ -101,10 +143,38 @@ type RegexpQuery struct { Regexp []byte `protobuf:"bytes,2,opt,name=regexp,proto3" json:"regexp,omitempty"` } -func (m *RegexpQuery) Reset() { *m = RegexpQuery{} } -func (m *RegexpQuery) String() string { return proto.CompactTextString(m) } -func (*RegexpQuery) ProtoMessage() {} -func (*RegexpQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{2} } +func (m *RegexpQuery) Reset() { *m = RegexpQuery{} } +func (m *RegexpQuery) String() string { return proto.CompactTextString(m) } +func (*RegexpQuery) ProtoMessage() {} +func (*RegexpQuery) Descriptor() ([]byte, []int) { + return fileDescriptor_a0057d6187b27ff7, []int{2} +} +func (m *RegexpQuery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RegexpQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RegexpQuery.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 *RegexpQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegexpQuery.Merge(m, src) +} +func (m *RegexpQuery) XXX_Size() int { + return m.Size() +} +func (m *RegexpQuery) XXX_DiscardUnknown() { + xxx_messageInfo_RegexpQuery.DiscardUnknown(m) +} + +var xxx_messageInfo_RegexpQuery proto.InternalMessageInfo func (m *RegexpQuery) GetField() []byte { if m != nil { @@ -121,13 +191,41 @@ func (m *RegexpQuery) GetRegexp() []byte { } type NegationQuery struct { - Query *Query `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"` + Query *Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` +} + +func (m *NegationQuery) Reset() { *m = NegationQuery{} } +func (m *NegationQuery) String() string { return proto.CompactTextString(m) } +func (*NegationQuery) ProtoMessage() {} +func (*NegationQuery) Descriptor() ([]byte, []int) { + return fileDescriptor_a0057d6187b27ff7, []int{3} +} +func (m *NegationQuery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NegationQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NegationQuery.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 *NegationQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_NegationQuery.Merge(m, src) +} +func (m *NegationQuery) XXX_Size() int { + return m.Size() +} +func (m *NegationQuery) XXX_DiscardUnknown() { + xxx_messageInfo_NegationQuery.DiscardUnknown(m) } -func (m *NegationQuery) Reset() { *m = NegationQuery{} } -func (m *NegationQuery) String() string { return proto.CompactTextString(m) } -func (*NegationQuery) ProtoMessage() {} -func (*NegationQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{3} } +var xxx_messageInfo_NegationQuery proto.InternalMessageInfo func (m *NegationQuery) GetQuery() *Query { if m != nil { @@ -137,13 +235,41 @@ func (m *NegationQuery) GetQuery() *Query { } type ConjunctionQuery struct { - Queries []*Query `protobuf:"bytes,1,rep,name=queries" json:"queries,omitempty"` + Queries []*Query `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"` +} + +func (m *ConjunctionQuery) Reset() { *m = ConjunctionQuery{} } +func (m *ConjunctionQuery) String() string { return proto.CompactTextString(m) } +func (*ConjunctionQuery) ProtoMessage() {} +func (*ConjunctionQuery) Descriptor() ([]byte, []int) { + return fileDescriptor_a0057d6187b27ff7, []int{4} +} +func (m *ConjunctionQuery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConjunctionQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConjunctionQuery.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 *ConjunctionQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConjunctionQuery.Merge(m, src) +} +func (m *ConjunctionQuery) XXX_Size() int { + return m.Size() +} +func (m *ConjunctionQuery) XXX_DiscardUnknown() { + xxx_messageInfo_ConjunctionQuery.DiscardUnknown(m) } -func (m *ConjunctionQuery) Reset() { *m = ConjunctionQuery{} } -func (m *ConjunctionQuery) String() string { return proto.CompactTextString(m) } -func (*ConjunctionQuery) ProtoMessage() {} -func (*ConjunctionQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{4} } +var xxx_messageInfo_ConjunctionQuery proto.InternalMessageInfo func (m *ConjunctionQuery) GetQueries() []*Query { if m != nil { @@ -153,13 +279,41 @@ func (m *ConjunctionQuery) GetQueries() []*Query { } type DisjunctionQuery struct { - Queries []*Query `protobuf:"bytes,1,rep,name=queries" json:"queries,omitempty"` + Queries []*Query `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"` +} + +func (m *DisjunctionQuery) Reset() { *m = DisjunctionQuery{} } +func (m *DisjunctionQuery) String() string { return proto.CompactTextString(m) } +func (*DisjunctionQuery) ProtoMessage() {} +func (*DisjunctionQuery) Descriptor() ([]byte, []int) { + return fileDescriptor_a0057d6187b27ff7, []int{5} +} +func (m *DisjunctionQuery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DisjunctionQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DisjunctionQuery.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 *DisjunctionQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_DisjunctionQuery.Merge(m, src) +} +func (m *DisjunctionQuery) XXX_Size() int { + return m.Size() +} +func (m *DisjunctionQuery) XXX_DiscardUnknown() { + xxx_messageInfo_DisjunctionQuery.DiscardUnknown(m) } -func (m *DisjunctionQuery) Reset() { *m = DisjunctionQuery{} } -func (m *DisjunctionQuery) String() string { return proto.CompactTextString(m) } -func (*DisjunctionQuery) ProtoMessage() {} -func (*DisjunctionQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{5} } +var xxx_messageInfo_DisjunctionQuery proto.InternalMessageInfo func (m *DisjunctionQuery) GetQueries() []*Query { if m != nil { @@ -171,13 +325,42 @@ func (m *DisjunctionQuery) GetQueries() []*Query { type AllQuery struct { } -func (m *AllQuery) Reset() { *m = AllQuery{} } -func (m *AllQuery) String() string { return proto.CompactTextString(m) } -func (*AllQuery) ProtoMessage() {} -func (*AllQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{6} } +func (m *AllQuery) Reset() { *m = AllQuery{} } +func (m *AllQuery) String() string { return proto.CompactTextString(m) } +func (*AllQuery) ProtoMessage() {} +func (*AllQuery) Descriptor() ([]byte, []int) { + return fileDescriptor_a0057d6187b27ff7, []int{6} +} +func (m *AllQuery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllQuery.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 *AllQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllQuery.Merge(m, src) +} +func (m *AllQuery) XXX_Size() int { + return m.Size() +} +func (m *AllQuery) XXX_DiscardUnknown() { + xxx_messageInfo_AllQuery.DiscardUnknown(m) +} + +var xxx_messageInfo_AllQuery proto.InternalMessageInfo type Query struct { // Types that are valid to be assigned to Query: + // // *Query_Term // *Query_Regexp // *Query_Negation @@ -188,10 +371,38 @@ type Query struct { Query isQuery_Query `protobuf_oneof:"query"` } -func (m *Query) Reset() { *m = Query{} } -func (m *Query) String() string { return proto.CompactTextString(m) } -func (*Query) ProtoMessage() {} -func (*Query) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{7} } +func (m *Query) Reset() { *m = Query{} } +func (m *Query) String() string { return proto.CompactTextString(m) } +func (*Query) ProtoMessage() {} +func (*Query) Descriptor() ([]byte, []int) { + return fileDescriptor_a0057d6187b27ff7, []int{7} +} +func (m *Query) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Query.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 *Query) XXX_Merge(src proto.Message) { + xxx_messageInfo_Query.Merge(m, src) +} +func (m *Query) XXX_Size() int { + return m.Size() +} +func (m *Query) XXX_DiscardUnknown() { + xxx_messageInfo_Query.DiscardUnknown(m) +} + +var xxx_messageInfo_Query proto.InternalMessageInfo type isQuery_Query interface { isQuery_Query() @@ -200,25 +411,25 @@ type isQuery_Query interface { } type Query_Term struct { - Term *TermQuery `protobuf:"bytes,1,opt,name=term,oneof"` + Term *TermQuery `protobuf:"bytes,1,opt,name=term,proto3,oneof" json:"term,omitempty"` } type Query_Regexp struct { - Regexp *RegexpQuery `protobuf:"bytes,2,opt,name=regexp,oneof"` + Regexp *RegexpQuery `protobuf:"bytes,2,opt,name=regexp,proto3,oneof" json:"regexp,omitempty"` } type Query_Negation struct { - Negation *NegationQuery `protobuf:"bytes,3,opt,name=negation,oneof"` + Negation *NegationQuery `protobuf:"bytes,3,opt,name=negation,proto3,oneof" json:"negation,omitempty"` } type Query_Conjunction struct { - Conjunction *ConjunctionQuery `protobuf:"bytes,4,opt,name=conjunction,oneof"` + Conjunction *ConjunctionQuery `protobuf:"bytes,4,opt,name=conjunction,proto3,oneof" json:"conjunction,omitempty"` } type Query_Disjunction struct { - Disjunction *DisjunctionQuery `protobuf:"bytes,5,opt,name=disjunction,oneof"` + Disjunction *DisjunctionQuery `protobuf:"bytes,5,opt,name=disjunction,proto3,oneof" json:"disjunction,omitempty"` } type Query_All struct { - All *AllQuery `protobuf:"bytes,6,opt,name=all,oneof"` + All *AllQuery `protobuf:"bytes,6,opt,name=all,proto3,oneof" json:"all,omitempty"` } type Query_Field struct { - Field *FieldQuery `protobuf:"bytes,7,opt,name=field,oneof"` + Field *FieldQuery `protobuf:"bytes,7,opt,name=field,proto3,oneof" json:"field,omitempty"` } func (*Query_Term) isQuery_Query() {} @@ -285,9 +496,9 @@ func (m *Query) GetField() *FieldQuery { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Query) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Query_OneofMarshaler, _Query_OneofUnmarshaler, _Query_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Query) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*Query_Term)(nil), (*Query_Regexp)(nil), (*Query_Negation)(nil), @@ -298,162 +509,6 @@ func (*Query) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, } } -func _Query_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Query) - // query - switch x := m.Query.(type) { - case *Query_Term: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Term); err != nil { - return err - } - case *Query_Regexp: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Regexp); err != nil { - return err - } - case *Query_Negation: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Negation); err != nil { - return err - } - case *Query_Conjunction: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Conjunction); err != nil { - return err - } - case *Query_Disjunction: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Disjunction); err != nil { - return err - } - case *Query_All: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.All); err != nil { - return err - } - case *Query_Field: - _ = b.EncodeVarint(7<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Field); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Query.Query has unexpected type %T", x) - } - return nil -} - -func _Query_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Query) - switch tag { - case 1: // query.term - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TermQuery) - err := b.DecodeMessage(msg) - m.Query = &Query_Term{msg} - return true, err - case 2: // query.regexp - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RegexpQuery) - err := b.DecodeMessage(msg) - m.Query = &Query_Regexp{msg} - return true, err - case 3: // query.negation - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(NegationQuery) - err := b.DecodeMessage(msg) - m.Query = &Query_Negation{msg} - return true, err - case 4: // query.conjunction - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ConjunctionQuery) - err := b.DecodeMessage(msg) - m.Query = &Query_Conjunction{msg} - return true, err - case 5: // query.disjunction - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(DisjunctionQuery) - err := b.DecodeMessage(msg) - m.Query = &Query_Disjunction{msg} - return true, err - case 6: // query.all - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(AllQuery) - err := b.DecodeMessage(msg) - m.Query = &Query_All{msg} - return true, err - case 7: // query.field - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(FieldQuery) - err := b.DecodeMessage(msg) - m.Query = &Query_Field{msg} - return true, err - default: - return false, nil - } -} - -func _Query_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Query) - // query - switch x := m.Query.(type) { - case *Query_Term: - s := proto.Size(x.Term) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Query_Regexp: - s := proto.Size(x.Regexp) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Query_Negation: - s := proto.Size(x.Negation) - n += proto.SizeVarint(3<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Query_Conjunction: - s := proto.Size(x.Conjunction) - n += proto.SizeVarint(4<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Query_Disjunction: - s := proto.Size(x.Disjunction) - n += proto.SizeVarint(5<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Query_All: - s := proto.Size(x.All) - n += proto.SizeVarint(6<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Query_Field: - s := proto.Size(x.Field) - n += proto.SizeVarint(7<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - func init() { proto.RegisterType((*FieldQuery)(nil), "query.FieldQuery") proto.RegisterType((*TermQuery)(nil), "query.TermQuery") @@ -464,10 +519,44 @@ func init() { proto.RegisterType((*AllQuery)(nil), "query.AllQuery") proto.RegisterType((*Query)(nil), "query.Query") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/m3ninx/generated/proto/querypb/query.proto", fileDescriptor_a0057d6187b27ff7) +} + +var fileDescriptor_a0057d6187b27ff7 = []byte{ + // 395 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xcb, 0x4a, 0xc3, 0x40, + 0x14, 0x86, 0x27, 0x6d, 0xd3, 0xd4, 0x93, 0x8a, 0x75, 0x28, 0x9a, 0x55, 0xa8, 0x11, 0x44, 0x41, + 0x1a, 0x68, 0x70, 0x63, 0x57, 0xad, 0x22, 0x59, 0x09, 0x06, 0x57, 0xee, 0x9a, 0x64, 0x8c, 0x91, + 0x5c, 0x6a, 0x9a, 0x42, 0x7d, 0x0b, 0x1f, 0xcb, 0x65, 0x97, 0x2e, 0xa5, 0xf5, 0x41, 0x64, 0x2e, + 0x69, 0xda, 0x0a, 0x5d, 0xb8, 0x4a, 0xce, 0x9c, 0xff, 0x83, 0x99, 0x8f, 0x1f, 0x06, 0x41, 0x98, + 0xbf, 0x4c, 0xdd, 0xae, 0x97, 0xc6, 0x66, 0x6c, 0xf9, 0xae, 0x19, 0x5b, 0xe6, 0x24, 0xf3, 0xcc, + 0xd8, 0x4a, 0xc2, 0x64, 0x66, 0x06, 0x24, 0x21, 0xd9, 0x28, 0x27, 0xbe, 0x39, 0xce, 0xd2, 0x3c, + 0x35, 0xdf, 0xa6, 0x24, 0x7b, 0x1f, 0xbb, 0xfc, 0xdb, 0x65, 0x67, 0x58, 0x66, 0x83, 0x61, 0x00, + 0xdc, 0x85, 0x24, 0xf2, 0x1f, 0xe8, 0x84, 0xdb, 0x20, 0x3f, 0xd3, 0x49, 0x93, 0x3a, 0xd2, 0x79, + 0xd3, 0xe1, 0x83, 0x71, 0x05, 0x7b, 0x8f, 0x24, 0x8b, 0x77, 0x44, 0x30, 0x86, 0x5a, 0x4e, 0xb2, + 0x58, 0xab, 0xb0, 0x43, 0xf6, 0x6f, 0xf4, 0x41, 0x75, 0x48, 0x40, 0x66, 0xe3, 0x5d, 0xe0, 0x11, + 0xd4, 0x33, 0x16, 0x12, 0xa8, 0x98, 0x0c, 0x0b, 0xf6, 0xef, 0x49, 0x30, 0xca, 0xc3, 0x34, 0xe1, + 0xb8, 0x01, 0xfc, 0xc6, 0x0c, 0x57, 0x7b, 0xcd, 0x2e, 0x7f, 0x0c, 0x5b, 0x3a, 0xe2, 0x31, 0xd7, + 0xd0, 0xba, 0x49, 0x93, 0xd7, 0x69, 0xe2, 0x95, 0xdc, 0x19, 0x28, 0x74, 0x19, 0x92, 0x89, 0x26, + 0x75, 0xaa, 0x7f, 0xc8, 0x62, 0x49, 0xd9, 0xdb, 0x70, 0xf2, 0x3f, 0x16, 0xa0, 0x31, 0x88, 0x22, + 0x76, 0x68, 0xfc, 0x54, 0x40, 0x2e, 0x68, 0xee, 0x84, 0x5f, 0xb8, 0x25, 0xd0, 0x95, 0x49, 0x1b, + 0x71, 0x4f, 0xf8, 0x72, 0x43, 0x81, 0xda, 0xc3, 0x22, 0xb9, 0x26, 0xcf, 0x46, 0x85, 0x18, 0xdc, + 0x83, 0x46, 0x22, 0xc4, 0x68, 0x55, 0x96, 0x6f, 0x8b, 0xfc, 0x86, 0x2f, 0x1b, 0x39, 0xab, 0x1c, + 0xee, 0x83, 0xea, 0x95, 0x5e, 0xb4, 0x1a, 0xc3, 0x8e, 0x05, 0xb6, 0x6d, 0xcc, 0x46, 0xce, 0x7a, + 0x9a, 0xc2, 0x7e, 0x29, 0x46, 0x93, 0x37, 0xe0, 0x6d, 0x65, 0x14, 0x5e, 0x4b, 0xe3, 0x53, 0xa8, + 0x8e, 0xa2, 0x48, 0xab, 0x33, 0xe8, 0x40, 0x40, 0x85, 0x2b, 0x1b, 0x39, 0x74, 0x8b, 0x2f, 0x8a, + 0x66, 0x28, 0x2c, 0x76, 0x28, 0x62, 0x65, 0x2f, 0x6d, 0x24, 0xea, 0x32, 0x54, 0x44, 0x0b, 0x86, + 0x27, 0x9f, 0x0b, 0x5d, 0x9a, 0x2f, 0x74, 0xe9, 0x7b, 0xa1, 0x4b, 0x1f, 0x4b, 0x1d, 0xcd, 0x97, + 0x3a, 0xfa, 0x5a, 0xea, 0xe8, 0x49, 0x11, 0x6d, 0x77, 0xeb, 0xac, 0xe8, 0xd6, 0x6f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xbb, 0xd0, 0xff, 0x83, 0x2d, 0x03, 0x00, 0x00, +} + func (m *FieldQuery) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -475,23 +564,29 @@ func (m *FieldQuery) Marshal() (dAtA []byte, err error) { } func (m *FieldQuery) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FieldQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Field) > 0 { - dAtA[i] = 0xa - i++ + i -= len(m.Field) + copy(dAtA[i:], m.Field) i = encodeVarintQuery(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *TermQuery) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -499,29 +594,36 @@ func (m *TermQuery) Marshal() (dAtA []byte, err error) { } func (m *TermQuery) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TermQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Field) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) - } if len(m.Term) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Term) + copy(dAtA[i:], m.Term) i = encodeVarintQuery(dAtA, i, uint64(len(m.Term))) - i += copy(dAtA[i:], m.Term) + i-- + dAtA[i] = 0x12 + } + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *RegexpQuery) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -529,29 +631,36 @@ func (m *RegexpQuery) Marshal() (dAtA []byte, err error) { } func (m *RegexpQuery) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RegexpQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Field) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) - } if len(m.Regexp) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Regexp) + copy(dAtA[i:], m.Regexp) i = encodeVarintQuery(dAtA, i, uint64(len(m.Regexp))) - i += copy(dAtA[i:], m.Regexp) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *NegationQuery) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -559,27 +668,34 @@ func (m *NegationQuery) Marshal() (dAtA []byte, err error) { } func (m *NegationQuery) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NegationQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Query != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Query.Size())) - n1, err := m.Query.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Query.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n1 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ConjunctionQuery) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -587,29 +703,36 @@ func (m *ConjunctionQuery) Marshal() (dAtA []byte, err error) { } func (m *ConjunctionQuery) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConjunctionQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Queries) > 0 { - for _, msg := range m.Queries { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Queries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *DisjunctionQuery) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -617,29 +740,36 @@ func (m *DisjunctionQuery) Marshal() (dAtA []byte, err error) { } func (m *DisjunctionQuery) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DisjunctionQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Queries) > 0 { - for _, msg := range m.Queries { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Queries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *AllQuery) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -647,17 +777,22 @@ func (m *AllQuery) Marshal() (dAtA []byte, err error) { } func (m *AllQuery) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AllQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - return i, nil + return len(dAtA) - i, nil } func (m *Query) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -665,128 +800,189 @@ func (m *Query) Marshal() (dAtA []byte, err error) { } func (m *Query) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Query) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Query != nil { - nn2, err := m.Query.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.Query.Size() + i -= size + if _, err := m.Query.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i += nn2 } - return i, nil + return len(dAtA) - i, nil } func (m *Query_Term) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Query_Term) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Term != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Term.Size())) - n3, err := m.Term.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Term.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Query_Regexp) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Query_Regexp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Regexp != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Regexp.Size())) - n4, err := m.Regexp.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Regexp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n4 + i-- + dAtA[i] = 0x12 } - return i, nil + return len(dAtA) - i, nil } func (m *Query_Negation) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Query_Negation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Negation != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Negation.Size())) - n5, err := m.Negation.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Negation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0x1a } - return i, nil + return len(dAtA) - i, nil } func (m *Query_Conjunction) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Query_Conjunction) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Conjunction != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Conjunction.Size())) - n6, err := m.Conjunction.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Conjunction.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n6 + i-- + dAtA[i] = 0x22 } - return i, nil + return len(dAtA) - i, nil } func (m *Query_Disjunction) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Query_Disjunction) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Disjunction != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Disjunction.Size())) - n7, err := m.Disjunction.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Disjunction.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n7 + i-- + dAtA[i] = 0x2a } - return i, nil + return len(dAtA) - i, nil } func (m *Query_All) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Query_All) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.All != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.All.Size())) - n8, err := m.All.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.All.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n8 + i-- + dAtA[i] = 0x32 } - return i, nil + return len(dAtA) - i, nil } func (m *Query_Field) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Query_Field) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Field != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Field.Size())) - n9, err := m.Field.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Field.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n9 + i-- + dAtA[i] = 0x3a } - return i, nil + return len(dAtA) - i, nil } func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *FieldQuery) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Field) @@ -797,6 +993,9 @@ func (m *FieldQuery) Size() (n int) { } func (m *TermQuery) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Field) @@ -811,6 +1010,9 @@ func (m *TermQuery) Size() (n int) { } func (m *RegexpQuery) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Field) @@ -825,6 +1027,9 @@ func (m *RegexpQuery) Size() (n int) { } func (m *NegationQuery) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Query != nil { @@ -835,6 +1040,9 @@ func (m *NegationQuery) Size() (n int) { } func (m *ConjunctionQuery) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Queries) > 0 { @@ -847,6 +1055,9 @@ func (m *ConjunctionQuery) Size() (n int) { } func (m *DisjunctionQuery) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Queries) > 0 { @@ -859,12 +1070,18 @@ func (m *DisjunctionQuery) Size() (n int) { } func (m *AllQuery) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l return n } func (m *Query) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Query != nil { @@ -874,6 +1091,9 @@ func (m *Query) Size() (n int) { } func (m *Query_Term) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Term != nil { @@ -883,6 +1103,9 @@ func (m *Query_Term) Size() (n int) { return n } func (m *Query_Regexp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Regexp != nil { @@ -892,6 +1115,9 @@ func (m *Query_Regexp) Size() (n int) { return n } func (m *Query_Negation) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Negation != nil { @@ -901,6 +1127,9 @@ func (m *Query_Negation) Size() (n int) { return n } func (m *Query_Conjunction) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Conjunction != nil { @@ -910,6 +1139,9 @@ func (m *Query_Conjunction) Size() (n int) { return n } func (m *Query_Disjunction) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Disjunction != nil { @@ -919,6 +1151,9 @@ func (m *Query_Disjunction) Size() (n int) { return n } func (m *Query_All) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.All != nil { @@ -928,6 +1163,9 @@ func (m *Query_All) Size() (n int) { return n } func (m *Query_Field) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Field != nil { @@ -938,14 +1176,7 @@ func (m *Query_Field) Size() (n int) { } func sovQuery(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -965,7 +1196,7 @@ func (m *FieldQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -993,7 +1224,7 @@ func (m *FieldQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1002,6 +1233,9 @@ func (m *FieldQuery) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1016,7 +1250,7 @@ func (m *FieldQuery) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1046,7 +1280,7 @@ func (m *TermQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1074,7 +1308,7 @@ func (m *TermQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1083,6 +1317,9 @@ func (m *TermQuery) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1105,7 +1342,7 @@ func (m *TermQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1114,6 +1351,9 @@ func (m *TermQuery) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1128,7 +1368,7 @@ func (m *TermQuery) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1158,7 +1398,7 @@ func (m *RegexpQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1186,7 +1426,7 @@ func (m *RegexpQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1195,6 +1435,9 @@ func (m *RegexpQuery) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1217,7 +1460,7 @@ func (m *RegexpQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1226,6 +1469,9 @@ func (m *RegexpQuery) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1240,7 +1486,7 @@ func (m *RegexpQuery) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1270,7 +1516,7 @@ func (m *NegationQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1298,7 +1544,7 @@ func (m *NegationQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1307,6 +1553,9 @@ func (m *NegationQuery) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1323,7 +1572,7 @@ func (m *NegationQuery) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1353,7 +1602,7 @@ func (m *ConjunctionQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1381,7 +1630,7 @@ func (m *ConjunctionQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1390,6 +1639,9 @@ func (m *ConjunctionQuery) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1404,7 +1656,7 @@ func (m *ConjunctionQuery) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1434,7 +1686,7 @@ func (m *DisjunctionQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1462,7 +1714,7 @@ func (m *DisjunctionQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1471,6 +1723,9 @@ func (m *DisjunctionQuery) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1485,7 +1740,7 @@ func (m *DisjunctionQuery) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1515,7 +1770,7 @@ func (m *AllQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1535,7 +1790,7 @@ func (m *AllQuery) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1565,7 +1820,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1593,7 +1848,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1602,6 +1857,9 @@ func (m *Query) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1625,7 +1883,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1634,6 +1892,9 @@ func (m *Query) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1657,7 +1918,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1666,6 +1927,9 @@ func (m *Query) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1689,7 +1953,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1698,6 +1962,9 @@ func (m *Query) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1721,7 +1988,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1730,6 +1997,9 @@ func (m *Query) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1753,7 +2023,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1762,6 +2032,9 @@ func (m *Query) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1785,7 +2058,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1794,6 +2067,9 @@ func (m *Query) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1809,7 +2085,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -1827,6 +2103,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1858,10 +2135,8 @@ func skipQuery(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1878,86 +2153,34 @@ func skipQuery(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthQuery } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - 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 := skipQuery(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/m3ninx/generated/proto/querypb/query.proto", fileDescriptorQuery) -} - -var fileDescriptorQuery = []byte{ - // 389 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08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0x07, - 0x5d, 0xb6, 0x3c, 0x68, 0xf2, 0x82, 0xbb, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x4a, 0xb7, - 0x71, 0x25, 0x03, 0x00, 0x00, -} diff --git a/src/m3ninx/index/segment/builder/fields_map_new.go b/src/m3ninx/index/segment/builder/fields_map_new.go index 62e734a9b4..5c66b7905e 100644 --- a/src/m3ninx/index/segment/builder/fields_map_new.go +++ b/src/m3ninx/index/segment/builder/fields_map_new.go @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -27,9 +27,9 @@ package builder import ( "bytes" - "github.com/m3db/m3/src/x/pool" - "github.com/cespare/xxhash/v2" + + "github.com/m3db/m3/src/x/pool" ) // Copyright (c) 2018 Uber Technologies, Inc. diff --git a/src/m3ninx/index/segment/builder/ids_map_new.go b/src/m3ninx/index/segment/builder/ids_map_new.go index b7aef4dcbc..2cffa6d384 100644 --- a/src/m3ninx/index/segment/builder/ids_map_new.go +++ b/src/m3ninx/index/segment/builder/ids_map_new.go @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -27,9 +27,9 @@ package builder import ( "bytes" - "github.com/m3db/m3/src/x/pool" - "github.com/cespare/xxhash/v2" + + "github.com/m3db/m3/src/x/pool" ) // Copyright (c) 2018 Uber Technologies, Inc. diff --git a/src/m3ninx/index/segment/builder/postings_map_new.go b/src/m3ninx/index/segment/builder/postings_map_new.go index 34c0788082..79702d1ea2 100644 --- a/src/m3ninx/index/segment/builder/postings_map_new.go +++ b/src/m3ninx/index/segment/builder/postings_map_new.go @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -27,9 +27,9 @@ package builder import ( "bytes" - "github.com/m3db/m3/src/x/pool" - "github.com/cespare/xxhash/v2" + + "github.com/m3db/m3/src/x/pool" ) // Copyright (c) 2018 Uber Technologies, Inc. diff --git a/src/m3ninx/index/segment/mem/fields_map_new.go b/src/m3ninx/index/segment/mem/fields_map_new.go index 1a253a0b76..4edf5da22e 100644 --- a/src/m3ninx/index/segment/mem/fields_map_new.go +++ b/src/m3ninx/index/segment/mem/fields_map_new.go @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -27,9 +27,9 @@ package mem import ( "bytes" - "github.com/m3db/m3/src/x/pool" - "github.com/cespare/xxhash/v2" + + "github.com/m3db/m3/src/x/pool" ) // Copyright (c) 2018 Uber Technologies, Inc. diff --git a/src/m3ninx/search/proptest/query_gen.go b/src/m3ninx/search/proptest/query_gen.go index 5ff81a682a..ed3c06e13e 100644 --- a/src/m3ninx/search/proptest/query_gen.go +++ b/src/m3ninx/search/proptest/query_gen.go @@ -24,12 +24,12 @@ import ( "bytes" "reflect" - "github.com/leanovate/gopter" - "github.com/leanovate/gopter/gen" - "github.com/m3db/m3/src/m3ninx/doc" "github.com/m3db/m3/src/m3ninx/search" "github.com/m3db/m3/src/m3ninx/search/query" + + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" ) // GenAllQuery generates an all query. diff --git a/src/m3ninx/search/proptest/segment_gen.go b/src/m3ninx/search/proptest/segment_gen.go index af970d2124..2b62319c6f 100644 --- a/src/m3ninx/search/proptest/segment_gen.go +++ b/src/m3ninx/search/proptest/segment_gen.go @@ -25,14 +25,14 @@ import ( "math/rand" "testing" - "github.com/leanovate/gopter" - "github.com/leanovate/gopter/gen" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/m3ninx/doc" "github.com/m3db/m3/src/m3ninx/index/segment" "github.com/m3db/m3/src/m3ninx/index/segment/fst" "github.com/m3db/m3/src/m3ninx/index/segment/mem" + + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/stretchr/testify/require" ) var ( diff --git a/src/metrics/generated/proto/aggregationpb/aggregation.pb.go b/src/metrics/generated/proto/aggregationpb/aggregation.pb.go index 4cd53dd643..91f38a94ec 100644 --- a/src/metrics/generated/proto/aggregationpb/aggregation.pb.go +++ b/src/metrics/generated/proto/aggregationpb/aggregation.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/metrics/generated/proto/aggregationpb/aggregation.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,22 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* -Package aggregationpb is a generated protocol buffer package. - -It is generated from these files: - github.com/m3db/m3/src/metrics/generated/proto/aggregationpb/aggregation.proto - -It has these top-level messages: - AggregationID -*/ package aggregationpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -47,7 +40,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type AggregationType int32 @@ -106,6 +99,7 @@ var AggregationType_name = map[int32]string{ 23: "P25", 24: "P75", } + var AggregationType_value = map[string]int32{ "UNKNOWN": 0, "LAST": 1, @@ -137,7 +131,10 @@ var AggregationType_value = map[string]int32{ func (x AggregationType) String() string { return proto.EnumName(AggregationType_name, int32(x)) } -func (AggregationType) EnumDescriptor() ([]byte, []int) { return fileDescriptorAggregation, []int{0} } + +func (AggregationType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_bc4f7e3740a4217f, []int{0} +} // AggregationID is a unique identifier uniquely identifying // one or more aggregation types. @@ -145,10 +142,38 @@ type AggregationID struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } -func (m *AggregationID) Reset() { *m = AggregationID{} } -func (m *AggregationID) String() string { return proto.CompactTextString(m) } -func (*AggregationID) ProtoMessage() {} -func (*AggregationID) Descriptor() ([]byte, []int) { return fileDescriptorAggregation, []int{0} } +func (m *AggregationID) Reset() { *m = AggregationID{} } +func (m *AggregationID) String() string { return proto.CompactTextString(m) } +func (*AggregationID) ProtoMessage() {} +func (*AggregationID) Descriptor() ([]byte, []int) { + return fileDescriptor_bc4f7e3740a4217f, []int{0} +} +func (m *AggregationID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AggregationID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AggregationID.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 *AggregationID) XXX_Merge(src proto.Message) { + xxx_messageInfo_AggregationID.Merge(m, src) +} +func (m *AggregationID) XXX_Size() int { + return m.Size() +} +func (m *AggregationID) XXX_DiscardUnknown() { + xxx_messageInfo_AggregationID.DiscardUnknown(m) +} + +var xxx_messageInfo_AggregationID proto.InternalMessageInfo func (m *AggregationID) GetId() uint64 { if m != nil { @@ -158,13 +183,43 @@ func (m *AggregationID) GetId() uint64 { } func init() { - proto.RegisterType((*AggregationID)(nil), "aggregationpb.AggregationID") proto.RegisterEnum("aggregationpb.AggregationType", AggregationType_name, AggregationType_value) + proto.RegisterType((*AggregationID)(nil), "aggregationpb.AggregationID") +} + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/aggregationpb/aggregation.proto", fileDescriptor_bc4f7e3740a4217f) } + +var fileDescriptor_bc4f7e3740a4217f = []byte{ + // 336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0xd1, 0x3d, 0x4f, 0xc2, 0x40, + 0x18, 0x07, 0xf0, 0xb6, 0xbc, 0x1f, 0x02, 0x8f, 0xe7, 0x1b, 0x53, 0x35, 0x4e, 0xc6, 0x81, 0x3b, + 0xad, 0x55, 0x9b, 0xb8, 0x54, 0x61, 0x20, 0xda, 0x03, 0x6d, 0x8b, 0xc6, 0x8d, 0xd2, 0xa6, 0x76, + 0x28, 0x25, 0xa5, 0x0e, 0xee, 0x7e, 0x00, 0x3f, 0x96, 0x23, 0xa3, 0xa3, 0x81, 0x2f, 0x62, 0xee, + 0x3a, 0x88, 0xb3, 0xdb, 0xef, 0x9e, 0xff, 0x3f, 0xf7, 0x5c, 0x72, 0x88, 0x85, 0x51, 0xf6, 0xf2, + 0xea, 0x75, 0x26, 0x49, 0x4c, 0x62, 0xcd, 0xf7, 0x48, 0xac, 0x91, 0x79, 0x3a, 0x21, 0x71, 0x90, + 0xa5, 0xd1, 0x64, 0x4e, 0xc2, 0x60, 0x1a, 0xa4, 0xe3, 0x2c, 0xf0, 0xc9, 0x2c, 0x4d, 0xb2, 0x84, + 0x8c, 0xc3, 0x30, 0x0d, 0xc2, 0x71, 0x16, 0x25, 0xd3, 0x99, 0xb7, 0x7e, 0xea, 0x88, 0x1c, 0x37, + 0xfe, 0x14, 0x0e, 0xf7, 0x51, 0xc3, 0xfc, 0x1d, 0xf4, 0xbb, 0xb8, 0x89, 0x94, 0xc8, 0x6f, 0xcb, + 0x07, 0xf2, 0x51, 0xf1, 0x41, 0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e7, 0x01, 0x00, 0x00, +} + func (m *AggregationID) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -172,28 +227,38 @@ func (m *AggregationID) Marshal() (dAtA []byte, err error) { } func (m *AggregationID) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AggregationID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Id != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintAggregation(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintAggregation(dAtA []byte, offset int, v uint64) int { + offset -= sovAggregation(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *AggregationID) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Id != 0 { @@ -203,14 +268,7 @@ func (m *AggregationID) Size() (n int) { } func sovAggregation(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozAggregation(x uint64) (n int) { return sovAggregation(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -230,7 +288,7 @@ func (m *AggregationID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -258,7 +316,7 @@ func (m *AggregationID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= (uint64(b) & 0x7F) << shift + m.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -269,7 +327,7 @@ func (m *AggregationID) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAggregation } if (iNdEx + skippy) > l { @@ -287,6 +345,7 @@ func (m *AggregationID) Unmarshal(dAtA []byte) error { func skipAggregation(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -318,10 +377,8 @@ func skipAggregation(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -338,82 +395,34 @@ func skipAggregation(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthAggregation } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAggregation - } - 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 := skipAggregation(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAggregation + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthAggregation + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthAggregation = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAggregation = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthAggregation = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAggregation = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAggregation = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/aggregationpb/aggregation.proto", fileDescriptorAggregation) -} - -var fileDescriptorAggregation = []byte{ - // 328 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0xd1, 0xbb, 0x4e, 0xc3, 0x30, - 0x14, 0x06, 0xe0, 0x26, 0xbd, 0xbb, 0xb4, 0x3d, 0x98, 0x5b, 0xa7, 0x80, 0x98, 0x10, 0x43, 0x6d, - 0x08, 0x01, 0x22, 0xb1, 0x04, 0xda, 0xa1, 0x82, 0xb8, 0x85, 0x24, 0x80, 0xd8, 0x9a, 0xc6, 0x0a, - 0x19, 0xd2, 0x54, 0x69, 0x18, 0xd8, 0x79, 0x00, 0x1e, 0x8b, 0x91, 0x47, 0x40, 0xe1, 0x45, 0x90, - 0x9d, 0x81, 0x32, 0xb3, 0x7d, 0x3e, 0xff, 0x2f, 0x1f, 0x4b, 0x46, 0x2c, 0x8c, 0xb2, 0xe7, 0x17, - 0xbf, 0x3f, 0x4b, 0x62, 0x12, 0xeb, 0x81, 0x4f, 0x62, 0x9d, 0x2c, 0xd3, 0x19, 0x89, 0x79, 0x96, - 0x46, 0xb3, 0x25, 0x09, 0xf9, 0x9c, 0xa7, 0xd3, 0x8c, 0x07, 0x64, 0x91, 0x26, 0x59, 0x42, 0xa6, - 0x61, 0x98, 0xf2, 0x70, 0x9a, 0x45, 0xc9, 0x7c, 0xe1, 0xaf, 0x9e, 0xfa, 0x32, 0xc7, 0xed, 0x3f, - 0x85, 0xfd, 0x5d, 0xd4, 0xb6, 0x7e, 0x07, 0xa3, 0x01, 0xee, 0x20, 0x35, 0x0a, 0x7a, 0xca, 0x9e, - 0x72, 0x50, 0xb9, 0x53, 0xa3, 0xe0, 0xf0, 0x4d, 0x45, 0xdd, 0x95, 0x86, 0xfb, 0xba, 0xe0, 0xb8, - 0x85, 0xea, 0x1e, 0xbb, 0x66, 0xe3, 0x07, 0x06, 0x25, 0xdc, 0x40, 0x95, 0x1b, 0xcb, 0x71, 0x41, - 0xc1, 0x75, 0x54, 0xb6, 0x47, 0x0c, 0x54, 0x09, 0xeb, 0x11, 0xca, 0x22, 0xb3, 0x87, 0x16, 0x83, - 0x0a, 0x46, 0xa8, 0x66, 0x0f, 0x07, 0x23, 0x8b, 0x41, 0x15, 0x37, 0x51, 0xf5, 0x6a, 0xec, 0x31, - 0x17, 0x6a, 0xa2, 0xe9, 0x78, 0x36, 0xd4, 0xc5, 0xcc, 0xf1, 0x6c, 0xe7, 0x16, 0x1a, 0x92, 0xee, - 0x60, 0x78, 0x0f, 0x4d, 0x11, 0x4f, 0x8e, 0x28, 0x20, 0x89, 0x63, 0x0a, 0x2d, 0x09, 0x9d, 0xc2, - 0x9a, 0xc4, 0x09, 0x85, 0xb6, 0x84, 0x41, 0xa1, 0x23, 0x71, 0x4a, 0xa1, 0x2b, 0x71, 0x46, 0x01, - 0x24, 0xce, 0x29, 0xac, 0x4b, 0x98, 0x14, 0x70, 0x01, 0x03, 0x36, 0x0a, 0x98, 0xb0, 0x29, 0x9e, - 0x38, 0x31, 0x4d, 0x13, 0xb6, 0xc4, 0x5e, 0x21, 0x13, 0xb6, 0x8b, 0x75, 0x06, 0xec, 0x14, 0x57, - 0x19, 0xd0, 0xbb, 0x64, 0x1f, 0xb9, 0xa6, 0x7c, 0xe6, 0x9a, 0xf2, 0x95, 0x6b, 0xca, 0xfb, 0xb7, - 0x56, 0x7a, 0xba, 0xf8, 0xcf, 0xc7, 0xf8, 0x35, 0x39, 0xd4, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, - 0xe6, 0x7e, 0xf0, 0xe7, 0xdf, 0x01, 0x00, 0x00, -} diff --git a/src/metrics/generated/proto/metricpb/composite.pb.go b/src/metrics/generated/proto/metricpb/composite.pb.go index e364a562f3..87464c836a 100644 --- a/src/metrics/generated/proto/metricpb/composite.pb.go +++ b/src/metrics/generated/proto/metricpb/composite.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/metrics/generated/proto/metricpb/composite.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,46 +21,17 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package metricpb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/metrics/generated/proto/metricpb/composite.proto - github.com/m3db/m3/src/metrics/generated/proto/metricpb/metadata.proto - github.com/m3db/m3/src/metrics/generated/proto/metricpb/metric.proto - - It has these top-level messages: - CounterWithMetadatas - BatchTimerWithMetadatas - GaugeWithMetadatas - ForwardedMetricWithMetadata - TimedMetricWithMetadata - TimedMetricWithMetadatas - TimedMetricWithStoragePolicy - AggregatedMetric - MetricWithMetadatas - PipelineMetadata - Metadata - StagedMetadata - StagedMetadatas - ForwardMetadata - TimedMetadata - Counter - BatchTimer - Gauge - TimedMetric - ForwardedMetric - Tag -*/ package metricpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import policypb "github.com/m3db/m3/src/metrics/generated/proto/policypb" - -import io "io" +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + policypb "github.com/m3db/m3/src/metrics/generated/proto/policypb" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -71,7 +42,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MetricWithMetadatas_Type int32 @@ -96,6 +67,7 @@ var MetricWithMetadatas_Type_name = map[int32]string{ 6: "TIMED_METRIC_WITH_METADATAS", 7: "TIMED_METRIC_WITH_STORAGE_POLICY", } + var MetricWithMetadatas_Type_value = map[string]int32{ "UNKNOWN": 0, "COUNTER_WITH_METADATAS": 1, @@ -110,19 +82,48 @@ var MetricWithMetadatas_Type_value = map[string]int32{ func (x MetricWithMetadatas_Type) String() string { return proto.EnumName(MetricWithMetadatas_Type_name, int32(x)) } + func (MetricWithMetadatas_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptorComposite, []int{8, 0} + return fileDescriptor_dfde9d6b40175f89, []int{8, 0} } type CounterWithMetadatas struct { - Counter Counter `protobuf:"bytes,1,opt,name=counter" json:"counter"` - Metadatas StagedMetadatas `protobuf:"bytes,2,opt,name=metadatas" json:"metadatas"` + Counter Counter `protobuf:"bytes,1,opt,name=counter,proto3" json:"counter"` + Metadatas StagedMetadatas `protobuf:"bytes,2,opt,name=metadatas,proto3" json:"metadatas"` +} + +func (m *CounterWithMetadatas) Reset() { *m = CounterWithMetadatas{} } +func (m *CounterWithMetadatas) String() string { return proto.CompactTextString(m) } +func (*CounterWithMetadatas) ProtoMessage() {} +func (*CounterWithMetadatas) Descriptor() ([]byte, []int) { + return fileDescriptor_dfde9d6b40175f89, []int{0} +} +func (m *CounterWithMetadatas) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CounterWithMetadatas) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CounterWithMetadatas.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 *CounterWithMetadatas) XXX_Merge(src proto.Message) { + xxx_messageInfo_CounterWithMetadatas.Merge(m, src) +} +func (m *CounterWithMetadatas) XXX_Size() int { + return m.Size() +} +func (m *CounterWithMetadatas) XXX_DiscardUnknown() { + xxx_messageInfo_CounterWithMetadatas.DiscardUnknown(m) } -func (m *CounterWithMetadatas) Reset() { *m = CounterWithMetadatas{} } -func (m *CounterWithMetadatas) String() string { return proto.CompactTextString(m) } -func (*CounterWithMetadatas) ProtoMessage() {} -func (*CounterWithMetadatas) Descriptor() ([]byte, []int) { return fileDescriptorComposite, []int{0} } +var xxx_messageInfo_CounterWithMetadatas proto.InternalMessageInfo func (m *CounterWithMetadatas) GetCounter() Counter { if m != nil { @@ -139,14 +140,42 @@ func (m *CounterWithMetadatas) GetMetadatas() StagedMetadatas { } type BatchTimerWithMetadatas struct { - BatchTimer BatchTimer `protobuf:"bytes,1,opt,name=batch_timer,json=batchTimer" json:"batch_timer"` - Metadatas StagedMetadatas `protobuf:"bytes,2,opt,name=metadatas" json:"metadatas"` + BatchTimer BatchTimer `protobuf:"bytes,1,opt,name=batch_timer,json=batchTimer,proto3" json:"batch_timer"` + Metadatas StagedMetadatas `protobuf:"bytes,2,opt,name=metadatas,proto3" json:"metadatas"` +} + +func (m *BatchTimerWithMetadatas) Reset() { *m = BatchTimerWithMetadatas{} } +func (m *BatchTimerWithMetadatas) String() string { return proto.CompactTextString(m) } +func (*BatchTimerWithMetadatas) ProtoMessage() {} +func (*BatchTimerWithMetadatas) Descriptor() ([]byte, []int) { + return fileDescriptor_dfde9d6b40175f89, []int{1} +} +func (m *BatchTimerWithMetadatas) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchTimerWithMetadatas) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchTimerWithMetadatas.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 *BatchTimerWithMetadatas) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchTimerWithMetadatas.Merge(m, src) +} +func (m *BatchTimerWithMetadatas) XXX_Size() int { + return m.Size() +} +func (m *BatchTimerWithMetadatas) XXX_DiscardUnknown() { + xxx_messageInfo_BatchTimerWithMetadatas.DiscardUnknown(m) } -func (m *BatchTimerWithMetadatas) Reset() { *m = BatchTimerWithMetadatas{} } -func (m *BatchTimerWithMetadatas) String() string { return proto.CompactTextString(m) } -func (*BatchTimerWithMetadatas) ProtoMessage() {} -func (*BatchTimerWithMetadatas) Descriptor() ([]byte, []int) { return fileDescriptorComposite, []int{1} } +var xxx_messageInfo_BatchTimerWithMetadatas proto.InternalMessageInfo func (m *BatchTimerWithMetadatas) GetBatchTimer() BatchTimer { if m != nil { @@ -163,14 +192,42 @@ func (m *BatchTimerWithMetadatas) GetMetadatas() StagedMetadatas { } type GaugeWithMetadatas struct { - Gauge Gauge `protobuf:"bytes,1,opt,name=gauge" json:"gauge"` - Metadatas StagedMetadatas `protobuf:"bytes,2,opt,name=metadatas" json:"metadatas"` + Gauge Gauge `protobuf:"bytes,1,opt,name=gauge,proto3" json:"gauge"` + Metadatas StagedMetadatas `protobuf:"bytes,2,opt,name=metadatas,proto3" json:"metadatas"` +} + +func (m *GaugeWithMetadatas) Reset() { *m = GaugeWithMetadatas{} } +func (m *GaugeWithMetadatas) String() string { return proto.CompactTextString(m) } +func (*GaugeWithMetadatas) ProtoMessage() {} +func (*GaugeWithMetadatas) Descriptor() ([]byte, []int) { + return fileDescriptor_dfde9d6b40175f89, []int{2} +} +func (m *GaugeWithMetadatas) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GaugeWithMetadatas) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GaugeWithMetadatas.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 *GaugeWithMetadatas) XXX_Merge(src proto.Message) { + xxx_messageInfo_GaugeWithMetadatas.Merge(m, src) +} +func (m *GaugeWithMetadatas) XXX_Size() int { + return m.Size() +} +func (m *GaugeWithMetadatas) XXX_DiscardUnknown() { + xxx_messageInfo_GaugeWithMetadatas.DiscardUnknown(m) } -func (m *GaugeWithMetadatas) Reset() { *m = GaugeWithMetadatas{} } -func (m *GaugeWithMetadatas) String() string { return proto.CompactTextString(m) } -func (*GaugeWithMetadatas) ProtoMessage() {} -func (*GaugeWithMetadatas) Descriptor() ([]byte, []int) { return fileDescriptorComposite, []int{2} } +var xxx_messageInfo_GaugeWithMetadatas proto.InternalMessageInfo func (m *GaugeWithMetadatas) GetGauge() Gauge { if m != nil { @@ -187,17 +244,43 @@ func (m *GaugeWithMetadatas) GetMetadatas() StagedMetadatas { } type ForwardedMetricWithMetadata struct { - Metric ForwardedMetric `protobuf:"bytes,1,opt,name=metric" json:"metric"` - Metadata ForwardMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata"` + Metric ForwardedMetric `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric"` + Metadata ForwardMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata"` } func (m *ForwardedMetricWithMetadata) Reset() { *m = ForwardedMetricWithMetadata{} } func (m *ForwardedMetricWithMetadata) String() string { return proto.CompactTextString(m) } func (*ForwardedMetricWithMetadata) ProtoMessage() {} func (*ForwardedMetricWithMetadata) Descriptor() ([]byte, []int) { - return fileDescriptorComposite, []int{3} + return fileDescriptor_dfde9d6b40175f89, []int{3} +} +func (m *ForwardedMetricWithMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ForwardedMetricWithMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ForwardedMetricWithMetadata.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 *ForwardedMetricWithMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_ForwardedMetricWithMetadata.Merge(m, src) +} +func (m *ForwardedMetricWithMetadata) XXX_Size() int { + return m.Size() +} +func (m *ForwardedMetricWithMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_ForwardedMetricWithMetadata.DiscardUnknown(m) } +var xxx_messageInfo_ForwardedMetricWithMetadata proto.InternalMessageInfo + func (m *ForwardedMetricWithMetadata) GetMetric() ForwardedMetric { if m != nil { return m.Metric @@ -213,14 +296,42 @@ func (m *ForwardedMetricWithMetadata) GetMetadata() ForwardMetadata { } type TimedMetricWithMetadata struct { - Metric TimedMetric `protobuf:"bytes,1,opt,name=metric" json:"metric"` - Metadata TimedMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata"` + Metric TimedMetric `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric"` + Metadata TimedMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata"` } -func (m *TimedMetricWithMetadata) Reset() { *m = TimedMetricWithMetadata{} } -func (m *TimedMetricWithMetadata) String() string { return proto.CompactTextString(m) } -func (*TimedMetricWithMetadata) ProtoMessage() {} -func (*TimedMetricWithMetadata) Descriptor() ([]byte, []int) { return fileDescriptorComposite, []int{4} } +func (m *TimedMetricWithMetadata) Reset() { *m = TimedMetricWithMetadata{} } +func (m *TimedMetricWithMetadata) String() string { return proto.CompactTextString(m) } +func (*TimedMetricWithMetadata) ProtoMessage() {} +func (*TimedMetricWithMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_dfde9d6b40175f89, []int{4} +} +func (m *TimedMetricWithMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TimedMetricWithMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TimedMetricWithMetadata.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 *TimedMetricWithMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimedMetricWithMetadata.Merge(m, src) +} +func (m *TimedMetricWithMetadata) XXX_Size() int { + return m.Size() +} +func (m *TimedMetricWithMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_TimedMetricWithMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_TimedMetricWithMetadata proto.InternalMessageInfo func (m *TimedMetricWithMetadata) GetMetric() TimedMetric { if m != nil { @@ -237,17 +348,43 @@ func (m *TimedMetricWithMetadata) GetMetadata() TimedMetadata { } type TimedMetricWithMetadatas struct { - Metric TimedMetric `protobuf:"bytes,1,opt,name=metric" json:"metric"` - Metadatas StagedMetadatas `protobuf:"bytes,2,opt,name=metadatas" json:"metadatas"` + Metric TimedMetric `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric"` + Metadatas StagedMetadatas `protobuf:"bytes,2,opt,name=metadatas,proto3" json:"metadatas"` } func (m *TimedMetricWithMetadatas) Reset() { *m = TimedMetricWithMetadatas{} } func (m *TimedMetricWithMetadatas) String() string { return proto.CompactTextString(m) } func (*TimedMetricWithMetadatas) ProtoMessage() {} func (*TimedMetricWithMetadatas) Descriptor() ([]byte, []int) { - return fileDescriptorComposite, []int{5} + return fileDescriptor_dfde9d6b40175f89, []int{5} +} +func (m *TimedMetricWithMetadatas) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TimedMetricWithMetadatas) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TimedMetricWithMetadatas.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 *TimedMetricWithMetadatas) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimedMetricWithMetadatas.Merge(m, src) +} +func (m *TimedMetricWithMetadatas) XXX_Size() int { + return m.Size() +} +func (m *TimedMetricWithMetadatas) XXX_DiscardUnknown() { + xxx_messageInfo_TimedMetricWithMetadatas.DiscardUnknown(m) } +var xxx_messageInfo_TimedMetricWithMetadatas proto.InternalMessageInfo + func (m *TimedMetricWithMetadatas) GetMetric() TimedMetric { if m != nil { return m.Metric @@ -263,16 +400,42 @@ func (m *TimedMetricWithMetadatas) GetMetadatas() StagedMetadatas { } type TimedMetricWithStoragePolicy struct { - TimedMetric TimedMetric `protobuf:"bytes,1,opt,name=timed_metric,json=timedMetric" json:"timed_metric"` - StoragePolicy policypb.StoragePolicy `protobuf:"bytes,2,opt,name=storage_policy,json=storagePolicy" json:"storage_policy"` + TimedMetric TimedMetric `protobuf:"bytes,1,opt,name=timed_metric,json=timedMetric,proto3" json:"timed_metric"` + StoragePolicy policypb.StoragePolicy `protobuf:"bytes,2,opt,name=storage_policy,json=storagePolicy,proto3" json:"storage_policy"` } func (m *TimedMetricWithStoragePolicy) Reset() { *m = TimedMetricWithStoragePolicy{} } func (m *TimedMetricWithStoragePolicy) String() string { return proto.CompactTextString(m) } func (*TimedMetricWithStoragePolicy) ProtoMessage() {} func (*TimedMetricWithStoragePolicy) Descriptor() ([]byte, []int) { - return fileDescriptorComposite, []int{6} + return fileDescriptor_dfde9d6b40175f89, []int{6} +} +func (m *TimedMetricWithStoragePolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } +func (m *TimedMetricWithStoragePolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TimedMetricWithStoragePolicy.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 *TimedMetricWithStoragePolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimedMetricWithStoragePolicy.Merge(m, src) +} +func (m *TimedMetricWithStoragePolicy) XXX_Size() int { + return m.Size() +} +func (m *TimedMetricWithStoragePolicy) XXX_DiscardUnknown() { + xxx_messageInfo_TimedMetricWithStoragePolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_TimedMetricWithStoragePolicy proto.InternalMessageInfo func (m *TimedMetricWithStoragePolicy) GetTimedMetric() TimedMetric { if m != nil { @@ -289,14 +452,42 @@ func (m *TimedMetricWithStoragePolicy) GetStoragePolicy() policypb.StoragePolicy } type AggregatedMetric struct { - Metric TimedMetricWithStoragePolicy `protobuf:"bytes,1,opt,name=metric" json:"metric"` + Metric TimedMetricWithStoragePolicy `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric"` EncodeNanos int64 `protobuf:"varint,2,opt,name=encode_nanos,json=encodeNanos,proto3" json:"encode_nanos,omitempty"` } -func (m *AggregatedMetric) Reset() { *m = AggregatedMetric{} } -func (m *AggregatedMetric) String() string { return proto.CompactTextString(m) } -func (*AggregatedMetric) ProtoMessage() {} -func (*AggregatedMetric) Descriptor() ([]byte, []int) { return fileDescriptorComposite, []int{7} } +func (m *AggregatedMetric) Reset() { *m = AggregatedMetric{} } +func (m *AggregatedMetric) String() string { return proto.CompactTextString(m) } +func (*AggregatedMetric) ProtoMessage() {} +func (*AggregatedMetric) Descriptor() ([]byte, []int) { + return fileDescriptor_dfde9d6b40175f89, []int{7} +} +func (m *AggregatedMetric) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AggregatedMetric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AggregatedMetric.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 *AggregatedMetric) XXX_Merge(src proto.Message) { + xxx_messageInfo_AggregatedMetric.Merge(m, src) +} +func (m *AggregatedMetric) XXX_Size() int { + return m.Size() +} +func (m *AggregatedMetric) XXX_DiscardUnknown() { + xxx_messageInfo_AggregatedMetric.DiscardUnknown(m) +} + +var xxx_messageInfo_AggregatedMetric proto.InternalMessageInfo func (m *AggregatedMetric) GetMetric() TimedMetricWithStoragePolicy { if m != nil { @@ -320,19 +511,47 @@ func (m *AggregatedMetric) GetEncodeNanos() int64 { // and decoding high volume traffic. type MetricWithMetadatas struct { Type MetricWithMetadatas_Type `protobuf:"varint,1,opt,name=type,proto3,enum=metricpb.MetricWithMetadatas_Type" json:"type,omitempty"` - CounterWithMetadatas *CounterWithMetadatas `protobuf:"bytes,2,opt,name=counter_with_metadatas,json=counterWithMetadatas" json:"counter_with_metadatas,omitempty"` - BatchTimerWithMetadatas *BatchTimerWithMetadatas `protobuf:"bytes,3,opt,name=batch_timer_with_metadatas,json=batchTimerWithMetadatas" json:"batch_timer_with_metadatas,omitempty"` - GaugeWithMetadatas *GaugeWithMetadatas `protobuf:"bytes,4,opt,name=gauge_with_metadatas,json=gaugeWithMetadatas" json:"gauge_with_metadatas,omitempty"` - ForwardedMetricWithMetadata *ForwardedMetricWithMetadata `protobuf:"bytes,5,opt,name=forwarded_metric_with_metadata,json=forwardedMetricWithMetadata" json:"forwarded_metric_with_metadata,omitempty"` - TimedMetricWithMetadata *TimedMetricWithMetadata `protobuf:"bytes,6,opt,name=timed_metric_with_metadata,json=timedMetricWithMetadata" json:"timed_metric_with_metadata,omitempty"` - TimedMetricWithMetadatas *TimedMetricWithMetadatas `protobuf:"bytes,7,opt,name=timed_metric_with_metadatas,json=timedMetricWithMetadatas" json:"timed_metric_with_metadatas,omitempty"` - TimedMetricWithStoragePolicy *TimedMetricWithStoragePolicy `protobuf:"bytes,8,opt,name=timed_metric_with_storage_policy,json=timedMetricWithStoragePolicy" json:"timed_metric_with_storage_policy,omitempty"` + CounterWithMetadatas *CounterWithMetadatas `protobuf:"bytes,2,opt,name=counter_with_metadatas,json=counterWithMetadatas,proto3" json:"counter_with_metadatas,omitempty"` + BatchTimerWithMetadatas *BatchTimerWithMetadatas `protobuf:"bytes,3,opt,name=batch_timer_with_metadatas,json=batchTimerWithMetadatas,proto3" json:"batch_timer_with_metadatas,omitempty"` + GaugeWithMetadatas *GaugeWithMetadatas `protobuf:"bytes,4,opt,name=gauge_with_metadatas,json=gaugeWithMetadatas,proto3" json:"gauge_with_metadatas,omitempty"` + ForwardedMetricWithMetadata *ForwardedMetricWithMetadata `protobuf:"bytes,5,opt,name=forwarded_metric_with_metadata,json=forwardedMetricWithMetadata,proto3" json:"forwarded_metric_with_metadata,omitempty"` + TimedMetricWithMetadata *TimedMetricWithMetadata `protobuf:"bytes,6,opt,name=timed_metric_with_metadata,json=timedMetricWithMetadata,proto3" json:"timed_metric_with_metadata,omitempty"` + TimedMetricWithMetadatas *TimedMetricWithMetadatas `protobuf:"bytes,7,opt,name=timed_metric_with_metadatas,json=timedMetricWithMetadatas,proto3" json:"timed_metric_with_metadatas,omitempty"` + TimedMetricWithStoragePolicy *TimedMetricWithStoragePolicy `protobuf:"bytes,8,opt,name=timed_metric_with_storage_policy,json=timedMetricWithStoragePolicy,proto3" json:"timed_metric_with_storage_policy,omitempty"` +} + +func (m *MetricWithMetadatas) Reset() { *m = MetricWithMetadatas{} } +func (m *MetricWithMetadatas) String() string { return proto.CompactTextString(m) } +func (*MetricWithMetadatas) ProtoMessage() {} +func (*MetricWithMetadatas) Descriptor() ([]byte, []int) { + return fileDescriptor_dfde9d6b40175f89, []int{8} +} +func (m *MetricWithMetadatas) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MetricWithMetadatas) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MetricWithMetadatas.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 *MetricWithMetadatas) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetricWithMetadatas.Merge(m, src) +} +func (m *MetricWithMetadatas) XXX_Size() int { + return m.Size() +} +func (m *MetricWithMetadatas) XXX_DiscardUnknown() { + xxx_messageInfo_MetricWithMetadatas.DiscardUnknown(m) } -func (m *MetricWithMetadatas) Reset() { *m = MetricWithMetadatas{} } -func (m *MetricWithMetadatas) String() string { return proto.CompactTextString(m) } -func (*MetricWithMetadatas) ProtoMessage() {} -func (*MetricWithMetadatas) Descriptor() ([]byte, []int) { return fileDescriptorComposite, []int{8} } +var xxx_messageInfo_MetricWithMetadatas proto.InternalMessageInfo func (m *MetricWithMetadatas) GetType() MetricWithMetadatas_Type { if m != nil { @@ -391,6 +610,7 @@ func (m *MetricWithMetadatas) GetTimedMetricWithStoragePolicy() *TimedMetricWith } func init() { + proto.RegisterEnum("metricpb.MetricWithMetadatas_Type", MetricWithMetadatas_Type_name, MetricWithMetadatas_Type_value) proto.RegisterType((*CounterWithMetadatas)(nil), "metricpb.CounterWithMetadatas") proto.RegisterType((*BatchTimerWithMetadatas)(nil), "metricpb.BatchTimerWithMetadatas") proto.RegisterType((*GaugeWithMetadatas)(nil), "metricpb.GaugeWithMetadatas") @@ -400,12 +620,72 @@ func init() { proto.RegisterType((*TimedMetricWithStoragePolicy)(nil), "metricpb.TimedMetricWithStoragePolicy") proto.RegisterType((*AggregatedMetric)(nil), "metricpb.AggregatedMetric") proto.RegisterType((*MetricWithMetadatas)(nil), "metricpb.MetricWithMetadatas") - proto.RegisterEnum("metricpb.MetricWithMetadatas_Type", MetricWithMetadatas_Type_name, MetricWithMetadatas_Type_value) } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/metricpb/composite.proto", fileDescriptor_dfde9d6b40175f89) +} + +var fileDescriptor_dfde9d6b40175f89 = []byte{ + // 818 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x5d, 0x6f, 0xda, 0x56, + 0x18, 0xc7, 0x71, 0x42, 0x20, 0x7b, 0xc8, 0x32, 0x76, 0xc6, 0x02, 0x83, 0xc8, 0x49, 0xac, 0x6d, + 0x9a, 0x34, 0x0d, 0xb4, 0x20, 0x2d, 0x9a, 0xa2, 0x4d, 0x32, 0x2f, 0x21, 0x68, 0x0b, 0x64, 0xc6, + 0x11, 0x5a, 0x2f, 0x62, 0xd9, 0xc6, 0x31, 0xae, 0x0a, 0x46, 0xf6, 0x41, 0x51, 0xd4, 0x9b, 0x5e, + 0xb6, 0x37, 0x55, 0xa5, 0xaa, 0xdf, 0xa0, 0x1f, 0x26, 0x97, 0xb9, 0xec, 0x55, 0x55, 0x25, 0x57, + 0xbd, 0xef, 0x07, 0xa8, 0x6c, 0x1f, 0xe3, 0x37, 0x9c, 0xb6, 0x70, 0x67, 0x3f, 0x2f, 0xbf, 0xe7, + 0xcf, 0xf1, 0x79, 0xfe, 0x02, 0x5a, 0xaa, 0x86, 0x87, 0x53, 0xa9, 0x2c, 0xeb, 0xa3, 0xca, 0xa8, + 0x3a, 0x90, 0x2a, 0xa3, 0x6a, 0xc5, 0x34, 0xe4, 0xca, 0x48, 0xc1, 0x86, 0x26, 0x9b, 0x15, 0x55, + 0x19, 0x2b, 0x86, 0x88, 0x95, 0x41, 0x65, 0x62, 0xe8, 0x58, 0x27, 0xf1, 0x89, 0x54, 0x91, 0xf5, + 0xd1, 0x44, 0x37, 0x35, 0xac, 0x94, 0xed, 0x04, 0x5a, 0x77, 0x33, 0xc5, 0xdf, 0x7c, 0x48, 0x55, + 0x57, 0x75, 0xa7, 0x53, 0x9a, 0x5e, 0xd8, 0x6f, 0x0e, 0xc6, 0x7a, 0x72, 0x1a, 0x8b, 0x8d, 0x45, + 0x15, 0x38, 0x0f, 0x84, 0x72, 0xb4, 0x04, 0x45, 0x1c, 0x88, 0x58, 0x5c, 0x50, 0xcd, 0x44, 0x7f, + 0xa4, 0xc9, 0x57, 0x13, 0x89, 0x3c, 0x38, 0x14, 0xe6, 0x29, 0x05, 0xb9, 0xba, 0x3e, 0x1d, 0x63, + 0xc5, 0xe8, 0x6b, 0x78, 0x78, 0x42, 0x66, 0x98, 0xe8, 0x77, 0x48, 0xcb, 0x4e, 0xbc, 0x40, 0xed, + 0x52, 0xbf, 0x64, 0xf6, 0xbf, 0x2d, 0xbb, 0x4a, 0xca, 0xa4, 0xa1, 0x96, 0xbc, 0x7e, 0xbb, 0x93, + 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 0x65, 0x1e, 0x08, 0x9f, 0x2f, 0x2d, 0x83, 0xbd, 0x10, + 0x6a, 0xc0, 0xa6, 0xe9, 0x00, 0x05, 0x67, 0xa3, 0x67, 0x47, 0xe6, 0x6e, 0x7a, 0x39, 0x30, 0x90, + 0x30, 0xbe, 0x36, 0xfd, 0x41, 0xe6, 0x31, 0x64, 0x59, 0x55, 0x35, 0x14, 0xd5, 0x72, 0x8a, 0x19, + 0x39, 0x78, 0x5c, 0x3f, 0xcf, 0xd5, 0x14, 0xf9, 0x45, 0xa1, 0xf3, 0xdb, 0x83, 0x0d, 0x65, 0x2c, + 0xeb, 0x03, 0x45, 0x18, 0x8b, 0x63, 0xdd, 0x39, 0xc2, 0x55, 0x2e, 0xe3, 0xc4, 0x3a, 0x56, 0x88, + 0x79, 0x9f, 0x86, 0xef, 0xe6, 0x7d, 0xaf, 0x3f, 0x20, 0x89, 0xaf, 0x26, 0xce, 0x66, 0x6d, 0xee, + 0x33, 0xde, 0xf8, 0x39, 0xc5, 0x65, 0xfe, 0x6a, 0xa2, 0x70, 0x76, 0x3d, 0xe2, 0x61, 0x8b, 0x78, + 0x91, 0x70, 0xa9, 0xe1, 0xa1, 0x10, 0xfe, 0x7e, 0x74, 0xc4, 0xc2, 0x02, 0x28, 0x2e, 0x27, 0xcf, + 0x73, 0xc2, 0x73, 0x28, 0xfa, 0xbc, 0x27, 0x4c, 0x5e, 0xb5, 0xc9, 0x7b, 0xf3, 0xac, 0x28, 0x08, + 0xcf, 0x4b, 0x31, 0xde, 0xd6, 0x81, 0x9c, 0x6d, 0x12, 0x61, 0x72, 0xd2, 0x26, 0x6f, 0x87, 0x7c, + 0x25, 0x08, 0x45, 0x6a, 0xd4, 0x98, 0x1e, 0x02, 0x7d, 0xe1, 0x2e, 0x3d, 0xb9, 0x5c, 0x41, 0x74, + 0x61, 0xcd, 0x26, 0xff, 0x14, 0x6b, 0x12, 0x7e, 0x1e, 0x57, 0xba, 0xb8, 0xc7, 0x78, 0xce, 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xb8, 0xb9, 0xa3, 0x13, 0x6f, 0xee, 0xe8, 0xc4, 0x83, 0x83, 0x05, 0xff, 0x10, + 0x49, 0x29, 0xfb, 0xbd, 0xfa, 0x31, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x6b, 0x96, 0x26, 0x1a, 0x0a, + 0x00, 0x00, +} + func (m *CounterWithMetadatas) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -413,33 +693,42 @@ func (m *CounterWithMetadatas) Marshal() (dAtA []byte, err error) { } func (m *CounterWithMetadatas) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CounterWithMetadatas) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Counter.Size())) - n1, err := m.Counter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Metadatas.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n1 + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Metadatas.Size())) - n2, err := m.Metadatas.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Counter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n2 - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *BatchTimerWithMetadatas) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -447,33 +736,42 @@ func (m *BatchTimerWithMetadatas) Marshal() (dAtA []byte, err error) { } func (m *BatchTimerWithMetadatas) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchTimerWithMetadatas) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.BatchTimer.Size())) - n3, err := m.BatchTimer.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Metadatas.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n3 + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Metadatas.Size())) - n4, err := m.Metadatas.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.BatchTimer.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n4 - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *GaugeWithMetadatas) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -481,33 +779,42 @@ func (m *GaugeWithMetadatas) Marshal() (dAtA []byte, err error) { } func (m *GaugeWithMetadatas) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GaugeWithMetadatas) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Gauge.Size())) - n5, err := m.Gauge.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Metadatas.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n5 + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Metadatas.Size())) - n6, err := m.Metadatas.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Gauge.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n6 - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *ForwardedMetricWithMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -515,33 +822,42 @@ func (m *ForwardedMetricWithMetadata) Marshal() (dAtA []byte, err error) { } func (m *ForwardedMetricWithMetadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ForwardedMetricWithMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Metric.Size())) - n7, err := m.Metric.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n7 + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Metadata.Size())) - n8, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Metric.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n8 - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *TimedMetricWithMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -549,33 +865,42 @@ func (m *TimedMetricWithMetadata) Marshal() (dAtA []byte, err error) { } func (m *TimedMetricWithMetadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TimedMetricWithMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Metric.Size())) - n9, err := m.Metric.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n9 + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Metadata.Size())) - n10, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Metric.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n10 - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *TimedMetricWithMetadatas) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -583,33 +908,42 @@ func (m *TimedMetricWithMetadatas) Marshal() (dAtA []byte, err error) { } func (m *TimedMetricWithMetadatas) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TimedMetricWithMetadatas) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Metric.Size())) - n11, err := m.Metric.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Metadatas.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n11 + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Metadatas.Size())) - n12, err := m.Metadatas.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Metric.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n12 - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *TimedMetricWithStoragePolicy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -617,33 +951,42 @@ func (m *TimedMetricWithStoragePolicy) Marshal() (dAtA []byte, err error) { } func (m *TimedMetricWithStoragePolicy) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TimedMetricWithStoragePolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.TimedMetric.Size())) - n13, err := m.TimedMetric.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.StoragePolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n13 + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.StoragePolicy.Size())) - n14, err := m.StoragePolicy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.TimedMetric.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n14 - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *AggregatedMetric) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -651,30 +994,37 @@ func (m *AggregatedMetric) Marshal() (dAtA []byte, err error) { } func (m *AggregatedMetric) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AggregatedMetric) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Metric.Size())) - n15, err := m.Metric.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 if m.EncodeNanos != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintComposite(dAtA, i, uint64(m.EncodeNanos)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.Metric.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *MetricWithMetadatas) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -682,98 +1032,122 @@ func (m *MetricWithMetadatas) Marshal() (dAtA []byte, err error) { } func (m *MetricWithMetadatas) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MetricWithMetadatas) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.Type)) - } - if m.CounterWithMetadatas != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.CounterWithMetadatas.Size())) - n16, err := m.CounterWithMetadatas.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.TimedMetricWithStoragePolicy != nil { + { + size, err := m.TimedMetricWithStoragePolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n16 + i-- + dAtA[i] = 0x42 } - if m.BatchTimerWithMetadatas != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.BatchTimerWithMetadatas.Size())) - n17, err := m.BatchTimerWithMetadatas.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.TimedMetricWithMetadatas != nil { + { + size, err := m.TimedMetricWithMetadatas.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n17 + i-- + dAtA[i] = 0x3a } - if m.GaugeWithMetadatas != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.GaugeWithMetadatas.Size())) - n18, err := m.GaugeWithMetadatas.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.TimedMetricWithMetadata != nil { + { + size, err := m.TimedMetricWithMetadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n18 + i-- + dAtA[i] = 0x32 } if m.ForwardedMetricWithMetadata != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.ForwardedMetricWithMetadata.Size())) - n19, err := m.ForwardedMetricWithMetadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.ForwardedMetricWithMetadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n19 + i-- + dAtA[i] = 0x2a } - if m.TimedMetricWithMetadata != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.TimedMetricWithMetadata.Size())) - n20, err := m.TimedMetricWithMetadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.GaugeWithMetadatas != nil { + { + size, err := m.GaugeWithMetadatas.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n20 + i-- + dAtA[i] = 0x22 } - if m.TimedMetricWithMetadatas != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.TimedMetricWithMetadatas.Size())) - n21, err := m.TimedMetricWithMetadatas.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.BatchTimerWithMetadatas != nil { + { + size, err := m.BatchTimerWithMetadatas.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n21 + i-- + dAtA[i] = 0x1a } - if m.TimedMetricWithStoragePolicy != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintComposite(dAtA, i, uint64(m.TimedMetricWithStoragePolicy.Size())) - n22, err := m.TimedMetricWithStoragePolicy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.CounterWithMetadatas != nil { + { + size, err := m.CounterWithMetadatas.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComposite(dAtA, i, uint64(size)) } - i += n22 + i-- + dAtA[i] = 0x12 } - return i, nil + if m.Type != 0 { + i = encodeVarintComposite(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func encodeVarintComposite(dAtA []byte, offset int, v uint64) int { + offset -= sovComposite(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *CounterWithMetadatas) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Counter.Size() @@ -784,6 +1158,9 @@ func (m *CounterWithMetadatas) Size() (n int) { } func (m *BatchTimerWithMetadatas) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.BatchTimer.Size() @@ -794,6 +1171,9 @@ func (m *BatchTimerWithMetadatas) Size() (n int) { } func (m *GaugeWithMetadatas) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Gauge.Size() @@ -804,6 +1184,9 @@ func (m *GaugeWithMetadatas) Size() (n int) { } func (m *ForwardedMetricWithMetadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Metric.Size() @@ -814,6 +1197,9 @@ func (m *ForwardedMetricWithMetadata) Size() (n int) { } func (m *TimedMetricWithMetadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Metric.Size() @@ -824,6 +1210,9 @@ func (m *TimedMetricWithMetadata) Size() (n int) { } func (m *TimedMetricWithMetadatas) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Metric.Size() @@ -834,6 +1223,9 @@ func (m *TimedMetricWithMetadatas) Size() (n int) { } func (m *TimedMetricWithStoragePolicy) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.TimedMetric.Size() @@ -844,6 +1236,9 @@ func (m *TimedMetricWithStoragePolicy) Size() (n int) { } func (m *AggregatedMetric) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Metric.Size() @@ -855,6 +1250,9 @@ func (m *AggregatedMetric) Size() (n int) { } func (m *MetricWithMetadatas) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -892,14 +1290,7 @@ func (m *MetricWithMetadatas) Size() (n int) { } func sovComposite(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozComposite(x uint64) (n int) { return sovComposite(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -919,7 +1310,7 @@ func (m *CounterWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -947,7 +1338,7 @@ func (m *CounterWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -956,6 +1347,9 @@ func (m *CounterWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -977,7 +1371,7 @@ func (m *CounterWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -986,6 +1380,9 @@ func (m *CounterWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -999,7 +1396,7 @@ func (m *CounterWithMetadatas) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthComposite } if (iNdEx + skippy) > l { @@ -1029,7 +1426,7 @@ func (m *BatchTimerWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1057,7 +1454,7 @@ func (m *BatchTimerWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1066,6 +1463,9 @@ func (m *BatchTimerWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1087,7 +1487,7 @@ func (m *BatchTimerWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1096,6 +1496,9 @@ func (m *BatchTimerWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1109,7 +1512,7 @@ func (m *BatchTimerWithMetadatas) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthComposite } if (iNdEx + skippy) > l { @@ -1139,7 +1542,7 @@ func (m *GaugeWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1167,7 +1570,7 @@ func (m *GaugeWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1176,6 +1579,9 @@ func (m *GaugeWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1197,7 +1603,7 @@ func (m *GaugeWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1206,6 +1612,9 @@ func (m *GaugeWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1219,7 +1628,7 @@ func (m *GaugeWithMetadatas) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthComposite } if (iNdEx + skippy) > l { @@ -1249,7 +1658,7 @@ func (m *ForwardedMetricWithMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1277,7 +1686,7 @@ func (m *ForwardedMetricWithMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1286,6 +1695,9 @@ func (m *ForwardedMetricWithMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1307,7 +1719,7 @@ func (m *ForwardedMetricWithMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1316,6 +1728,9 @@ func (m *ForwardedMetricWithMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1329,7 +1744,7 @@ func (m *ForwardedMetricWithMetadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthComposite } if (iNdEx + skippy) > l { @@ -1359,7 +1774,7 @@ func (m *TimedMetricWithMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1387,7 +1802,7 @@ func (m *TimedMetricWithMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1396,6 +1811,9 @@ func (m *TimedMetricWithMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1417,7 +1835,7 @@ func (m *TimedMetricWithMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1426,6 +1844,9 @@ func (m *TimedMetricWithMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1439,7 +1860,7 @@ func (m *TimedMetricWithMetadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthComposite } if (iNdEx + skippy) > l { @@ -1469,7 +1890,7 @@ func (m *TimedMetricWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1497,7 +1918,7 @@ func (m *TimedMetricWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1506,6 +1927,9 @@ func (m *TimedMetricWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1527,7 +1951,7 @@ func (m *TimedMetricWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1536,6 +1960,9 @@ func (m *TimedMetricWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1549,7 +1976,7 @@ func (m *TimedMetricWithMetadatas) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthComposite } if (iNdEx + skippy) > l { @@ -1579,7 +2006,7 @@ func (m *TimedMetricWithStoragePolicy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1607,7 +2034,7 @@ func (m *TimedMetricWithStoragePolicy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1616,6 +2043,9 @@ func (m *TimedMetricWithStoragePolicy) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1637,7 +2067,7 @@ func (m *TimedMetricWithStoragePolicy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1646,6 +2076,9 @@ func (m *TimedMetricWithStoragePolicy) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1659,7 +2092,7 @@ func (m *TimedMetricWithStoragePolicy) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthComposite } if (iNdEx + skippy) > l { @@ -1689,7 +2122,7 @@ func (m *AggregatedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1717,7 +2150,7 @@ func (m *AggregatedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1726,6 +2159,9 @@ func (m *AggregatedMetric) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1747,7 +2183,7 @@ func (m *AggregatedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EncodeNanos |= (int64(b) & 0x7F) << shift + m.EncodeNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1758,7 +2194,7 @@ func (m *AggregatedMetric) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthComposite } if (iNdEx + skippy) > l { @@ -1788,7 +2224,7 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1816,7 +2252,7 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (MetricWithMetadatas_Type(b) & 0x7F) << shift + m.Type |= MetricWithMetadatas_Type(b&0x7F) << shift if b < 0x80 { break } @@ -1835,7 +2271,7 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1844,6 +2280,9 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1868,7 +2307,7 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1877,6 +2316,9 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1901,7 +2343,7 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1910,6 +2352,9 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1934,7 +2379,7 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1943,6 +2388,9 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1967,7 +2415,7 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1976,6 +2424,9 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2000,7 +2451,7 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2009,6 +2460,9 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2033,7 +2487,7 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2042,6 +2496,9 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { return ErrInvalidLengthComposite } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComposite + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2058,7 +2515,7 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthComposite } if (iNdEx + skippy) > l { @@ -2076,6 +2533,7 @@ func (m *MetricWithMetadatas) Unmarshal(dAtA []byte) error { func skipComposite(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2107,10 +2565,8 @@ func skipComposite(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2127,112 +2583,34 @@ func skipComposite(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthComposite } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowComposite - } - 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 := skipComposite(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupComposite + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthComposite + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthComposite = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowComposite = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthComposite = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowComposite = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupComposite = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/metricpb/composite.proto", fileDescriptorComposite) -} - -var fileDescriptorComposite = []byte{ - // 808 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xcd, 0x6e, 0xd3, 0x58, - 0x14, 0xc7, 0xeb, 0x36, 0x4d, 0x3a, 0x27, 0x9d, 0x4e, 0xe6, 0x4e, 0xa6, 0xc9, 0x24, 0x95, 0xdb, - 0x5a, 0x33, 0x23, 0x24, 0x44, 0x22, 0x1a, 0x89, 0x0a, 0x55, 0x20, 0x39, 0x1f, 0x4d, 0x23, 0x68, - 0x52, 0x39, 0xae, 0x22, 0x58, 0xd4, 0xb2, 0x1d, 0xd7, 0x31, 0x22, 0x71, 0x64, 0xdf, 0xa8, 0xaa, - 0xd8, 0xb0, 0x84, 0x0d, 0x42, 0x42, 0xbc, 0x01, 0x0f, 0xd3, 0x25, 0x4f, 0x80, 0x50, 0x59, 0xb1, - 0xe7, 0x01, 0x90, 0xed, 0xeb, 0xf8, 0x2b, 0x2e, 0x90, 0xec, 0xec, 0xf3, 0xf1, 0x3b, 0xff, 0x5c, - 0xdf, 0xf3, 0x57, 0xa0, 0xa9, 0x6a, 0x78, 0x30, 0x91, 0x4a, 0xb2, 0x3e, 0x2c, 0x0f, 0x2b, 0x7d, - 0xa9, 0x3c, 0xac, 0x94, 0x4d, 0x43, 0x2e, 0x0f, 0x15, 0x6c, 0x68, 0xb2, 0x59, 0x56, 0x95, 0x91, - 0x62, 0x88, 0x58, 0xe9, 0x97, 0xc7, 0x86, 0x8e, 0x75, 0x12, 0x1f, 0x4b, 0x65, 0x59, 0x1f, 0x8e, - 0x75, 0x53, 0xc3, 0x4a, 0xc9, 0x4e, 0xa0, 0x35, 0x37, 0x53, 0xb8, 0xe3, 0x43, 0xa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0xbe, 0x75, - 0x1c, 0xcd, 0x2f, 0xa3, 0x3c, 0x64, 0x9b, 0xec, 0x69, 0xb3, 0x11, 0xce, 0xac, 0x20, 0x06, 0xe8, - 0xc3, 0x0e, 0xd7, 0x63, 0xb9, 0x7a, 0xa3, 0x6e, 0x25, 0xb8, 0x56, 0x2d, 0x58, 0x94, 0x49, 0x58, - 0x74, 0x8b, 0x1b, 0x93, 0x5f, 0x45, 0xdb, 0x50, 0x8c, 0xcf, 0x77, 0x33, 0x49, 0xf4, 0x2f, 0xec, - 0x44, 0x0b, 0xba, 0x7c, 0x87, 0x63, 0x9b, 0x0d, 0xe1, 0xa4, 0xf3, 0xb8, 0x55, 0x7b, 0x92, 0x49, - 0x55, 0x5b, 0x57, 0xd7, 0x34, 0xf5, 0xf1, 0x9a, 0xa6, 0x3e, 0x5f, 0xd3, 0xd4, 0xdb, 0x2f, 0xf4, - 0xd2, 0xd3, 0xfd, 0x39, 0xff, 0x08, 0x49, 0x49, 0xfb, 0xbd, 0xf2, 0x3d, 0x00, 0x00, 0xff, 0xff, - 0x34, 0x3f, 0x09, 0x4f, 0x12, 0x0a, 0x00, 0x00, -} diff --git a/src/metrics/generated/proto/metricpb/metadata.pb.go b/src/metrics/generated/proto/metricpb/metadata.pb.go index c0d1ab19fd..b546f0faae 100644 --- a/src/metrics/generated/proto/metricpb/metadata.pb.go +++ b/src/metrics/generated/proto/metricpb/metadata.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/metrics/generated/proto/metricpb/metadata.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,33 +23,69 @@ package metricpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import aggregationpb "github.com/m3db/m3/src/metrics/generated/proto/aggregationpb" -import policypb "github.com/m3db/m3/src/metrics/generated/proto/policypb" -import pipelinepb "github.com/m3db/m3/src/metrics/generated/proto/pipelinepb" - -import io "io" +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + aggregationpb "github.com/m3db/m3/src/metrics/generated/proto/aggregationpb" + pipelinepb "github.com/m3db/m3/src/metrics/generated/proto/pipelinepb" + policypb "github.com/m3db/m3/src/metrics/generated/proto/policypb" + io "io" + math "math" + math_bits "math/bits" +) // 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 + type PipelineMetadata struct { - AggregationId aggregationpb.AggregationID `protobuf:"bytes,1,opt,name=aggregation_id,json=aggregationId" json:"aggregation_id"` - StoragePolicies []policypb.StoragePolicy `protobuf:"bytes,2,rep,name=storage_policies,json=storagePolicies" json:"storage_policies"` - Pipeline pipelinepb.AppliedPipeline `protobuf:"bytes,3,opt,name=pipeline" json:"pipeline"` + AggregationId aggregationpb.AggregationID `protobuf:"bytes,1,opt,name=aggregation_id,json=aggregationId,proto3" json:"aggregation_id"` + StoragePolicies []policypb.StoragePolicy `protobuf:"bytes,2,rep,name=storage_policies,json=storagePolicies,proto3" json:"storage_policies"` + Pipeline pipelinepb.AppliedPipeline `protobuf:"bytes,3,opt,name=pipeline,proto3" json:"pipeline"` DropPolicy policypb.DropPolicy `protobuf:"varint,4,opt,name=drop_policy,json=dropPolicy,proto3,enum=policypb.DropPolicy" json:"drop_policy,omitempty"` ResendEnabled bool `protobuf:"varint,5,opt,name=resend_enabled,json=resendEnabled,proto3" json:"resend_enabled,omitempty"` } -func (m *PipelineMetadata) Reset() { *m = PipelineMetadata{} } -func (m *PipelineMetadata) String() string { return proto.CompactTextString(m) } -func (*PipelineMetadata) ProtoMessage() {} -func (*PipelineMetadata) Descriptor() ([]byte, []int) { return fileDescriptorMetadata, []int{0} } +func (m *PipelineMetadata) Reset() { *m = PipelineMetadata{} } +func (m *PipelineMetadata) String() string { return proto.CompactTextString(m) } +func (*PipelineMetadata) ProtoMessage() {} +func (*PipelineMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_d5925b9e6d0bba93, []int{0} +} +func (m *PipelineMetadata) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PipelineMetadata.Unmarshal(m, b) +} +func (m *PipelineMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PipelineMetadata.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 *PipelineMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_PipelineMetadata.Merge(m, src) +} +func (m *PipelineMetadata) XXX_Size() int { + return m.Size() +} +func (m *PipelineMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_PipelineMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_PipelineMetadata proto.InternalMessageInfo func (m *PipelineMetadata) GetAggregationId() aggregationpb.AggregationID { if m != nil { @@ -87,13 +123,41 @@ func (m *PipelineMetadata) GetResendEnabled() bool { } type Metadata struct { - Pipelines []PipelineMetadata `protobuf:"bytes,1,rep,name=pipelines" json:"pipelines"` + Pipelines []PipelineMetadata `protobuf:"bytes,1,rep,name=pipelines,proto3" json:"pipelines"` } -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { return fileDescriptorMetadata, []int{1} } +func (m *Metadata) Reset() { *m = Metadata{} } +func (m *Metadata) String() string { return proto.CompactTextString(m) } +func (*Metadata) ProtoMessage() {} +func (*Metadata) Descriptor() ([]byte, []int) { + return fileDescriptor_d5925b9e6d0bba93, []int{1} +} +func (m *Metadata) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Metadata.Unmarshal(m, b) +} +func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metadata.Merge(m, src) +} +func (m *Metadata) XXX_Size() int { + return m.Size() +} +func (m *Metadata) XXX_DiscardUnknown() { + xxx_messageInfo_Metadata.DiscardUnknown(m) +} + +var xxx_messageInfo_Metadata proto.InternalMessageInfo func (m *Metadata) GetPipelines() []PipelineMetadata { if m != nil { @@ -105,13 +169,41 @@ func (m *Metadata) GetPipelines() []PipelineMetadata { type StagedMetadata struct { CutoverNanos int64 `protobuf:"varint,1,opt,name=cutover_nanos,json=cutoverNanos,proto3" json:"cutover_nanos,omitempty"` Tombstoned bool `protobuf:"varint,2,opt,name=tombstoned,proto3" json:"tombstoned,omitempty"` - Metadata Metadata `protobuf:"bytes,3,opt,name=metadata" json:"metadata"` + Metadata Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata"` } -func (m *StagedMetadata) Reset() { *m = StagedMetadata{} } -func (m *StagedMetadata) String() string { return proto.CompactTextString(m) } -func (*StagedMetadata) ProtoMessage() {} -func (*StagedMetadata) Descriptor() ([]byte, []int) { return fileDescriptorMetadata, []int{2} } +func (m *StagedMetadata) Reset() { *m = StagedMetadata{} } +func (m *StagedMetadata) String() string { return proto.CompactTextString(m) } +func (*StagedMetadata) ProtoMessage() {} +func (*StagedMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_d5925b9e6d0bba93, []int{2} +} +func (m *StagedMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StagedMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StagedMetadata.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 *StagedMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_StagedMetadata.Merge(m, src) +} +func (m *StagedMetadata) XXX_Size() int { + return m.Size() +} +func (m *StagedMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_StagedMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_StagedMetadata proto.InternalMessageInfo func (m *StagedMetadata) GetCutoverNanos() int64 { if m != nil { @@ -135,13 +227,41 @@ func (m *StagedMetadata) GetMetadata() Metadata { } type StagedMetadatas struct { - Metadatas []StagedMetadata `protobuf:"bytes,1,rep,name=metadatas" json:"metadatas"` + Metadatas []StagedMetadata `protobuf:"bytes,1,rep,name=metadatas,proto3" json:"metadatas"` +} + +func (m *StagedMetadatas) Reset() { *m = StagedMetadatas{} } +func (m *StagedMetadatas) String() string { return proto.CompactTextString(m) } +func (*StagedMetadatas) ProtoMessage() {} +func (*StagedMetadatas) Descriptor() ([]byte, []int) { + return fileDescriptor_d5925b9e6d0bba93, []int{3} +} +func (m *StagedMetadatas) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StagedMetadatas.Unmarshal(m, b) +} +func (m *StagedMetadatas) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StagedMetadatas.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 *StagedMetadatas) XXX_Merge(src proto.Message) { + xxx_messageInfo_StagedMetadatas.Merge(m, src) +} +func (m *StagedMetadatas) XXX_Size() int { + return m.Size() +} +func (m *StagedMetadatas) XXX_DiscardUnknown() { + xxx_messageInfo_StagedMetadatas.DiscardUnknown(m) } -func (m *StagedMetadatas) Reset() { *m = StagedMetadatas{} } -func (m *StagedMetadatas) String() string { return proto.CompactTextString(m) } -func (*StagedMetadatas) ProtoMessage() {} -func (*StagedMetadatas) Descriptor() ([]byte, []int) { return fileDescriptorMetadata, []int{3} } +var xxx_messageInfo_StagedMetadatas proto.InternalMessageInfo func (m *StagedMetadatas) GetMetadatas() []StagedMetadata { if m != nil { @@ -151,18 +271,46 @@ func (m *StagedMetadatas) GetMetadatas() []StagedMetadata { } type ForwardMetadata struct { - AggregationId aggregationpb.AggregationID `protobuf:"bytes,1,opt,name=aggregation_id,json=aggregationId" json:"aggregation_id"` - StoragePolicy policypb.StoragePolicy `protobuf:"bytes,2,opt,name=storage_policy,json=storagePolicy" json:"storage_policy"` - Pipeline pipelinepb.AppliedPipeline `protobuf:"bytes,3,opt,name=pipeline" json:"pipeline"` + AggregationId aggregationpb.AggregationID `protobuf:"bytes,1,opt,name=aggregation_id,json=aggregationId,proto3" json:"aggregation_id"` + StoragePolicy policypb.StoragePolicy `protobuf:"bytes,2,opt,name=storage_policy,json=storagePolicy,proto3" json:"storage_policy"` + Pipeline pipelinepb.AppliedPipeline `protobuf:"bytes,3,opt,name=pipeline,proto3" json:"pipeline"` SourceId uint32 `protobuf:"varint,4,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` NumForwardedTimes int32 `protobuf:"varint,5,opt,name=num_forwarded_times,json=numForwardedTimes,proto3" json:"num_forwarded_times,omitempty"` ResendEnabled bool `protobuf:"varint,6,opt,name=resend_enabled,json=resendEnabled,proto3" json:"resend_enabled,omitempty"` } -func (m *ForwardMetadata) Reset() { *m = ForwardMetadata{} } -func (m *ForwardMetadata) String() string { return proto.CompactTextString(m) } -func (*ForwardMetadata) ProtoMessage() {} -func (*ForwardMetadata) Descriptor() ([]byte, []int) { return fileDescriptorMetadata, []int{4} } +func (m *ForwardMetadata) Reset() { *m = ForwardMetadata{} } +func (m *ForwardMetadata) String() string { return proto.CompactTextString(m) } +func (*ForwardMetadata) ProtoMessage() {} +func (*ForwardMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_d5925b9e6d0bba93, []int{4} +} +func (m *ForwardMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ForwardMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ForwardMetadata.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 *ForwardMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_ForwardMetadata.Merge(m, src) +} +func (m *ForwardMetadata) XXX_Size() int { + return m.Size() +} +func (m *ForwardMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_ForwardMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_ForwardMetadata proto.InternalMessageInfo func (m *ForwardMetadata) GetAggregationId() aggregationpb.AggregationID { if m != nil { @@ -207,14 +355,42 @@ func (m *ForwardMetadata) GetResendEnabled() bool { } type TimedMetadata struct { - AggregationId aggregationpb.AggregationID `protobuf:"bytes,1,opt,name=aggregation_id,json=aggregationId" json:"aggregation_id"` - StoragePolicy policypb.StoragePolicy `protobuf:"bytes,2,opt,name=storage_policy,json=storagePolicy" json:"storage_policy"` + AggregationId aggregationpb.AggregationID `protobuf:"bytes,1,opt,name=aggregation_id,json=aggregationId,proto3" json:"aggregation_id"` + StoragePolicy policypb.StoragePolicy `protobuf:"bytes,2,opt,name=storage_policy,json=storagePolicy,proto3" json:"storage_policy"` +} + +func (m *TimedMetadata) Reset() { *m = TimedMetadata{} } +func (m *TimedMetadata) String() string { return proto.CompactTextString(m) } +func (*TimedMetadata) ProtoMessage() {} +func (*TimedMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_d5925b9e6d0bba93, []int{5} +} +func (m *TimedMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TimedMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TimedMetadata.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 *TimedMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimedMetadata.Merge(m, src) +} +func (m *TimedMetadata) XXX_Size() int { + return m.Size() +} +func (m *TimedMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_TimedMetadata.DiscardUnknown(m) } -func (m *TimedMetadata) Reset() { *m = TimedMetadata{} } -func (m *TimedMetadata) String() string { return proto.CompactTextString(m) } -func (*TimedMetadata) ProtoMessage() {} -func (*TimedMetadata) Descriptor() ([]byte, []int) { return fileDescriptorMetadata, []int{5} } +var xxx_messageInfo_TimedMetadata proto.InternalMessageInfo func (m *TimedMetadata) GetAggregationId() aggregationpb.AggregationID { if m != nil { @@ -238,10 +414,57 @@ func init() { proto.RegisterType((*ForwardMetadata)(nil), "metricpb.ForwardMetadata") proto.RegisterType((*TimedMetadata)(nil), "metricpb.TimedMetadata") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/metricpb/metadata.proto", fileDescriptor_d5925b9e6d0bba93) +} + +var fileDescriptor_d5925b9e6d0bba93 = []byte{ + // 597 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0x41, 0x8b, 0xd3, 0x40, + 0x14, 0x6e, 0xda, 0xee, 0x92, 0x4e, 0x4d, 0xbb, 0x46, 0xc1, 0xd0, 0x95, 0x6c, 0xa9, 0x08, 0xbd, + 0x98, 0x40, 0xab, 0x08, 0xa2, 0xc2, 0x2e, 0xb5, 0x6c, 0x0f, 0x2e, 0x35, 0xab, 0x17, 0x2f, 0x21, + 0xc9, 0xcc, 0xc6, 0x40, 0x93, 0x09, 0x33, 0x13, 0xa5, 0xbf, 0xc1, 0xcb, 0xfe, 0x04, 0x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xb2, 0xf8, 0x85, 0xf0, + 0x63, 0xaa, 0xa5, 0xb8, 0x2b, 0xa2, 0x8a, 0xc9, 0xc1, 0x3b, 0xd0, 0xdd, 0x14, 0x43, 0xd5, 0xe7, + 0xa0, 0x25, 0x9e, 0x85, 0x4d, 0xad, 0x64, 0xda, 0x9c, 0x16, 0x26, 0x8b, 0x05, 0x6e, 0xf2, 0x7b, + 0x1d, 0x74, 0xa7, 0x98, 0x7c, 0x72, 0x08, 0xfc, 0x1f, 0x11, 0x9c, 0x80, 0xce, 0x46, 0x04, 0x97, + 0xd9, 0x3d, 0xfe, 0x18, 0x40, 0xa5, 0x1a, 0xc0, 0xe5, 0xbf, 0xc6, 0x6f, 0x1f, 0xb4, 0x28, 0x4e, + 0x88, 0x87, 0x52, 0x2b, 0x69, 0xf8, 0x14, 0x4b, 0xce, 0x81, 0x19, 0x54, 0x0d, 0x70, 0x27, 0x4a, + 0x42, 0xfb, 0x2c, 0xbf, 0x01, 0x82, 0x36, 0x0b, 0x42, 0x44, 0xb3, 0xa4, 0xed, 0x58, 0xb7, 0xa3, + 0x24, 0x9c, 0x8a, 0x97, 0xb7, 0xe9, 0xc3, 0x35, 0xa1, 0xdc, 0xbd, 0x26, 0x94, 0x83, 0x2f, 0x12, + 0x50, 0xd2, 0x85, 0x9b, 0x7b, 0xd5, 0xa3, 0x37, 0x17, 0x2b, 0x5d, 0xba, 0x5c, 0xe9, 0xd2, 0xaf, + 0x95, 0x2e, 0x9d, 0xaf, 0xf5, 0xda, 0xe5, 0x5a, 0xaf, 0xfd, 0x58, 0xeb, 0xb5, 0xf7, 0x4f, 0xff, + 0xf2, 0x9f, 0xdf, 0xdd, 0xcd, 0xfa, 0xf1, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x76, 0xf3, + 0xc2, 0x3b, 0x06, 0x00, 0x00, +} + func (m *PipelineMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -249,60 +472,71 @@ func (m *PipelineMetadata) Marshal() (dAtA []byte, err error) { } func (m *PipelineMetadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PipelineMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.AggregationId.Size())) - n1, err := m.AggregationId.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - if len(m.StoragePolicies) > 0 { - for _, msg := range m.StoragePolicies { - dAtA[i] = 0x12 - i++ - i = encodeVarintMetadata(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - dAtA[i] = 0x1a - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.Pipeline.Size())) - n2, err := m.Pipeline.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - if m.DropPolicy != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.DropPolicy)) - } if m.ResendEnabled { - dAtA[i] = 0x28 - i++ + i-- if m.ResendEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x28 } - return i, nil + if m.DropPolicy != 0 { + i = encodeVarintMetadata(dAtA, i, uint64(m.DropPolicy)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.Pipeline.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetadata(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.StoragePolicies) > 0 { + for iNdEx := len(m.StoragePolicies) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.StoragePolicies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetadata(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.AggregationId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetadata(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *Metadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -310,29 +544,36 @@ func (m *Metadata) Marshal() (dAtA []byte, err error) { } func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Pipelines) > 0 { - for _, msg := range m.Pipelines { - dAtA[i] = 0xa - i++ - i = encodeVarintMetadata(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Pipelines) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pipelines[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetadata(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *StagedMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -340,40 +581,47 @@ func (m *StagedMetadata) Marshal() (dAtA []byte, err error) { } func (m *StagedMetadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StagedMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.CutoverNanos != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.CutoverNanos)) + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetadata(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if m.Tombstoned { - dAtA[i] = 0x10 - i++ + i-- if m.Tombstoned { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - dAtA[i] = 0x1a - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.Metadata.Size())) - n3, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.CutoverNanos != 0 { + i = encodeVarintMetadata(dAtA, i, uint64(m.CutoverNanos)) + i-- + dAtA[i] = 0x8 } - i += n3 - return i, nil + return len(dAtA) - i, nil } func (m *StagedMetadatas) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -381,29 +629,36 @@ func (m *StagedMetadatas) Marshal() (dAtA []byte, err error) { } func (m *StagedMetadatas) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StagedMetadatas) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Metadatas) > 0 { - for _, msg := range m.Metadatas { - dAtA[i] = 0xa - i++ - i = encodeVarintMetadata(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Metadatas) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Metadatas[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetadata(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *ForwardMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -411,61 +666,72 @@ func (m *ForwardMetadata) Marshal() (dAtA []byte, err error) { } func (m *ForwardMetadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ForwardMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.AggregationId.Size())) - n4, err := m.AggregationId.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - dAtA[i] = 0x12 - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.StoragePolicy.Size())) - n5, err := m.StoragePolicy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.ResendEnabled { + i-- + if m.ResendEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 } - i += n5 - dAtA[i] = 0x1a - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.Pipeline.Size())) - n6, err := m.Pipeline.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.NumForwardedTimes != 0 { + i = encodeVarintMetadata(dAtA, i, uint64(m.NumForwardedTimes)) + i-- + dAtA[i] = 0x28 } - i += n6 if m.SourceId != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintMetadata(dAtA, i, uint64(m.SourceId)) + i-- + dAtA[i] = 0x20 } - if m.NumForwardedTimes != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.NumForwardedTimes)) + { + size, err := m.Pipeline.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetadata(dAtA, i, uint64(size)) } - if m.ResendEnabled { - dAtA[i] = 0x30 - i++ - if m.ResendEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + i-- + dAtA[i] = 0x1a + { + size, err := m.StoragePolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetadata(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.AggregationId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i++ + i -= size + i = encodeVarintMetadata(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *TimedMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -473,39 +739,53 @@ func (m *TimedMetadata) Marshal() (dAtA []byte, err error) { } func (m *TimedMetadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TimedMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.AggregationId.Size())) - n7, err := m.AggregationId.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.StoragePolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetadata(dAtA, i, uint64(size)) } - i += n7 + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintMetadata(dAtA, i, uint64(m.StoragePolicy.Size())) - n8, err := m.StoragePolicy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.AggregationId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetadata(dAtA, i, uint64(size)) } - i += n8 - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func encodeVarintMetadata(dAtA []byte, offset int, v uint64) int { + offset -= sovMetadata(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *PipelineMetadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.AggregationId.Size() @@ -528,6 +808,9 @@ func (m *PipelineMetadata) Size() (n int) { } func (m *Metadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Pipelines) > 0 { @@ -540,6 +823,9 @@ func (m *Metadata) Size() (n int) { } func (m *StagedMetadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.CutoverNanos != 0 { @@ -554,6 +840,9 @@ func (m *StagedMetadata) Size() (n int) { } func (m *StagedMetadatas) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Metadatas) > 0 { @@ -566,6 +855,9 @@ func (m *StagedMetadatas) Size() (n int) { } func (m *ForwardMetadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.AggregationId.Size() @@ -587,6 +879,9 @@ func (m *ForwardMetadata) Size() (n int) { } func (m *TimedMetadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.AggregationId.Size() @@ -597,14 +892,7 @@ func (m *TimedMetadata) Size() (n int) { } func sovMetadata(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozMetadata(x uint64) (n int) { return sovMetadata(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -624,7 +912,7 @@ func (m *StagedMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -652,7 +940,7 @@ func (m *StagedMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CutoverNanos |= (int64(b) & 0x7F) << shift + m.CutoverNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -671,7 +959,7 @@ func (m *StagedMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -691,7 +979,7 @@ func (m *StagedMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -700,6 +988,9 @@ func (m *StagedMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetadata } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetadata + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -713,7 +1004,7 @@ func (m *StagedMetadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMetadata } if (iNdEx + skippy) > l { @@ -743,7 +1034,7 @@ func (m *ForwardMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -771,7 +1062,7 @@ func (m *ForwardMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -780,6 +1071,9 @@ func (m *ForwardMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetadata } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetadata + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -801,7 +1095,7 @@ func (m *ForwardMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -810,6 +1104,9 @@ func (m *ForwardMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetadata } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetadata + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -831,7 +1128,7 @@ func (m *ForwardMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -840,6 +1137,9 @@ func (m *ForwardMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetadata } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetadata + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -861,7 +1161,7 @@ func (m *ForwardMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SourceId |= (uint32(b) & 0x7F) << shift + m.SourceId |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -880,7 +1180,7 @@ func (m *ForwardMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumForwardedTimes |= (int32(b) & 0x7F) << shift + m.NumForwardedTimes |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -899,7 +1199,7 @@ func (m *ForwardMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -911,7 +1211,7 @@ func (m *ForwardMetadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMetadata } if (iNdEx + skippy) > l { @@ -941,7 +1241,7 @@ func (m *TimedMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -969,7 +1269,7 @@ func (m *TimedMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -978,6 +1278,9 @@ func (m *TimedMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetadata } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetadata + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -999,7 +1302,7 @@ func (m *TimedMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1008,6 +1311,9 @@ func (m *TimedMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetadata } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetadata + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1021,7 +1327,7 @@ func (m *TimedMetadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMetadata } if (iNdEx + skippy) > l { @@ -1039,6 +1345,7 @@ func (m *TimedMetadata) Unmarshal(dAtA []byte) error { func skipMetadata(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1070,10 +1377,8 @@ func skipMetadata(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1090,98 +1395,34 @@ func skipMetadata(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthMetadata } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetadata - } - 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 := skipMetadata(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMetadata + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthMetadata + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthMetadata = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetadata = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthMetadata = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMetadata = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMetadata = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/metricpb/metadata.proto", fileDescriptorMetadata) -} - -var fileDescriptorMetadata = []byte{ - // 589 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0x41, 0x8b, 0xd3, 0x5c, - 0x14, 0x9d, 0x74, 0x3a, 0x43, 0x7a, 0xfb, 0xa5, 0x9d, 0x2f, 0x0a, 0x86, 0x8e, 0x74, 0x4a, 0x45, - 0xe8, 0xc6, 0x04, 0x5a, 0x45, 0x10, 0x15, 0x66, 0xa8, 0x65, 0xba, 0x70, 0x28, 0x19, 0xdd, 0xb8, - 0x09, 0x49, 0xde, 0x9b, 0x18, 0x68, 0xf2, 0xc2, 0x7b, 0x2f, 0x4a, 0x7f, 0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 0xa0, 0xca, 0x5f, 0x88, 0x38, - 0xa6, 0x5e, 0x89, 0xbb, 0x26, 0xaa, 0x9c, 0x1c, 0xbe, 0x86, 0xee, 0xa6, 0x18, 0xa6, 0x3f, 0x85, - 0x96, 0x7c, 0x96, 0x36, 0x8d, 0x8a, 0x69, 0x73, 0x5a, 0x9a, 0x2c, 0x17, 0x84, 0xc9, 0xaf, 0x0d, - 0xe8, 0xce, 0x08, 0x7d, 0xef, 0x52, 0xf4, 0x37, 0x22, 0x38, 0x85, 0xce, 0x46, 0x04, 0x57, 0xf9, - 0x3d, 0x7e, 0x19, 0x40, 0xad, 0x1e, 0xc0, 0xd5, 0x9f, 0xc6, 0xef, 0x10, 0x5a, 0x8c, 0xa4, 0xd4, - 0xc7, 0x99, 0x95, 0x2c, 0x7c, 0x9a, 0xad, 0x16, 0xc0, 0x1c, 0xe9, 0x26, 0xdc, 0x8a, 0xd3, 0xc8, - 0xb9, 0x28, 0x6e, 0x80, 0x91, 0xc3, 0xc3, 0x08, 0xb3, 0x3c, 0x69, 0x7b, 0xf6, 0xff, 0x71, 0x1a, - 0xcd, 0xe4, 0xcb, 0xab, 0xec, 0xe1, 0x86, 0x50, 0xee, 0xdf, 0x10, 0xca, 0xe1, 0x47, 0x05, 0xb4, - 0x6c, 0xe1, 0xdf, 0xbd, 0xea, 0xc9, 0xfc, 0x6a, 0xdd, 0x57, 0xbe, 0xac, 0xfb, 0xca, 0xf7, 0x75, - 0x5f, 0xb9, 0xfc, 0xd1, 0xdf, 0x79, 0xf3, 0xf8, 0x37, 0xff, 0xf1, 0xbd, 0xfd, 0xbc, 0x9f, 0xfc, - 0x0c, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xcd, 0xeb, 0x5d, 0x33, 0x06, 0x00, 0x00, -} diff --git a/src/metrics/generated/proto/metricpb/metric.pb.go b/src/metrics/generated/proto/metricpb/metric.pb.go index 6b89c98183..7738ed6e01 100644 --- a/src/metrics/generated/proto/metricpb/metric.pb.go +++ b/src/metrics/generated/proto/metricpb/metric.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/metrics/generated/proto/metricpb/metric.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,19 +23,26 @@ package metricpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import binary "encoding/binary" - -import io "io" +import ( + encoding_binary "encoding/binary" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // 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 + type MetricType int32 const ( @@ -51,6 +58,7 @@ var MetricType_name = map[int32]string{ 2: "TIMER", 3: "GAUGE", } + var MetricType_value = map[string]int32{ "UNKNOWN": 0, "COUNTER": 1, @@ -61,7 +69,10 @@ var MetricType_value = map[string]int32{ func (x MetricType) String() string { return proto.EnumName(MetricType_name, int32(x)) } -func (MetricType) EnumDescriptor() ([]byte, []int) { return fileDescriptorMetric, []int{0} } + +func (MetricType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b4ca5efa4ed9bad3, []int{0} +} type Counter struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -70,10 +81,38 @@ type Counter struct { ClientTimeNanos int64 `protobuf:"varint,4,opt,name=client_time_nanos,json=clientTimeNanos,proto3" json:"client_time_nanos,omitempty"` } -func (m *Counter) Reset() { *m = Counter{} } -func (m *Counter) String() string { return proto.CompactTextString(m) } -func (*Counter) ProtoMessage() {} -func (*Counter) Descriptor() ([]byte, []int) { return fileDescriptorMetric, []int{0} } +func (m *Counter) Reset() { *m = Counter{} } +func (m *Counter) String() string { return proto.CompactTextString(m) } +func (*Counter) ProtoMessage() {} +func (*Counter) Descriptor() ([]byte, []int) { + return fileDescriptor_b4ca5efa4ed9bad3, []int{0} +} +func (m *Counter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Counter.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 *Counter) XXX_Merge(src proto.Message) { + xxx_messageInfo_Counter.Merge(m, src) +} +func (m *Counter) XXX_Size() int { + return m.Size() +} +func (m *Counter) XXX_DiscardUnknown() { + xxx_messageInfo_Counter.DiscardUnknown(m) +} + +var xxx_messageInfo_Counter proto.InternalMessageInfo func (m *Counter) GetId() []byte { if m != nil { @@ -105,15 +144,43 @@ func (m *Counter) GetClientTimeNanos() int64 { type BatchTimer struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Values []float64 `protobuf:"fixed64,2,rep,packed,name=values" json:"values,omitempty"` + Values []float64 `protobuf:"fixed64,2,rep,packed,name=values,proto3" json:"values,omitempty"` Annotation []byte `protobuf:"bytes,3,opt,name=annotation,proto3" json:"annotation,omitempty"` ClientTimeNanos int64 `protobuf:"varint,4,opt,name=client_time_nanos,json=clientTimeNanos,proto3" json:"client_time_nanos,omitempty"` } -func (m *BatchTimer) Reset() { *m = BatchTimer{} } -func (m *BatchTimer) String() string { return proto.CompactTextString(m) } -func (*BatchTimer) ProtoMessage() {} -func (*BatchTimer) Descriptor() ([]byte, []int) { return fileDescriptorMetric, []int{1} } +func (m *BatchTimer) Reset() { *m = BatchTimer{} } +func (m *BatchTimer) String() string { return proto.CompactTextString(m) } +func (*BatchTimer) ProtoMessage() {} +func (*BatchTimer) Descriptor() ([]byte, []int) { + return fileDescriptor_b4ca5efa4ed9bad3, []int{1} +} +func (m *BatchTimer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchTimer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchTimer.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 *BatchTimer) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchTimer.Merge(m, src) +} +func (m *BatchTimer) XXX_Size() int { + return m.Size() +} +func (m *BatchTimer) XXX_DiscardUnknown() { + xxx_messageInfo_BatchTimer.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchTimer proto.InternalMessageInfo func (m *BatchTimer) GetId() []byte { if m != nil { @@ -150,10 +217,38 @@ type Gauge struct { ClientTimeNanos int64 `protobuf:"varint,4,opt,name=client_time_nanos,json=clientTimeNanos,proto3" json:"client_time_nanos,omitempty"` } -func (m *Gauge) Reset() { *m = Gauge{} } -func (m *Gauge) String() string { return proto.CompactTextString(m) } -func (*Gauge) ProtoMessage() {} -func (*Gauge) Descriptor() ([]byte, []int) { return fileDescriptorMetric, []int{2} } +func (m *Gauge) Reset() { *m = Gauge{} } +func (m *Gauge) String() string { return proto.CompactTextString(m) } +func (*Gauge) ProtoMessage() {} +func (*Gauge) Descriptor() ([]byte, []int) { + return fileDescriptor_b4ca5efa4ed9bad3, []int{2} +} +func (m *Gauge) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Gauge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Gauge.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 *Gauge) XXX_Merge(src proto.Message) { + xxx_messageInfo_Gauge.Merge(m, src) +} +func (m *Gauge) XXX_Size() int { + return m.Size() +} +func (m *Gauge) XXX_DiscardUnknown() { + xxx_messageInfo_Gauge.DiscardUnknown(m) +} + +var xxx_messageInfo_Gauge proto.InternalMessageInfo func (m *Gauge) GetId() []byte { if m != nil { @@ -191,10 +286,38 @@ type TimedMetric struct { Annotation []byte `protobuf:"bytes,5,opt,name=annotation,proto3" json:"annotation,omitempty"` } -func (m *TimedMetric) Reset() { *m = TimedMetric{} } -func (m *TimedMetric) String() string { return proto.CompactTextString(m) } -func (*TimedMetric) ProtoMessage() {} -func (*TimedMetric) Descriptor() ([]byte, []int) { return fileDescriptorMetric, []int{3} } +func (m *TimedMetric) Reset() { *m = TimedMetric{} } +func (m *TimedMetric) String() string { return proto.CompactTextString(m) } +func (*TimedMetric) ProtoMessage() {} +func (*TimedMetric) Descriptor() ([]byte, []int) { + return fileDescriptor_b4ca5efa4ed9bad3, []int{3} +} +func (m *TimedMetric) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TimedMetric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TimedMetric.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 *TimedMetric) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimedMetric.Merge(m, src) +} +func (m *TimedMetric) XXX_Size() int { + return m.Size() +} +func (m *TimedMetric) XXX_DiscardUnknown() { + xxx_messageInfo_TimedMetric.DiscardUnknown(m) +} + +var xxx_messageInfo_TimedMetric proto.InternalMessageInfo func (m *TimedMetric) GetType() MetricType { if m != nil { @@ -237,16 +360,44 @@ type ForwardedMetric struct { TimeNanos int64 `protobuf:"varint,3,opt,name=time_nanos,json=timeNanos,proto3" json:"time_nanos,omitempty"` // values and prev_values are the same length. a given index to the arrays // gives the tuple (value, prev_value) for a given forwarded value. - Values []float64 `protobuf:"fixed64,4,rep,packed,name=values" json:"values,omitempty"` - PrevValues []float64 `protobuf:"fixed64,6,rep,packed,name=prev_values,json=prevValues" json:"prev_values,omitempty"` + Values []float64 `protobuf:"fixed64,4,rep,packed,name=values,proto3" json:"values,omitempty"` + PrevValues []float64 `protobuf:"fixed64,6,rep,packed,name=prev_values,json=prevValues,proto3" json:"prev_values,omitempty"` Annotation []byte `protobuf:"bytes,5,opt,name=annotation,proto3" json:"annotation,omitempty"` Version uint32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` } -func (m *ForwardedMetric) Reset() { *m = ForwardedMetric{} } -func (m *ForwardedMetric) String() string { return proto.CompactTextString(m) } -func (*ForwardedMetric) ProtoMessage() {} -func (*ForwardedMetric) Descriptor() ([]byte, []int) { return fileDescriptorMetric, []int{4} } +func (m *ForwardedMetric) Reset() { *m = ForwardedMetric{} } +func (m *ForwardedMetric) String() string { return proto.CompactTextString(m) } +func (*ForwardedMetric) ProtoMessage() {} +func (*ForwardedMetric) Descriptor() ([]byte, []int) { + return fileDescriptor_b4ca5efa4ed9bad3, []int{4} +} +func (m *ForwardedMetric) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ForwardedMetric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ForwardedMetric.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 *ForwardedMetric) XXX_Merge(src proto.Message) { + xxx_messageInfo_ForwardedMetric.Merge(m, src) +} +func (m *ForwardedMetric) XXX_Size() int { + return m.Size() +} +func (m *ForwardedMetric) XXX_DiscardUnknown() { + xxx_messageInfo_ForwardedMetric.DiscardUnknown(m) +} + +var xxx_messageInfo_ForwardedMetric proto.InternalMessageInfo func (m *ForwardedMetric) GetType() MetricType { if m != nil { @@ -302,10 +453,38 @@ type Tag struct { Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *Tag) Reset() { *m = Tag{} } -func (m *Tag) String() string { return proto.CompactTextString(m) } -func (*Tag) ProtoMessage() {} -func (*Tag) Descriptor() ([]byte, []int) { return fileDescriptorMetric, []int{5} } +func (m *Tag) Reset() { *m = Tag{} } +func (m *Tag) String() string { return proto.CompactTextString(m) } +func (*Tag) ProtoMessage() {} +func (*Tag) Descriptor() ([]byte, []int) { + return fileDescriptor_b4ca5efa4ed9bad3, []int{5} +} +func (m *Tag) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Tag.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 *Tag) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tag.Merge(m, src) +} +func (m *Tag) XXX_Size() int { + return m.Size() +} +func (m *Tag) XXX_DiscardUnknown() { + xxx_messageInfo_Tag.DiscardUnknown(m) +} + +var xxx_messageInfo_Tag proto.InternalMessageInfo func (m *Tag) GetName() []byte { if m != nil { @@ -322,18 +501,56 @@ func (m *Tag) GetValue() []byte { } func init() { + proto.RegisterEnum("metricpb.MetricType", MetricType_name, MetricType_value) proto.RegisterType((*Counter)(nil), "metricpb.Counter") proto.RegisterType((*BatchTimer)(nil), "metricpb.BatchTimer") proto.RegisterType((*Gauge)(nil), "metricpb.Gauge") proto.RegisterType((*TimedMetric)(nil), "metricpb.TimedMetric") proto.RegisterType((*ForwardedMetric)(nil), "metricpb.ForwardedMetric") proto.RegisterType((*Tag)(nil), "metricpb.Tag") - proto.RegisterEnum("metricpb.MetricType", MetricType_name, MetricType_value) } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/metricpb/metric.proto", fileDescriptor_b4ca5efa4ed9bad3) +} + +var fileDescriptor_b4ca5efa4ed9bad3 = []byte{ + // 452 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 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c, + 0x63, 0xe2, 0x1e, 0x74, 0x67, 0xfe, 0x6b, 0xff, 0xfc, 0x9d, 0xdf, 0x6f, 0x55, 0xe0, 0xf4, 0x7c, + 0xe6, 0x87, 0x93, 0xa0, 0x8f, 0xf0, 0x1e, 0xb4, 0xc3, 0x57, 0x67, 0x93, 0xa0, 0x6f, 0x54, 0xe3, + 0xf4, 0xf9, 0x6c, 0x3a, 0xe9, 0x9b, 0x27, 0x6f, 0xbe, 0xae, 0x1c, 0x74, 0xb5, 0x72, 0xd0, 0x8f, + 0x95, 0x83, 0x3e, 0xaf, 0x9d, 0xd6, 0xd5, 0xda, 0x69, 0x7d, 0x5b, 0x3b, 0xad, 0xf7, 0x4f, 0xff, + 0xf3, 0x97, 0x8e, 0x3a, 0x1a, 0x8f, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x91, 0xb5, 0x4f, 0x68, + 0x14, 0x04, 0x00, 0x00, +} + func (m *Counter) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -341,39 +558,46 @@ func (m *Counter) Marshal() (dAtA []byte, err error) { } func (m *Counter) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Counter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintMetric(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if m.Value != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintMetric(dAtA, i, uint64(m.Value)) + if m.ClientTimeNanos != 0 { + i = encodeVarintMetric(dAtA, i, uint64(m.ClientTimeNanos)) + i-- + dAtA[i] = 0x20 } if len(m.Annotation) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Annotation) + copy(dAtA[i:], m.Annotation) i = encodeVarintMetric(dAtA, i, uint64(len(m.Annotation))) - i += copy(dAtA[i:], m.Annotation) + i-- + dAtA[i] = 0x1a } - if m.ClientTimeNanos != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintMetric(dAtA, i, uint64(m.ClientTimeNanos)) + if m.Value != 0 { + i = encodeVarintMetric(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintMetric(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *BatchTimer) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -381,44 +605,51 @@ func (m *BatchTimer) Marshal() (dAtA []byte, err error) { } func (m *BatchTimer) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchTimer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintMetric(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if len(m.Values) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintMetric(dAtA, i, uint64(len(m.Values)*8)) - for _, num := range m.Values { - f1 := math.Float64bits(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) - i += 8 - } + if m.ClientTimeNanos != 0 { + i = encodeVarintMetric(dAtA, i, uint64(m.ClientTimeNanos)) + i-- + dAtA[i] = 0x20 } if len(m.Annotation) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Annotation) + copy(dAtA[i:], m.Annotation) i = encodeVarintMetric(dAtA, i, uint64(len(m.Annotation))) - i += copy(dAtA[i:], m.Annotation) + i-- + dAtA[i] = 0x1a } - if m.ClientTimeNanos != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintMetric(dAtA, i, uint64(m.ClientTimeNanos)) + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + f1 := math.Float64bits(float64(m.Values[iNdEx])) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + } + i = encodeVarintMetric(dAtA, i, uint64(len(m.Values)*8)) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintMetric(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Gauge) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -426,40 +657,47 @@ func (m *Gauge) Marshal() (dAtA []byte, err error) { } func (m *Gauge) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Gauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintMetric(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if m.Value != 0 { - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i += 8 + if m.ClientTimeNanos != 0 { + i = encodeVarintMetric(dAtA, i, uint64(m.ClientTimeNanos)) + i-- + dAtA[i] = 0x20 } if len(m.Annotation) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Annotation) + copy(dAtA[i:], m.Annotation) i = encodeVarintMetric(dAtA, i, uint64(len(m.Annotation))) - i += copy(dAtA[i:], m.Annotation) + i-- + dAtA[i] = 0x1a } - if m.ClientTimeNanos != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintMetric(dAtA, i, uint64(m.ClientTimeNanos)) + if m.Value != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) + i-- + dAtA[i] = 0x11 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintMetric(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *TimedMetric) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -467,45 +705,52 @@ func (m *TimedMetric) Marshal() (dAtA []byte, err error) { } func (m *TimedMetric) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TimedMetric) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintMetric(dAtA, i, uint64(m.Type)) + if len(m.Annotation) > 0 { + i -= len(m.Annotation) + copy(dAtA[i:], m.Annotation) + i = encodeVarintMetric(dAtA, i, uint64(len(m.Annotation))) + i-- + dAtA[i] = 0x2a } - if len(m.Id) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintMetric(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) + if m.Value != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) + i-- + dAtA[i] = 0x21 } if m.TimeNanos != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintMetric(dAtA, i, uint64(m.TimeNanos)) + i-- + dAtA[i] = 0x18 } - if m.Value != 0 { - dAtA[i] = 0x21 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i += 8 + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintMetric(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x12 } - if len(m.Annotation) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintMetric(dAtA, i, uint64(len(m.Annotation))) - i += copy(dAtA[i:], m.Annotation) + if m.Type != 0 { + i = encodeVarintMetric(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *ForwardedMetric) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -513,64 +758,71 @@ func (m *ForwardedMetric) Marshal() (dAtA []byte, err error) { } func (m *ForwardedMetric) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ForwardedMetric) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintMetric(dAtA, i, uint64(m.Type)) - } - if len(m.Id) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintMetric(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if m.TimeNanos != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintMetric(dAtA, i, uint64(m.TimeNanos)) + if m.Version != 0 { + i = encodeVarintMetric(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x38 } - if len(m.Values) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintMetric(dAtA, i, uint64(len(m.Values)*8)) - for _, num := range m.Values { - f2 := math.Float64bits(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f2)) - i += 8 + if len(m.PrevValues) > 0 { + for iNdEx := len(m.PrevValues) - 1; iNdEx >= 0; iNdEx-- { + f2 := math.Float64bits(float64(m.PrevValues[iNdEx])) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f2)) } + i = encodeVarintMetric(dAtA, i, uint64(len(m.PrevValues)*8)) + i-- + dAtA[i] = 0x32 } if len(m.Annotation) > 0 { - dAtA[i] = 0x2a - i++ + i -= len(m.Annotation) + copy(dAtA[i:], m.Annotation) i = encodeVarintMetric(dAtA, i, uint64(len(m.Annotation))) - i += copy(dAtA[i:], m.Annotation) + i-- + dAtA[i] = 0x2a } - if len(m.PrevValues) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintMetric(dAtA, i, uint64(len(m.PrevValues)*8)) - for _, num := range m.PrevValues { - f3 := math.Float64bits(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f3)) - i += 8 + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + f3 := math.Float64bits(float64(m.Values[iNdEx])) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f3)) } + i = encodeVarintMetric(dAtA, i, uint64(len(m.Values)*8)) + i-- + dAtA[i] = 0x22 } - if m.Version != 0 { - dAtA[i] = 0x38 - i++ - i = encodeVarintMetric(dAtA, i, uint64(m.Version)) + if m.TimeNanos != 0 { + i = encodeVarintMetric(dAtA, i, uint64(m.TimeNanos)) + i-- + dAtA[i] = 0x18 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintMetric(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x12 } - return i, nil + if m.Type != 0 { + i = encodeVarintMetric(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *Tag) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -578,35 +830,47 @@ func (m *Tag) Marshal() (dAtA []byte, err error) { } func (m *Tag) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Tag) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintMetric(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Value) + copy(dAtA[i:], m.Value) i = encodeVarintMetric(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintMetric(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintMetric(dAtA []byte, offset int, v uint64) int { + offset -= sovMetric(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Counter) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Id) @@ -627,6 +891,9 @@ func (m *Counter) Size() (n int) { } func (m *BatchTimer) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Id) @@ -647,6 +914,9 @@ func (m *BatchTimer) Size() (n int) { } func (m *Gauge) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Id) @@ -667,6 +937,9 @@ func (m *Gauge) Size() (n int) { } func (m *TimedMetric) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -690,6 +963,9 @@ func (m *TimedMetric) Size() (n int) { } func (m *ForwardedMetric) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -719,6 +995,9 @@ func (m *ForwardedMetric) Size() (n int) { } func (m *Tag) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -733,14 +1012,7 @@ func (m *Tag) Size() (n int) { } func sovMetric(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozMetric(x uint64) (n int) { return sovMetric(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -760,7 +1032,7 @@ func (m *Counter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -788,7 +1060,7 @@ func (m *Counter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -797,6 +1069,9 @@ func (m *Counter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -819,7 +1094,7 @@ func (m *Counter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Value |= (int64(b) & 0x7F) << shift + m.Value |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -838,7 +1113,7 @@ func (m *Counter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -847,6 +1122,9 @@ func (m *Counter) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -869,7 +1147,7 @@ func (m *Counter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ClientTimeNanos |= (int64(b) & 0x7F) << shift + m.ClientTimeNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -880,7 +1158,7 @@ func (m *Counter) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMetric } if (iNdEx + skippy) > l { @@ -910,7 +1188,7 @@ func (m *BatchTimer) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -938,7 +1216,7 @@ func (m *BatchTimer) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -947,6 +1225,9 @@ func (m *BatchTimer) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -961,7 +1242,7 @@ func (m *BatchTimer) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.Values = append(m.Values, v2) @@ -976,7 +1257,7 @@ func (m *BatchTimer) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -985,15 +1266,23 @@ func (m *BatchTimer) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Values) == 0 { + m.Values = make([]float64, 0, elementCount) + } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.Values = append(m.Values, v2) @@ -1015,7 +1304,7 @@ func (m *BatchTimer) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1024,6 +1313,9 @@ func (m *BatchTimer) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1046,7 +1338,7 @@ func (m *BatchTimer) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ClientTimeNanos |= (int64(b) & 0x7F) << shift + m.ClientTimeNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1057,7 +1349,7 @@ func (m *BatchTimer) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMetric } if (iNdEx + skippy) > l { @@ -1087,7 +1379,7 @@ func (m *Gauge) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1115,7 +1407,7 @@ func (m *Gauge) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1124,6 +1416,9 @@ func (m *Gauge) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1140,7 +1435,7 @@ func (m *Gauge) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.Value = float64(math.Float64frombits(v)) case 3: @@ -1157,7 +1452,7 @@ func (m *Gauge) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1166,6 +1461,9 @@ func (m *Gauge) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1188,7 +1486,7 @@ func (m *Gauge) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ClientTimeNanos |= (int64(b) & 0x7F) << shift + m.ClientTimeNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1199,7 +1497,7 @@ func (m *Gauge) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMetric } if (iNdEx + skippy) > l { @@ -1229,7 +1527,7 @@ func (m *TimedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1257,7 +1555,7 @@ func (m *TimedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (MetricType(b) & 0x7F) << shift + m.Type |= MetricType(b&0x7F) << shift if b < 0x80 { break } @@ -1276,7 +1574,7 @@ func (m *TimedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1285,6 +1583,9 @@ func (m *TimedMetric) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1307,7 +1608,7 @@ func (m *TimedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TimeNanos |= (int64(b) & 0x7F) << shift + m.TimeNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1320,7 +1621,7 @@ func (m *TimedMetric) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.Value = float64(math.Float64frombits(v)) case 5: @@ -1337,7 +1638,7 @@ func (m *TimedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1346,6 +1647,9 @@ func (m *TimedMetric) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1360,7 +1664,7 @@ func (m *TimedMetric) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMetric } if (iNdEx + skippy) > l { @@ -1390,7 +1694,7 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1418,7 +1722,7 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (MetricType(b) & 0x7F) << shift + m.Type |= MetricType(b&0x7F) << shift if b < 0x80 { break } @@ -1437,7 +1741,7 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1446,6 +1750,9 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1468,7 +1775,7 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TimeNanos |= (int64(b) & 0x7F) << shift + m.TimeNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1479,7 +1786,7 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.Values = append(m.Values, v2) @@ -1494,7 +1801,7 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1503,15 +1810,23 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Values) == 0 { + m.Values = make([]float64, 0, elementCount) + } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.Values = append(m.Values, v2) @@ -1533,7 +1848,7 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1542,6 +1857,9 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1556,7 +1874,7 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PrevValues = append(m.PrevValues, v2) @@ -1571,7 +1889,7 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1580,15 +1898,23 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.PrevValues) == 0 { + m.PrevValues = make([]float64, 0, elementCount) + } for iNdEx < postIndex { var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 v2 := float64(math.Float64frombits(v)) m.PrevValues = append(m.PrevValues, v2) @@ -1610,7 +1936,7 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Version |= (uint32(b) & 0x7F) << shift + m.Version |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1621,7 +1947,7 @@ func (m *ForwardedMetric) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMetric } if (iNdEx + skippy) > l { @@ -1651,7 +1977,7 @@ func (m *Tag) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1679,7 +2005,7 @@ func (m *Tag) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1688,6 +2014,9 @@ func (m *Tag) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1710,7 +2039,7 @@ func (m *Tag) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1719,6 +2048,9 @@ func (m *Tag) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetric } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMetric + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1733,7 +2065,7 @@ func (m *Tag) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMetric } if (iNdEx + skippy) > l { @@ -1751,6 +2083,7 @@ func (m *Tag) Unmarshal(dAtA []byte) error { func skipMetric(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1782,10 +2115,8 @@ func skipMetric(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1802,89 +2133,34 @@ func skipMetric(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthMetric } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetric - } - 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 := skipMetric(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMetric + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthMetric + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthMetric = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetric = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthMetric = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMetric = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMetric = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/metricpb/metric.proto", fileDescriptorMetric) -} - -var fileDescriptorMetric = []byte{ - // 444 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0xc1, 0x6e, 0xd3, 0x40, - 0x14, 0xec, 0xda, 0x4e, 0x42, 0x5f, 0x4a, 0x1b, 0x56, 0x15, 0xf2, 0x05, 0x13, 0xe5, 0x64, 0xf5, - 0x60, 0x4b, 0xe4, 0xc0, 0x85, 0x0b, 0x2d, 0x21, 0xaa, 0x50, 0x5d, 0xc9, 0x72, 0x40, 0xe2, 0x12, - 0xad, 0xed, 0x95, 0xbb, 0x52, 0xbd, 0x6b, 0xad, 0xd7, 0x41, 0x11, 0x17, 0x3e, 0x81, 0x0f, 0xe0, - 0x83, 0x38, 0xf2, 0x03, 0x48, 0x28, 0xfc, 0x08, 0xf2, 0xda, 0x26, 0x85, 0x8a, 0x1e, 0x50, 0x73, - 0x7b, 0x33, 0xbb, 0x6f, 0x67, 0xc6, 0x23, 0xc3, 0xab, 0x8c, 0xa9, 0xab, 0x2a, 0xf6, 0x12, 0x91, - 0xfb, 0xf9, 0x34, 0x8d, 0xfd, 0x7c, 0xea, 0x97, 0x32, 0xf1, 0x73, 0xaa, 0x24, 0x4b, 0x4a, 0x3f, - 0xa3, 0x9c, 0x4a, 0xa2, 0x68, 0xea, 0x17, 0x52, 0x28, 0xd1, 0xf2, 0x45, 0xdc, 0x0e, 0x9e, 0x66, - 0xf1, 0x83, 0x8e, 0x9e, 0x7c, 0x84, 0xc1, 0x99, 0xa8, 0xb8, 0xa2, 0x12, 0x1f, 0x82, 0xc1, 0x52, - 0x1b, 0x8d, 0x91, 0x7b, 0x10, 0x1a, 0x2c, 0xc5, 0xc7, 0xd0, 0x5b, 0x91, 0xeb, 0x8a, 0xda, 0xc6, - 0x18, 0xb9, 0x66, 0xd8, 0x00, 0xec, 0x00, 0x10, 0xce, 0x85, 0x22, 0x8a, 0x09, 0x6e,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, 0x5e, 0xcf, 0x7f, 0x76, 0x7f, 0xd0, 0x7e, 0xb0, 0x93, 0x17, 0x00, 0xdb, 0x98, - 0x78, 0x08, 0x83, 0x45, 0xf0, 0x26, 0xb8, 0x7c, 0x17, 0x8c, 0xf6, 0x6a, 0x70, 0x76, 0xb9, 0x08, - 0xa2, 0x59, 0x38, 0x42, 0x78, 0x1f, 0x7a, 0xd1, 0xf9, 0xc5, 0x2c, 0x1c, 0x19, 0xf5, 0x38, 0x7f, - 0xb9, 0x98, 0xcf, 0x46, 0xe6, 0xe9, 0xf9, 0xd7, 0x8d, 0x83, 0xbe, 0x6d, 0x1c, 0xf4, 0x63, 0xe3, - 0xa0, 0xcf, 0x3f, 0x9d, 0xbd, 0xf7, 0xcf, 0xff, 0xf3, 0x57, 0x8e, 0xfb, 0x1a, 0x4f, 0x7f, 0x05, - 0x00, 0x00, 0xff, 0xff, 0x42, 0xaf, 0x37, 0x39, 0x0c, 0x04, 0x00, 0x00, -} diff --git a/src/metrics/generated/proto/pipelinepb/pipeline.pb.go b/src/metrics/generated/proto/pipelinepb/pipeline.pb.go index e5e3381e5a..b8f1226a50 100644 --- a/src/metrics/generated/proto/pipelinepb/pipeline.pb.go +++ b/src/metrics/generated/proto/pipelinepb/pipeline.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/metrics/generated/proto/pipelinepb/pipeline.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,32 +21,18 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package pipelinepb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/metrics/generated/proto/pipelinepb/pipeline.proto - - It has these top-level messages: - AggregationOp - TransformationOp - RollupOp - PipelineOp - Pipeline - AppliedRollupOp - AppliedPipelineOp - AppliedPipeline -*/ package pipelinepb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import aggregationpb "github.com/m3db/m3/src/metrics/generated/proto/aggregationpb" -import transformationpb "github.com/m3db/m3/src/metrics/generated/proto/transformationpb" - -import io "io" +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + aggregationpb "github.com/m3db/m3/src/metrics/generated/proto/aggregationpb" + transformationpb "github.com/m3db/m3/src/metrics/generated/proto/transformationpb" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -57,7 +43,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type RollupOp_Type int32 @@ -70,6 +56,7 @@ var RollupOp_Type_name = map[int32]string{ 0: "GROUP_BY", 1: "EXCLUDE_BY", } + var RollupOp_Type_value = map[string]int32{ "GROUP_BY": 0, "EXCLUDE_BY": 1, @@ -78,7 +65,10 @@ var RollupOp_Type_value = map[string]int32{ func (x RollupOp_Type) String() string { return proto.EnumName(RollupOp_Type_name, int32(x)) } -func (RollupOp_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorPipeline, []int{2, 0} } + +func (RollupOp_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e4f84148e5f9ffe5, []int{2, 0} +} type PipelineOp_Type int32 @@ -95,6 +85,7 @@ var PipelineOp_Type_name = map[int32]string{ 2: "TRANSFORMATION", 3: "ROLLUP", } + var PipelineOp_Type_value = map[string]int32{ "UNKNOWN": 0, "AGGREGATION": 1, @@ -105,7 +96,10 @@ var PipelineOp_Type_value = map[string]int32{ func (x PipelineOp_Type) String() string { return proto.EnumName(PipelineOp_Type_name, int32(x)) } -func (PipelineOp_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorPipeline, []int{3, 0} } + +func (PipelineOp_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e4f84148e5f9ffe5, []int{3, 0} +} type AppliedPipelineOp_Type int32 @@ -120,6 +114,7 @@ var AppliedPipelineOp_Type_name = map[int32]string{ 1: "TRANSFORMATION", 2: "ROLLUP", } + var AppliedPipelineOp_Type_value = map[string]int32{ "UNKNOWN": 0, "TRANSFORMATION": 1, @@ -129,18 +124,47 @@ var AppliedPipelineOp_Type_value = map[string]int32{ func (x AppliedPipelineOp_Type) String() string { return proto.EnumName(AppliedPipelineOp_Type_name, int32(x)) } + func (AppliedPipelineOp_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptorPipeline, []int{6, 0} + return fileDescriptor_e4f84148e5f9ffe5, []int{6, 0} } type AggregationOp struct { Type aggregationpb.AggregationType `protobuf:"varint,1,opt,name=type,proto3,enum=aggregationpb.AggregationType" json:"type,omitempty"` } -func (m *AggregationOp) Reset() { *m = AggregationOp{} } -func (m *AggregationOp) String() string { return proto.CompactTextString(m) } -func (*AggregationOp) ProtoMessage() {} -func (*AggregationOp) Descriptor() ([]byte, []int) { return fileDescriptorPipeline, []int{0} } +func (m *AggregationOp) Reset() { *m = AggregationOp{} } +func (m *AggregationOp) String() string { return proto.CompactTextString(m) } +func (*AggregationOp) ProtoMessage() {} +func (*AggregationOp) Descriptor() ([]byte, []int) { + return fileDescriptor_e4f84148e5f9ffe5, []int{0} +} +func (m *AggregationOp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AggregationOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AggregationOp.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 *AggregationOp) XXX_Merge(src proto.Message) { + xxx_messageInfo_AggregationOp.Merge(m, src) +} +func (m *AggregationOp) XXX_Size() int { + return m.Size() +} +func (m *AggregationOp) XXX_DiscardUnknown() { + xxx_messageInfo_AggregationOp.DiscardUnknown(m) +} + +var xxx_messageInfo_AggregationOp proto.InternalMessageInfo func (m *AggregationOp) GetType() aggregationpb.AggregationType { if m != nil { @@ -153,10 +177,38 @@ type TransformationOp struct { Type transformationpb.TransformationType `protobuf:"varint,1,opt,name=type,proto3,enum=transformationpb.TransformationType" json:"type,omitempty"` } -func (m *TransformationOp) Reset() { *m = TransformationOp{} } -func (m *TransformationOp) String() string { return proto.CompactTextString(m) } -func (*TransformationOp) ProtoMessage() {} -func (*TransformationOp) Descriptor() ([]byte, []int) { return fileDescriptorPipeline, []int{1} } +func (m *TransformationOp) Reset() { *m = TransformationOp{} } +func (m *TransformationOp) String() string { return proto.CompactTextString(m) } +func (*TransformationOp) ProtoMessage() {} +func (*TransformationOp) Descriptor() ([]byte, []int) { + return fileDescriptor_e4f84148e5f9ffe5, []int{1} +} +func (m *TransformationOp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TransformationOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TransformationOp.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 *TransformationOp) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransformationOp.Merge(m, src) +} +func (m *TransformationOp) XXX_Size() int { + return m.Size() +} +func (m *TransformationOp) XXX_DiscardUnknown() { + xxx_messageInfo_TransformationOp.DiscardUnknown(m) +} + +var xxx_messageInfo_TransformationOp proto.InternalMessageInfo func (m *TransformationOp) GetType() transformationpb.TransformationType { if m != nil { @@ -167,15 +219,43 @@ func (m *TransformationOp) GetType() transformationpb.TransformationType { type RollupOp struct { NewName string `protobuf:"bytes,1,opt,name=new_name,json=newName,proto3" json:"new_name,omitempty"` - Tags []string `protobuf:"bytes,2,rep,name=tags" json:"tags,omitempty"` - AggregationTypes []aggregationpb.AggregationType `protobuf:"varint,3,rep,packed,name=aggregation_types,json=aggregationTypes,enum=aggregationpb.AggregationType" json:"aggregation_types,omitempty"` + Tags []string `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"` + AggregationTypes []aggregationpb.AggregationType `protobuf:"varint,3,rep,packed,name=aggregation_types,json=aggregationTypes,proto3,enum=aggregationpb.AggregationType" json:"aggregation_types,omitempty"` Type RollupOp_Type `protobuf:"varint,4,opt,name=type,proto3,enum=pipelinepb.RollupOp_Type" json:"type,omitempty"` } -func (m *RollupOp) Reset() { *m = RollupOp{} } -func (m *RollupOp) String() string { return proto.CompactTextString(m) } -func (*RollupOp) ProtoMessage() {} -func (*RollupOp) Descriptor() ([]byte, []int) { return fileDescriptorPipeline, []int{2} } +func (m *RollupOp) Reset() { *m = RollupOp{} } +func (m *RollupOp) String() string { return proto.CompactTextString(m) } +func (*RollupOp) ProtoMessage() {} +func (*RollupOp) Descriptor() ([]byte, []int) { + return fileDescriptor_e4f84148e5f9ffe5, []int{2} +} +func (m *RollupOp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RollupOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RollupOp.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 *RollupOp) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollupOp.Merge(m, src) +} +func (m *RollupOp) XXX_Size() int { + return m.Size() +} +func (m *RollupOp) XXX_DiscardUnknown() { + xxx_messageInfo_RollupOp.DiscardUnknown(m) +} + +var xxx_messageInfo_RollupOp proto.InternalMessageInfo func (m *RollupOp) GetNewName() string { if m != nil { @@ -207,15 +287,43 @@ func (m *RollupOp) GetType() RollupOp_Type { type PipelineOp struct { Type PipelineOp_Type `protobuf:"varint,1,opt,name=type,proto3,enum=pipelinepb.PipelineOp_Type" json:"type,omitempty"` - Aggregation *AggregationOp `protobuf:"bytes,2,opt,name=aggregation" json:"aggregation,omitempty"` - Transformation *TransformationOp `protobuf:"bytes,3,opt,name=transformation" json:"transformation,omitempty"` - Rollup *RollupOp `protobuf:"bytes,4,opt,name=rollup" json:"rollup,omitempty"` + Aggregation *AggregationOp `protobuf:"bytes,2,opt,name=aggregation,proto3" json:"aggregation,omitempty"` + Transformation *TransformationOp `protobuf:"bytes,3,opt,name=transformation,proto3" json:"transformation,omitempty"` + Rollup *RollupOp `protobuf:"bytes,4,opt,name=rollup,proto3" json:"rollup,omitempty"` +} + +func (m *PipelineOp) Reset() { *m = PipelineOp{} } +func (m *PipelineOp) String() string { return proto.CompactTextString(m) } +func (*PipelineOp) ProtoMessage() {} +func (*PipelineOp) Descriptor() ([]byte, []int) { + return fileDescriptor_e4f84148e5f9ffe5, []int{3} +} +func (m *PipelineOp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PipelineOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PipelineOp.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 *PipelineOp) XXX_Merge(src proto.Message) { + xxx_messageInfo_PipelineOp.Merge(m, src) +} +func (m *PipelineOp) XXX_Size() int { + return m.Size() +} +func (m *PipelineOp) XXX_DiscardUnknown() { + xxx_messageInfo_PipelineOp.DiscardUnknown(m) } -func (m *PipelineOp) Reset() { *m = PipelineOp{} } -func (m *PipelineOp) String() string { return proto.CompactTextString(m) } -func (*PipelineOp) ProtoMessage() {} -func (*PipelineOp) Descriptor() ([]byte, []int) { return fileDescriptorPipeline, []int{3} } +var xxx_messageInfo_PipelineOp proto.InternalMessageInfo func (m *PipelineOp) GetType() PipelineOp_Type { if m != nil { @@ -246,13 +354,41 @@ func (m *PipelineOp) GetRollup() *RollupOp { } type Pipeline struct { - Ops []PipelineOp `protobuf:"bytes,1,rep,name=ops" json:"ops"` + Ops []PipelineOp `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops"` } -func (m *Pipeline) Reset() { *m = Pipeline{} } -func (m *Pipeline) String() string { return proto.CompactTextString(m) } -func (*Pipeline) ProtoMessage() {} -func (*Pipeline) Descriptor() ([]byte, []int) { return fileDescriptorPipeline, []int{4} } +func (m *Pipeline) Reset() { *m = Pipeline{} } +func (m *Pipeline) String() string { return proto.CompactTextString(m) } +func (*Pipeline) ProtoMessage() {} +func (*Pipeline) Descriptor() ([]byte, []int) { + return fileDescriptor_e4f84148e5f9ffe5, []int{4} +} +func (m *Pipeline) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Pipeline) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Pipeline.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 *Pipeline) XXX_Merge(src proto.Message) { + xxx_messageInfo_Pipeline.Merge(m, src) +} +func (m *Pipeline) XXX_Size() int { + return m.Size() +} +func (m *Pipeline) XXX_DiscardUnknown() { + xxx_messageInfo_Pipeline.DiscardUnknown(m) +} + +var xxx_messageInfo_Pipeline proto.InternalMessageInfo func (m *Pipeline) GetOps() []PipelineOp { if m != nil { @@ -265,13 +401,41 @@ func (m *Pipeline) GetOps() []PipelineOp { // applied against a metric. type AppliedRollupOp struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - AggregationId aggregationpb.AggregationID `protobuf:"bytes,2,opt,name=aggregation_id,json=aggregationId" json:"aggregation_id"` + AggregationId aggregationpb.AggregationID `protobuf:"bytes,2,opt,name=aggregation_id,json=aggregationId,proto3" json:"aggregation_id"` +} + +func (m *AppliedRollupOp) Reset() { *m = AppliedRollupOp{} } +func (m *AppliedRollupOp) String() string { return proto.CompactTextString(m) } +func (*AppliedRollupOp) ProtoMessage() {} +func (*AppliedRollupOp) Descriptor() ([]byte, []int) { + return fileDescriptor_e4f84148e5f9ffe5, []int{5} +} +func (m *AppliedRollupOp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AppliedRollupOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AppliedRollupOp.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 *AppliedRollupOp) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppliedRollupOp.Merge(m, src) +} +func (m *AppliedRollupOp) XXX_Size() int { + return m.Size() +} +func (m *AppliedRollupOp) XXX_DiscardUnknown() { + xxx_messageInfo_AppliedRollupOp.DiscardUnknown(m) } -func (m *AppliedRollupOp) Reset() { *m = AppliedRollupOp{} } -func (m *AppliedRollupOp) String() string { return proto.CompactTextString(m) } -func (*AppliedRollupOp) ProtoMessage() {} -func (*AppliedRollupOp) Descriptor() ([]byte, []int) { return fileDescriptorPipeline, []int{5} } +var xxx_messageInfo_AppliedRollupOp proto.InternalMessageInfo func (m *AppliedRollupOp) GetId() []byte { if m != nil { @@ -291,14 +455,42 @@ func (m *AppliedRollupOp) GetAggregationId() aggregationpb.AggregationID { // been applied against a metric. type AppliedPipelineOp struct { Type AppliedPipelineOp_Type `protobuf:"varint,1,opt,name=type,proto3,enum=pipelinepb.AppliedPipelineOp_Type" json:"type,omitempty"` - Transformation TransformationOp `protobuf:"bytes,2,opt,name=transformation" json:"transformation"` - Rollup AppliedRollupOp `protobuf:"bytes,3,opt,name=rollup" json:"rollup"` + Transformation TransformationOp `protobuf:"bytes,2,opt,name=transformation,proto3" json:"transformation"` + Rollup AppliedRollupOp `protobuf:"bytes,3,opt,name=rollup,proto3" json:"rollup"` +} + +func (m *AppliedPipelineOp) Reset() { *m = AppliedPipelineOp{} } +func (m *AppliedPipelineOp) String() string { return proto.CompactTextString(m) } +func (*AppliedPipelineOp) ProtoMessage() {} +func (*AppliedPipelineOp) Descriptor() ([]byte, []int) { + return fileDescriptor_e4f84148e5f9ffe5, []int{6} +} +func (m *AppliedPipelineOp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AppliedPipelineOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AppliedPipelineOp.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 *AppliedPipelineOp) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppliedPipelineOp.Merge(m, src) +} +func (m *AppliedPipelineOp) XXX_Size() int { + return m.Size() +} +func (m *AppliedPipelineOp) XXX_DiscardUnknown() { + xxx_messageInfo_AppliedPipelineOp.DiscardUnknown(m) } -func (m *AppliedPipelineOp) Reset() { *m = AppliedPipelineOp{} } -func (m *AppliedPipelineOp) String() string { return proto.CompactTextString(m) } -func (*AppliedPipelineOp) ProtoMessage() {} -func (*AppliedPipelineOp) Descriptor() ([]byte, []int) { return fileDescriptorPipeline, []int{6} } +var xxx_messageInfo_AppliedPipelineOp proto.InternalMessageInfo func (m *AppliedPipelineOp) GetType() AppliedPipelineOp_Type { if m != nil { @@ -324,13 +516,41 @@ func (m *AppliedPipelineOp) GetRollup() AppliedRollupOp { // AppliedPipelineOp is a pipeline containing operations // that have been applied against a metric. type AppliedPipeline struct { - Ops []AppliedPipelineOp `protobuf:"bytes,1,rep,name=ops" json:"ops"` + Ops []AppliedPipelineOp `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops"` } -func (m *AppliedPipeline) Reset() { *m = AppliedPipeline{} } -func (m *AppliedPipeline) String() string { return proto.CompactTextString(m) } -func (*AppliedPipeline) ProtoMessage() {} -func (*AppliedPipeline) Descriptor() ([]byte, []int) { return fileDescriptorPipeline, []int{7} } +func (m *AppliedPipeline) Reset() { *m = AppliedPipeline{} } +func (m *AppliedPipeline) String() string { return proto.CompactTextString(m) } +func (*AppliedPipeline) ProtoMessage() {} +func (*AppliedPipeline) Descriptor() ([]byte, []int) { + return fileDescriptor_e4f84148e5f9ffe5, []int{7} +} +func (m *AppliedPipeline) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppliedPipeline.Unmarshal(m, b) +} +func (m *AppliedPipeline) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AppliedPipeline.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 *AppliedPipeline) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppliedPipeline.Merge(m, src) +} +func (m *AppliedPipeline) XXX_Size() int { + return m.Size() +} +func (m *AppliedPipeline) XXX_DiscardUnknown() { + xxx_messageInfo_AppliedPipeline.DiscardUnknown(m) +} + +var xxx_messageInfo_AppliedPipeline proto.InternalMessageInfo func (m *AppliedPipeline) GetOps() []AppliedPipelineOp { if m != nil { @@ -340,6 +560,9 @@ func (m *AppliedPipeline) GetOps() []AppliedPipelineOp { } func init() { + proto.RegisterEnum("pipelinepb.RollupOp_Type", RollupOp_Type_name, RollupOp_Type_value) + proto.RegisterEnum("pipelinepb.PipelineOp_Type", PipelineOp_Type_name, PipelineOp_Type_value) + proto.RegisterEnum("pipelinepb.AppliedPipelineOp_Type", AppliedPipelineOp_Type_name, AppliedPipelineOp_Type_value) proto.RegisterType((*AggregationOp)(nil), "pipelinepb.AggregationOp") proto.RegisterType((*TransformationOp)(nil), "pipelinepb.TransformationOp") proto.RegisterType((*RollupOp)(nil), "pipelinepb.RollupOp") @@ -348,14 +571,61 @@ func init() { proto.RegisterType((*AppliedRollupOp)(nil), "pipelinepb.AppliedRollupOp") proto.RegisterType((*AppliedPipelineOp)(nil), "pipelinepb.AppliedPipelineOp") proto.RegisterType((*AppliedPipeline)(nil), "pipelinepb.AppliedPipeline") - proto.RegisterEnum("pipelinepb.RollupOp_Type", RollupOp_Type_name, RollupOp_Type_value) - proto.RegisterEnum("pipelinepb.PipelineOp_Type", PipelineOp_Type_name, PipelineOp_Type_value) - proto.RegisterEnum("pipelinepb.AppliedPipelineOp_Type", AppliedPipelineOp_Type_name, AppliedPipelineOp_Type_value) } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/pipelinepb/pipeline.proto", fileDescriptor_e4f84148e5f9ffe5) +} + +var fileDescriptor_e4f84148e5f9ffe5 = []byte{ + // 650 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcb, 0x4e, 0xdb, 0x40, + 0x14, 0x86, 0x7d, 0x89, 0x20, 0x9c, 0x40, 0x08, 0xa3, 0xaa, 0x0a, 0x97, 0x9a, 0xc8, 0x62, 0x91, + 0x45, 0xb1, 0xa5, 0x44, 0xad, 0x0a, 0x5d, 0x05, 0x42, 0xd3, 0x94, 0xd4, 0x46, 0x43, 0xa2, 0x5e, + 0x36, 0xc8, 0xc1, 0x83, 0x6b, 0x29, 0xb6, 0x47, 0xb6, 0x11, 0xe2, 0x09, 0xba, 0xe5, 0x15, 0xfa, + 0x0e, 0x7d, 0x08, 0x96, 0x2c, 0x2b, 0x55, 0xaa, 0x2a, 0x78, 0x91, 0x2a, 0xb6, 0x93, 0xcc, 0x84, + 0xf4, 0x42, 0x77, 0x33, 0xe3, 0x73, 0xfe, 0xf3, 0xcf, 0xff, 0x8d, 0x0c, 0xaf, 0x1d, 0x37, 0xfe, + 0x74, 0xde, 0xd7, 0x4e, 0x03, 0x4f, 0xf7, 0xea, 0x76, 0x5f, 0xf7, 0xea, 0x7a, 0x14, 0x9e, 0xea, + 0x1e, 0x89, 0x43, 0xf7, 0x34, 0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, 0x25, 0x8b, 0x3f, 0x88, + 0xd0, 0x76, 0x76, 0x85, 0x5c, 0x72, 0x85, 0x55, 0x6d, 0xf2, 0x16, 0xb4, 0x91, 0x3f, 0x8d, 0xf1, + 0xbd, 0x05, 0xb9, 0xe1, 0x0e, 0x2d, 0x42, 0xbe, 0x85, 0xcd, 0xde, 0xd1, 0xc9, 0xde, 0x87, 0x92, + 0x80, 0x8a, 0x00, 0x07, 0xef, 0xf7, 0x3b, 0xbd, 0xe6, 0xc1, 0x70, 0x2f, 0xaa, 0x5f, 0x25, 0x80, + 0xa3, 0x4c, 0xc8, 0xa4, 0x48, 0xe7, 0x62, 0x5a, 0x67, 0x67, 0x4c, 0xaa, 0x98, 0x29, 0xe8, 0x25, + 0x14, 0x18, 0xa3, 0x65, 0xa9, 0x22, 0x56, 0x0b, 0xbc, 0x37, 0x8e, 0x27, 0x66, 0xab, 0x51, 0x13, + 0x8a, 0x3c, 0x87, 0xb2, 0x9c, 0xf4, 0x6f, 0xb0, 0xfd, 0xd3, 0x28, 0xf1, 0x54, 0x0f, 0x7a, 0x0a, + 0x73, 0x61, 0x72, 0xff, 0x24, 0x99, 0x42, 0xed, 0xd1, 0xac, 0x64, 0x70, 0x56, 0xa3, 0x36, 0xb3, + 0x58, 0x0a, 0x30, 0xdf, 0x33, 0x0e, 0x0d, 0xf3, 0x9d, 0x51, 0x12, 0xd0, 0x32, 0x14, 0x1a, 0xad, + 0x16, 0x3e, 0x68, 0x35, 0xba, 0x6d, 0xd3, 0x28, 0x89, 0x08, 0x41, 0xb1, 0x8b, 0x1b, 0xc6, 0xf1, + 0x2b, 0x13, 0xbf, 0x4d, 0xcf, 0x24, 0x04, 0x30, 0x87, 0xcd, 0x4e, 0xa7, 0x77, 0x54, 0x92, 0xd5, + 0x5d, 0xc8, 0x8f, 0xf2, 0x40, 0x1a, 0xc8, 0x01, 0x8d, 0xca, 0x62, 0x45, 0xae, 0x16, 0x6a, 0x8f, + 0x67, 0x47, 0xb6, 0x97, 0xbb, 0xfe, 0xb1, 0x29, 0xe0, 0x61, 0xa1, 0x3a, 0x80, 0xe5, 0x06, 0xa5, + 0x03, 0x97, 0xd8, 0xe3, 0x67, 0x55, 0x04, 0xc9, 0xb5, 0x93, 0xd0, 0x17, 0xb1, 0xe4, 0xda, 0xa8, + 0x0d, 0x45, 0xf6, 0xdd, 0xb8, 0x76, 0x16, 0xec, 0xc6, 0xef, 0x1f, 0x4d, 0xbb, 0x99, 0xcd, 0x58, + 0x62, 0x4a, 0xda, 0xb6, 0xfa, 0x59, 0x82, 0x95, 0x6c, 0x1c, 0xc3, 0xf9, 0x39, 0xc7, 0x59, 0xe5, + 0x78, 0x4d, 0x17, 0xb3, 0xb8, 0xdf, 0xdc, 0x23, 0x26, 0xfd, 0x9d, 0x58, 0x66, 0x6c, 0x9a, 0xdb, + 0xce, 0x98, 0x5b, 0x4a, 0x7d, 0x7d, 0x86, 0x8b, 0x51, 0x42, 0x99, 0xc4, 0x08, 0x62, 0x7d, 0x16, + 0xc4, 0xfb, 0xcc, 0x44, 0x86, 0x99, 0xa4, 0x1a, 0xe3, 0xdc, 0xc7, 0xe8, 0x9e, 0xb1, 0xe8, 0x9e, + 0xfc, 0x31, 0x05, 0x86, 0xe0, 0x6e, 0xee, 0xea, 0xcb, 0xa6, 0xb0, 0x77, 0x7c, 0x7d, 0xab, 0x88, + 0x37, 0xb7, 0x8a, 0xf8, 0xf3, 0x56, 0x11, 0xaf, 0xee, 0x14, 0xe1, 0xe6, 0x4e, 0x11, 0xbe, 0xdd, + 0x29, 0xc2, 0xc7, 0x9d, 0xff, 0xfe, 0xe1, 0xf7, 0xe7, 0x92, 0x93, 0xfa, 0xaf, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x22, 0x31, 0xfd, 0x0e, 0x34, 0x06, 0x00, 0x00, +} + func (m *AggregationOp) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -363,22 +633,27 @@ func (m *AggregationOp) Marshal() (dAtA []byte, err error) { } func (m *AggregationOp) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AggregationOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Type != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintPipeline(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *TransformationOp) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -386,22 +661,27 @@ func (m *TransformationOp) Marshal() (dAtA []byte, err error) { } func (m *TransformationOp) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TransformationOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Type != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintPipeline(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *RollupOp) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -409,30 +689,19 @@ func (m *RollupOp) Marshal() (dAtA []byte, err error) { } func (m *RollupOp) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RollupOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.NewName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPipeline(dAtA, i, uint64(len(m.NewName))) - i += copy(dAtA[i:], m.NewName) - } - if len(m.Tags) > 0 { - for _, s := range m.Tags { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } + if m.Type != 0 { + i = encodeVarintPipeline(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x20 } if len(m.AggregationTypes) > 0 { dAtA2 := make([]byte, len(m.AggregationTypes)*10) @@ -446,23 +715,35 @@ func (m *RollupOp) MarshalTo(dAtA []byte) (int, error) { dAtA2[j1] = uint8(num) j1++ } - dAtA[i] = 0x1a - i++ + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) i = encodeVarintPipeline(dAtA, i, uint64(j1)) - i += copy(dAtA[i:], dAtA2[:j1]) + i-- + dAtA[i] = 0x1a } - if m.Type != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintPipeline(dAtA, i, uint64(m.Type)) + if len(m.Tags) > 0 { + for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Tags[iNdEx]) + copy(dAtA[i:], m.Tags[iNdEx]) + i = encodeVarintPipeline(dAtA, i, uint64(len(m.Tags[iNdEx]))) + i-- + dAtA[i] = 0x12 + } } - return i, nil + if len(m.NewName) > 0 { + i -= len(m.NewName) + copy(dAtA[i:], m.NewName) + i = encodeVarintPipeline(dAtA, i, uint64(len(m.NewName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *PipelineOp) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -470,52 +751,63 @@ func (m *PipelineOp) Marshal() (dAtA []byte, err error) { } func (m *PipelineOp) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PipelineOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPipeline(dAtA, i, uint64(m.Type)) - } - if m.Aggregation != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintPipeline(dAtA, i, uint64(m.Aggregation.Size())) - n3, err := m.Aggregation.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Rollup != nil { + { + size, err := m.Rollup.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPipeline(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x22 } if m.Transformation != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintPipeline(dAtA, i, uint64(m.Transformation.Size())) - n4, err := m.Transformation.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Transformation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPipeline(dAtA, i, uint64(size)) } - i += n4 + i-- + dAtA[i] = 0x1a } - if m.Rollup != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintPipeline(dAtA, i, uint64(m.Rollup.Size())) - n5, err := m.Rollup.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Aggregation != nil { + { + size, err := m.Aggregation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPipeline(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0x12 + } + if m.Type != 0 { + i = encodeVarintPipeline(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Pipeline) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -523,29 +815,36 @@ func (m *Pipeline) Marshal() (dAtA []byte, err error) { } func (m *Pipeline) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Pipeline) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Ops) > 0 { - for _, msg := range m.Ops { - dAtA[i] = 0xa - i++ - i = encodeVarintPipeline(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Ops) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Ops[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPipeline(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *AppliedRollupOp) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -553,31 +852,39 @@ func (m *AppliedRollupOp) Marshal() (dAtA []byte, err error) { } func (m *AppliedRollupOp) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AppliedRollupOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPipeline(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) + { + size, err := m.AggregationId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPipeline(dAtA, i, uint64(size)) } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintPipeline(dAtA, i, uint64(m.AggregationId.Size())) - n6, err := m.AggregationId.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintPipeline(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } - i += n6 - return i, nil + return len(dAtA) - i, nil } func (m *AppliedPipelineOp) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -585,38 +892,47 @@ func (m *AppliedPipelineOp) Marshal() (dAtA []byte, err error) { } func (m *AppliedPipelineOp) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AppliedPipelineOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPipeline(dAtA, i, uint64(m.Type)) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintPipeline(dAtA, i, uint64(m.Transformation.Size())) - n7, err := m.Transformation.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Rollup.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPipeline(dAtA, i, uint64(size)) } - i += n7 + i-- dAtA[i] = 0x1a - i++ - i = encodeVarintPipeline(dAtA, i, uint64(m.Rollup.Size())) - n8, err := m.Rollup.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Transformation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPipeline(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Type != 0 { + i = encodeVarintPipeline(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - i += n8 - return i, nil + return len(dAtA) - i, nil } func (m *AppliedPipeline) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -624,35 +940,47 @@ func (m *AppliedPipeline) Marshal() (dAtA []byte, err error) { } func (m *AppliedPipeline) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AppliedPipeline) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Ops) > 0 { - for _, msg := range m.Ops { - dAtA[i] = 0xa - i++ - i = encodeVarintPipeline(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Ops) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Ops[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPipeline(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func encodeVarintPipeline(dAtA []byte, offset int, v uint64) int { + offset -= sovPipeline(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *AggregationOp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -662,6 +990,9 @@ func (m *AggregationOp) Size() (n int) { } func (m *TransformationOp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -671,6 +1002,9 @@ func (m *TransformationOp) Size() (n int) { } func (m *RollupOp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.NewName) @@ -697,6 +1031,9 @@ func (m *RollupOp) Size() (n int) { } func (m *PipelineOp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -718,6 +1055,9 @@ func (m *PipelineOp) Size() (n int) { } func (m *Pipeline) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Ops) > 0 { @@ -730,6 +1070,9 @@ func (m *Pipeline) Size() (n int) { } func (m *AppliedRollupOp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Id) @@ -742,6 +1085,9 @@ func (m *AppliedRollupOp) Size() (n int) { } func (m *AppliedPipelineOp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -755,6 +1101,9 @@ func (m *AppliedPipelineOp) Size() (n int) { } func (m *AppliedPipeline) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Ops) > 0 { @@ -767,14 +1116,7 @@ func (m *AppliedPipeline) Size() (n int) { } func sovPipeline(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPipeline(x uint64) (n int) { return sovPipeline(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -794,7 +1136,7 @@ func (m *AggregationOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -822,7 +1164,7 @@ func (m *AggregationOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (aggregationpb.AggregationType(b) & 0x7F) << shift + m.Type |= aggregationpb.AggregationType(b&0x7F) << shift if b < 0x80 { break } @@ -833,7 +1175,7 @@ func (m *AggregationOp) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPipeline } if (iNdEx + skippy) > l { @@ -863,7 +1205,7 @@ func (m *TransformationOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -891,7 +1233,7 @@ func (m *TransformationOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (transformationpb.TransformationType(b) & 0x7F) << shift + m.Type |= transformationpb.TransformationType(b&0x7F) << shift if b < 0x80 { break } @@ -902,7 +1244,7 @@ func (m *TransformationOp) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPipeline } if (iNdEx + skippy) > l { @@ -932,7 +1274,7 @@ func (m *RollupOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -960,7 +1302,7 @@ func (m *RollupOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -970,6 +1312,9 @@ func (m *RollupOp) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPipeline } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -989,7 +1334,7 @@ func (m *RollupOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -999,6 +1344,9 @@ func (m *RollupOp) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPipeline } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1016,7 +1364,7 @@ func (m *RollupOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (aggregationpb.AggregationType(b) & 0x7F) << shift + v |= aggregationpb.AggregationType(b&0x7F) << shift if b < 0x80 { break } @@ -1033,7 +1381,7 @@ func (m *RollupOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1042,9 +1390,16 @@ func (m *RollupOp) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPipeline } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + if elementCount != 0 && len(m.AggregationTypes) == 0 { + m.AggregationTypes = make([]aggregationpb.AggregationType, 0, elementCount) + } for iNdEx < postIndex { var v aggregationpb.AggregationType for shift := uint(0); ; shift += 7 { @@ -1056,7 +1411,7 @@ func (m *RollupOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (aggregationpb.AggregationType(b) & 0x7F) << shift + v |= aggregationpb.AggregationType(b&0x7F) << shift if b < 0x80 { break } @@ -1080,7 +1435,7 @@ func (m *RollupOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (RollupOp_Type(b) & 0x7F) << shift + m.Type |= RollupOp_Type(b&0x7F) << shift if b < 0x80 { break } @@ -1091,7 +1446,7 @@ func (m *RollupOp) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPipeline } if (iNdEx + skippy) > l { @@ -1121,7 +1476,7 @@ func (m *PipelineOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1149,7 +1504,7 @@ func (m *PipelineOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (PipelineOp_Type(b) & 0x7F) << shift + m.Type |= PipelineOp_Type(b&0x7F) << shift if b < 0x80 { break } @@ -1168,7 +1523,7 @@ func (m *PipelineOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1177,6 +1532,9 @@ func (m *PipelineOp) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPipeline } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1201,7 +1559,7 @@ func (m *PipelineOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1210,6 +1568,9 @@ func (m *PipelineOp) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPipeline } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1234,7 +1595,7 @@ func (m *PipelineOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1243,6 +1604,9 @@ func (m *PipelineOp) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPipeline } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1259,7 +1623,7 @@ func (m *PipelineOp) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPipeline } if (iNdEx + skippy) > l { @@ -1289,7 +1653,7 @@ func (m *Pipeline) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1317,7 +1681,7 @@ func (m *Pipeline) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1326,6 +1690,9 @@ func (m *Pipeline) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPipeline } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1340,7 +1707,7 @@ func (m *Pipeline) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPipeline } if (iNdEx + skippy) > l { @@ -1370,7 +1737,7 @@ func (m *AppliedRollupOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1398,7 +1765,7 @@ func (m *AppliedRollupOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1407,6 +1774,9 @@ func (m *AppliedRollupOp) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPipeline } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1429,7 +1799,7 @@ func (m *AppliedRollupOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1438,6 +1808,9 @@ func (m *AppliedRollupOp) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPipeline } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1451,7 +1824,7 @@ func (m *AppliedRollupOp) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPipeline } if (iNdEx + skippy) > l { @@ -1481,7 +1854,7 @@ func (m *AppliedPipelineOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1509,7 +1882,7 @@ func (m *AppliedPipelineOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (AppliedPipelineOp_Type(b) & 0x7F) << shift + m.Type |= AppliedPipelineOp_Type(b&0x7F) << shift if b < 0x80 { break } @@ -1528,7 +1901,7 @@ func (m *AppliedPipelineOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1537,6 +1910,9 @@ func (m *AppliedPipelineOp) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPipeline } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1558,7 +1934,7 @@ func (m *AppliedPipelineOp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1567,6 +1943,9 @@ func (m *AppliedPipelineOp) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPipeline } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1580,7 +1959,7 @@ func (m *AppliedPipelineOp) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPipeline } if (iNdEx + skippy) > l { @@ -1598,6 +1977,7 @@ func (m *AppliedPipelineOp) Unmarshal(dAtA []byte) error { func skipPipeline(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1629,10 +2009,8 @@ func skipPipeline(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1649,102 +2027,34 @@ func skipPipeline(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthPipeline } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPipeline - } - 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 := skipPipeline(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPipeline + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthPipeline + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthPipeline = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPipeline = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthPipeline = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPipeline = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPipeline = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/pipelinepb/pipeline.proto", fileDescriptorPipeline) -} - -var fileDescriptorPipeline = []byte{ - // 641 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcb, 0x4e, 0xdb, 0x40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x7d, 0x73, 0x8e, 0x8b, 0x71, 0x42, 0xb9, 0xc4, 0x18, 0x62, 0x73, 0x1e, 0xc4, 0xbb, - 0xcc, 0x04, 0x86, 0x99, 0xa8, 0x1a, 0x93, 0xdc, 0x27, 0xe8, 0x9e, 0xb0, 0xe8, 0x1e, 0xfd, 0x31, - 0x05, 0x86, 0xe0, 0x7e, 0xf1, 0xfa, 0xf3, 0x76, 0xe1, 0xe0, 0xf8, 0xe6, 0xb6, 0x2a, 0x7c, 0xbd, - 0xad, 0x0a, 0x3f, 0x6e, 0xab, 0xc2, 0xf5, 0xcf, 0x6a, 0xe1, 0xc3, 0xde, 0x7f, 0xff, 0xe8, 0xed, - 0x85, 0xf4, 0xa4, 0xf9, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x82, 0xb2, 0x32, 0x0e, 0x2c, 0x06, 0x00, - 0x00, -} diff --git a/src/metrics/generated/proto/policypb/policy.pb.go b/src/metrics/generated/proto/policypb/policy.pb.go index f890d31ca6..a51f91c2f3 100644 --- a/src/metrics/generated/proto/policypb/policy.pb.go +++ b/src/metrics/generated/proto/policypb/policy.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/metrics/generated/proto/policypb/policy.proto -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,27 +21,17 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package policypb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/metrics/generated/proto/policypb/policy.proto - - It has these top-level messages: - Resolution - Retention - StoragePolicy - Policy -*/ package policypb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import aggregationpb "github.com/m3db/m3/src/metrics/generated/proto/aggregationpb" - -import io "io" +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + aggregationpb "github.com/m3db/m3/src/metrics/generated/proto/aggregationpb" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -52,7 +42,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type DropPolicy int32 @@ -67,6 +57,7 @@ var DropPolicy_name = map[int32]string{ 1: "DROP_MUST", 2: "DROP_IF_ONLY_MATCH", } + var DropPolicy_value = map[string]int32{ "NONE": 0, "DROP_MUST": 1, @@ -76,17 +67,48 @@ var DropPolicy_value = map[string]int32{ func (x DropPolicy) String() string { return proto.EnumName(DropPolicy_name, int32(x)) } -func (DropPolicy) EnumDescriptor() ([]byte, []int) { return fileDescriptorPolicy, []int{0} } + +func (DropPolicy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_fe25feec0f3e51b9, []int{0} +} type Resolution struct { WindowSize int64 `protobuf:"varint,1,opt,name=window_size,json=windowSize,proto3" json:"window_size,omitempty"` Precision int64 `protobuf:"varint,2,opt,name=precision,proto3" json:"precision,omitempty"` } -func (m *Resolution) Reset() { *m = Resolution{} } -func (m *Resolution) String() string { return proto.CompactTextString(m) } -func (*Resolution) ProtoMessage() {} -func (*Resolution) Descriptor() ([]byte, []int) { return fileDescriptorPolicy, []int{0} } +func (m *Resolution) Reset() { *m = Resolution{} } +func (m *Resolution) String() string { return proto.CompactTextString(m) } +func (*Resolution) ProtoMessage() {} +func (*Resolution) Descriptor() ([]byte, []int) { + return fileDescriptor_fe25feec0f3e51b9, []int{0} +} +func (m *Resolution) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Resolution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Resolution.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 *Resolution) XXX_Merge(src proto.Message) { + xxx_messageInfo_Resolution.Merge(m, src) +} +func (m *Resolution) XXX_Size() int { + return m.Size() +} +func (m *Resolution) XXX_DiscardUnknown() { + xxx_messageInfo_Resolution.DiscardUnknown(m) +} + +var xxx_messageInfo_Resolution proto.InternalMessageInfo func (m *Resolution) GetWindowSize() int64 { if m != nil { @@ -106,10 +128,38 @@ type Retention struct { Period int64 `protobuf:"varint,1,opt,name=period,proto3" json:"period,omitempty"` } -func (m *Retention) Reset() { *m = Retention{} } -func (m *Retention) String() string { return proto.CompactTextString(m) } -func (*Retention) ProtoMessage() {} -func (*Retention) Descriptor() ([]byte, []int) { return fileDescriptorPolicy, []int{1} } +func (m *Retention) Reset() { *m = Retention{} } +func (m *Retention) String() string { return proto.CompactTextString(m) } +func (*Retention) ProtoMessage() {} +func (*Retention) Descriptor() ([]byte, []int) { + return fileDescriptor_fe25feec0f3e51b9, []int{1} +} +func (m *Retention) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Retention) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Retention.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 *Retention) XXX_Merge(src proto.Message) { + xxx_messageInfo_Retention.Merge(m, src) +} +func (m *Retention) XXX_Size() int { + return m.Size() +} +func (m *Retention) XXX_DiscardUnknown() { + xxx_messageInfo_Retention.DiscardUnknown(m) +} + +var xxx_messageInfo_Retention proto.InternalMessageInfo func (m *Retention) GetPeriod() int64 { if m != nil { @@ -119,14 +169,42 @@ func (m *Retention) GetPeriod() int64 { } type StoragePolicy struct { - Resolution Resolution `protobuf:"bytes,1,opt,name=resolution" json:"resolution"` - Retention Retention `protobuf:"bytes,2,opt,name=retention" json:"retention"` + Resolution Resolution `protobuf:"bytes,1,opt,name=resolution,proto3" json:"resolution"` + Retention Retention `protobuf:"bytes,2,opt,name=retention,proto3" json:"retention"` } -func (m *StoragePolicy) Reset() { *m = StoragePolicy{} } -func (m *StoragePolicy) String() string { return proto.CompactTextString(m) } -func (*StoragePolicy) ProtoMessage() {} -func (*StoragePolicy) Descriptor() ([]byte, []int) { return fileDescriptorPolicy, []int{2} } +func (m *StoragePolicy) Reset() { *m = StoragePolicy{} } +func (m *StoragePolicy) String() string { return proto.CompactTextString(m) } +func (*StoragePolicy) ProtoMessage() {} +func (*StoragePolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_fe25feec0f3e51b9, []int{2} +} +func (m *StoragePolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StoragePolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StoragePolicy.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 *StoragePolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_StoragePolicy.Merge(m, src) +} +func (m *StoragePolicy) XXX_Size() int { + return m.Size() +} +func (m *StoragePolicy) XXX_DiscardUnknown() { + xxx_messageInfo_StoragePolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_StoragePolicy proto.InternalMessageInfo func (m *StoragePolicy) GetResolution() Resolution { if m != nil { @@ -143,14 +221,42 @@ func (m *StoragePolicy) GetRetention() Retention { } type Policy struct { - StoragePolicy *StoragePolicy `protobuf:"bytes,1,opt,name=storage_policy,json=storagePolicy" json:"storage_policy,omitempty"` - AggregationTypes []aggregationpb.AggregationType `protobuf:"varint,2,rep,packed,name=aggregation_types,json=aggregationTypes,enum=aggregationpb.AggregationType" json:"aggregation_types,omitempty"` + StoragePolicy *StoragePolicy `protobuf:"bytes,1,opt,name=storage_policy,json=storagePolicy,proto3" json:"storage_policy,omitempty"` + AggregationTypes []aggregationpb.AggregationType `protobuf:"varint,2,rep,packed,name=aggregation_types,json=aggregationTypes,proto3,enum=aggregationpb.AggregationType" json:"aggregation_types,omitempty"` +} + +func (m *Policy) Reset() { *m = Policy{} } +func (m *Policy) String() string { return proto.CompactTextString(m) } +func (*Policy) ProtoMessage() {} +func (*Policy) Descriptor() ([]byte, []int) { + return fileDescriptor_fe25feec0f3e51b9, []int{3} +} +func (m *Policy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Policy.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 *Policy) XXX_Merge(src proto.Message) { + xxx_messageInfo_Policy.Merge(m, src) +} +func (m *Policy) XXX_Size() int { + return m.Size() +} +func (m *Policy) XXX_DiscardUnknown() { + xxx_messageInfo_Policy.DiscardUnknown(m) } -func (m *Policy) Reset() { *m = Policy{} } -func (m *Policy) String() string { return proto.CompactTextString(m) } -func (*Policy) ProtoMessage() {} -func (*Policy) Descriptor() ([]byte, []int) { return fileDescriptorPolicy, []int{3} } +var xxx_messageInfo_Policy proto.InternalMessageInfo func (m *Policy) GetStoragePolicy() *StoragePolicy { if m != nil { @@ -167,16 +273,52 @@ func (m *Policy) GetAggregationTypes() []aggregationpb.AggregationType { } func init() { + proto.RegisterEnum("policypb.DropPolicy", DropPolicy_name, DropPolicy_value) proto.RegisterType((*Resolution)(nil), "policypb.Resolution") proto.RegisterType((*Retention)(nil), "policypb.Retention") proto.RegisterType((*StoragePolicy)(nil), "policypb.StoragePolicy") proto.RegisterType((*Policy)(nil), "policypb.Policy") - proto.RegisterEnum("policypb.DropPolicy", DropPolicy_name, DropPolicy_value) } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/policypb/policy.proto", fileDescriptor_fe25feec0f3e51b9) +} + +var fileDescriptor_fe25feec0f3e51b9 = []byte{ + // 428 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0xcf, 0x6b, 0x13, 0x41, + 0x14, 0xde, 0x49, 0x4b, 0x68, 0x5e, 0x48, 0x89, 0xa3, 0xd4, 0x50, 0x64, 0x5b, 0xe2, 0xa5, 0x08, + 0xee, 0x42, 0x72, 0x28, 0x08, 0x0a, 0xad, 0x51, 0x94, 0xda, 0x4d, 0xdd, 0xc4, 0x83, 0x5e, 0x96, + 0xfd, 0x31, 0x8e, 0x03, 0xdd, 0x9d, 0x61, 0x66, 0x42, 0x49, 0xcf, 0xfe, 0x01, 0x5e, 0xfc, 0x9f, + 0x7a, 0xec, 0xd1, 0x93, 0x48, 0xf2, 0x8f, 0x48, 0x67, 0x27, 0xee, 0xee, 0xd1, 0xde, 0xde, 0xf7, + 0xbd, 0xf7, 0x7d, 0xef, 0xe3, 0xcd, 0xc0, 0x84, 0x32, 0xfd, 0x6d, 0x91, 0x78, 0x29, 0xcf, 0xfd, + 0x7c, 0x9c, 0x25, 0x7e, 0x3e, 0xf6, 0x95, 0x4c, 0xfd, 0x9c, 0x68, 0xc9, 0x52, 0xe5, 0x53, 0x52, + 0x10, 0x19, 0x6b, 0x92, 0xf9, 0x42, 0x72, 0xcd, 0x7d, 0xc1, 0x2f, 0x59, 0xba, 0x14, 0x89, 0x2d, + 0x3c, 0xc3, 0xe2, 0x9d, 0x0d, 0xbd, 0xff, 0xbc, 0xe6, 0x47, 0x39, 0xe5, 0xa5, 0x2c, 0x59, 0x7c, + 0x35, 0xa8, 0xf4, 0xb8, 0xab, 0x4a, 0xe1, 0x7e, 0xf0, 0x9f, 0xeb, 0x63, 0x4a, 0x25, 0xa1, 0xb1, + 0x66,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0xbd, 0x03, 0xdb, 0xc1, 0x34, 0x78, 0xd3, 0x77, + 0x70, 0x0f, 0x3a, 0x93, 0x70, 0x7a, 0x11, 0x9d, 0x7f, 0x9a, 0xcd, 0xfb, 0x08, 0xef, 0x01, 0x36, + 0xf0, 0xfd, 0xdb, 0x68, 0x1a, 0x7c, 0xf8, 0x1c, 0x9d, 0x9f, 0xcc, 0x5f, 0xbf, 0xeb, 0xb7, 0x4e, + 0x3f, 0xde, 0xac, 0x5c, 0x74, 0xbb, 0x72, 0xd1, 0x9f, 0x95, 0x8b, 0x7e, 0xac, 0x5d, 0xe7, 0x76, + 0xed, 0x3a, 0xbf, 0xd6, 0xae, 0xf3, 0xe5, 0xf8, 0x9e, 0x1f, 0x37, 0x69, 0x1b, 0x3c, 0xfe, 0x1b, + 0x00, 0x00, 0xff, 0xff, 0xd7, 0x27, 0xba, 0x64, 0xfa, 0x02, 0x00, 0x00, +} + func (m *Resolution) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -184,27 +326,32 @@ func (m *Resolution) Marshal() (dAtA []byte, err error) { } func (m *Resolution) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Resolution) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.WindowSize != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPolicy(dAtA, i, uint64(m.WindowSize)) - } if m.Precision != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintPolicy(dAtA, i, uint64(m.Precision)) + i-- + dAtA[i] = 0x10 } - return i, nil + if m.WindowSize != 0 { + i = encodeVarintPolicy(dAtA, i, uint64(m.WindowSize)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *Retention) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -212,22 +359,27 @@ func (m *Retention) Marshal() (dAtA []byte, err error) { } func (m *Retention) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Retention) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Period != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintPolicy(dAtA, i, uint64(m.Period)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *StoragePolicy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -235,33 +387,42 @@ func (m *StoragePolicy) Marshal() (dAtA []byte, err error) { } func (m *StoragePolicy) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StoragePolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintPolicy(dAtA, i, uint64(m.Resolution.Size())) - n1, err := m.Resolution.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Retention.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPolicy(dAtA, i, uint64(size)) } - i += n1 + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintPolicy(dAtA, i, uint64(m.Retention.Size())) - n2, err := m.Retention.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Resolution.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPolicy(dAtA, i, uint64(size)) } - i += n2 - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *Policy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -269,50 +430,63 @@ func (m *Policy) Marshal() (dAtA []byte, err error) { } func (m *Policy) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Policy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.StoragePolicy != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPolicy(dAtA, i, uint64(m.StoragePolicy.Size())) - n3, err := m.StoragePolicy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } if len(m.AggregationTypes) > 0 { - dAtA5 := make([]byte, len(m.AggregationTypes)*10) - var j4 int + dAtA4 := make([]byte, len(m.AggregationTypes)*10) + var j3 int for _, num := range m.AggregationTypes { for num >= 1<<7 { - dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j4++ + j3++ } - dAtA5[j4] = uint8(num) - j4++ + dAtA4[j3] = uint8(num) + j3++ } + i -= j3 + copy(dAtA[i:], dAtA4[:j3]) + i = encodeVarintPolicy(dAtA, i, uint64(j3)) + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintPolicy(dAtA, i, uint64(j4)) - i += copy(dAtA[i:], dAtA5[:j4]) } - return i, nil + if m.StoragePolicy != nil { + { + size, err := m.StoragePolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPolicy(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintPolicy(dAtA []byte, offset int, v uint64) int { + offset -= sovPolicy(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Resolution) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.WindowSize != 0 { @@ -325,6 +499,9 @@ func (m *Resolution) Size() (n int) { } func (m *Retention) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Period != 0 { @@ -334,6 +511,9 @@ func (m *Retention) Size() (n int) { } func (m *StoragePolicy) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Resolution.Size() @@ -344,6 +524,9 @@ func (m *StoragePolicy) Size() (n int) { } func (m *Policy) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.StoragePolicy != nil { @@ -361,14 +544,7 @@ func (m *Policy) Size() (n int) { } func sovPolicy(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPolicy(x uint64) (n int) { return sovPolicy(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -388,7 +564,7 @@ func (m *Resolution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -416,7 +592,7 @@ func (m *Resolution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.WindowSize |= (int64(b) & 0x7F) << shift + m.WindowSize |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -435,7 +611,7 @@ func (m *Resolution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Precision |= (int64(b) & 0x7F) << shift + m.Precision |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -446,7 +622,7 @@ func (m *Resolution) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicy } if (iNdEx + skippy) > l { @@ -476,7 +652,7 @@ func (m *Retention) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -504,7 +680,7 @@ func (m *Retention) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Period |= (int64(b) & 0x7F) << shift + m.Period |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -515,7 +691,7 @@ func (m *Retention) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicy } if (iNdEx + skippy) > l { @@ -545,7 +721,7 @@ func (m *StoragePolicy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -573,7 +749,7 @@ func (m *StoragePolicy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -582,6 +758,9 @@ func (m *StoragePolicy) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPolicy } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPolicy + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -603,7 +782,7 @@ func (m *StoragePolicy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -612,6 +791,9 @@ func (m *StoragePolicy) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPolicy } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPolicy + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -625,7 +807,7 @@ func (m *StoragePolicy) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicy } if (iNdEx + skippy) > l { @@ -655,7 +837,7 @@ func (m *Policy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -683,7 +865,7 @@ func (m *Policy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -692,6 +874,9 @@ func (m *Policy) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPolicy } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPolicy + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -714,7 +899,7 @@ func (m *Policy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (aggregationpb.AggregationType(b) & 0x7F) << shift + v |= aggregationpb.AggregationType(b&0x7F) << shift if b < 0x80 { break } @@ -731,7 +916,7 @@ func (m *Policy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -740,9 +925,16 @@ func (m *Policy) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPolicy } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPolicy + } if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + if elementCount != 0 && len(m.AggregationTypes) == 0 { + m.AggregationTypes = make([]aggregationpb.AggregationType, 0, elementCount) + } for iNdEx < postIndex { var v aggregationpb.AggregationType for shift := uint(0); ; shift += 7 { @@ -754,7 +946,7 @@ func (m *Policy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (aggregationpb.AggregationType(b) & 0x7F) << shift + v |= aggregationpb.AggregationType(b&0x7F) << shift if b < 0x80 { break } @@ -770,7 +962,7 @@ func (m *Policy) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPolicy } if (iNdEx + skippy) > l { @@ -788,6 +980,7 @@ func (m *Policy) Unmarshal(dAtA []byte) error { func skipPolicy(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -819,10 +1012,8 @@ func skipPolicy(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -839,88 +1030,34 @@ func skipPolicy(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthPolicy } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPolicy - } - 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 := skipPolicy(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPolicy + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthPolicy + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthPolicy = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPolicy = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthPolicy = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPolicy = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPolicy = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/policypb/policy.proto", fileDescriptorPolicy) -} - -var fileDescriptorPolicy = []byte{ - // 420 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x5d, 0x6b, 0x13, 0x41, - 0x14, 0xcd, 0xa4, 0x25, 0x34, 0x37, 0xa4, 0xac, 0xa3, 0xd4, 0x50, 0x64, 0x5b, 0xd6, 0x97, 0x22, - 0xb8, 0x0b, 0xc9, 0x43, 0x41, 0x50, 0x68, 0x8d, 0x62, 0xa9, 0xdd, 0x94, 0x4d, 0x7c, 0xd0, 0x97, - 0x65, 0x3f, 0xc6, 0x71, 0xa0, 0xbb, 0x33, 0xcc, 0x4c, 0x28, 0xe9, 0xb3, 0x3f, 0xc0, 0x17, 0xff, - 0x53, 0x1f, 0xfd, 0x05, 0x22, 0xf1, 0x8f, 0x48, 0x66, 0x27, 0xee, 0xee, 0xa3, 0xbe, 0xdd, 0x73, - 0xee, 0x3d, 0xe7, 0x1e, 0xee, 0x0c, 0x4c, 0x29, 0xd3, 0x5f, 0x96, 0xa9, 0x9f, 0xf1, 0x22, 0x28, - 0x26, 0x79, 0x1a, 0x14, 0x93, 0x40, 0xc9, 0x2c, 0x28, 0x88, 0x96, 0x2c, 0x53, 0x01, 0x25, 0x25, - 0x91, 0x89, 0x26, 0x79, 0x20, 0x24, 0xd7, 0x3c, 0x10, 0xfc, 0x86, 0x65, 0x2b, 0x91, 0xda, 0xc2, - 0x37, 0x2c, 0xde, 0xdb, 0xd2, 0x87, 0xcf, 0x1b, 0x7e, 0x94, 0x53, 0x5e, 0xc9, 0xd2, 0xe5, 0x67, - 0x83, 0x2a, 0x8f, 0x4d, 0x55, 0x09, 0x0f, 0xc3, 0x7f, 0x5c, 0x9f, 0x50, 0x2a, 0x09, 0x4d, 0x34,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0x5a, 0xef, 0xc1, 0x6e, 0x38, 0x0b, 0xdf, 0x38, 0x1d, 0x3c, - 0x84, 0xfe, 0x34, 0x9a, 0x5d, 0xc7, 0x57, 0x1f, 0xe6, 0x0b, 0x07, 0xe1, 0x03, 0xc0, 0x06, 0x5e, - 0xbc, 0x8d, 0x67, 0xe1, 0xfb, 0x8f, 0xf1, 0xd5, 0xd9, 0xe2, 0xf5, 0x3b, 0xa7, 0x7b, 0x7e, 0x71, - 0xbf, 0x76, 0xd1, 0x8f, 0xb5, 0x8b, 0x7e, 0xad, 0x5d, 0xf4, 0xed, 0xb7, 0xdb, 0xf9, 0x74, 0xfa, - 0x9f, 0x1f, 0x36, 0xed, 0x19, 0x3c, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x16, 0x63, 0x9d, 0x5c, - 0xf2, 0x02, 0x00, 0x00, -} diff --git a/src/metrics/generated/proto/rulepb/namespace.pb.go b/src/metrics/generated/proto/rulepb/namespace.pb.go index 6e891058f0..bcaffe71e1 100644 --- a/src/metrics/generated/proto/rulepb/namespace.pb.go +++ b/src/metrics/generated/proto/rulepb/namespace.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/metrics/generated/proto/rulepb/namespace.proto -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,32 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package rulepb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/metrics/generated/proto/rulepb/namespace.proto - github.com/m3db/m3/src/metrics/generated/proto/rulepb/rule.proto - - It has these top-level messages: - NamespaceSnapshot - Namespace - Namespaces - MappingRuleSnapshot - MappingRule - RollupTarget - RollupTargetV2 - RollupRuleSnapshot - RollupRule - RuleSet -*/ package rulepb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -57,7 +40,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type NamespaceSnapshot struct { ForRulesetVersion int32 `protobuf:"varint,1,opt,name=for_ruleset_version,json=forRulesetVersion,proto3" json:"for_ruleset_version,omitempty"` @@ -66,10 +49,38 @@ type NamespaceSnapshot struct { LastUpdatedBy string `protobuf:"bytes,4,opt,name=last_updated_by,json=lastUpdatedBy,proto3" json:"last_updated_by,omitempty"` } -func (m *NamespaceSnapshot) Reset() { *m = NamespaceSnapshot{} } -func (m *NamespaceSnapshot) String() string { return proto.CompactTextString(m) } -func (*NamespaceSnapshot) ProtoMessage() {} -func (*NamespaceSnapshot) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{0} } +func (m *NamespaceSnapshot) Reset() { *m = NamespaceSnapshot{} } +func (m *NamespaceSnapshot) String() string { return proto.CompactTextString(m) } +func (*NamespaceSnapshot) ProtoMessage() {} +func (*NamespaceSnapshot) Descriptor() ([]byte, []int) { + return fileDescriptor_1a7c5b621e438740, []int{0} +} +func (m *NamespaceSnapshot) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceSnapshot.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 *NamespaceSnapshot) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceSnapshot.Merge(m, src) +} +func (m *NamespaceSnapshot) XXX_Size() int { + return m.Size() +} +func (m *NamespaceSnapshot) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceSnapshot.DiscardUnknown(m) +} + +var xxx_messageInfo_NamespaceSnapshot proto.InternalMessageInfo func (m *NamespaceSnapshot) GetForRulesetVersion() int32 { if m != nil { @@ -101,13 +112,41 @@ func (m *NamespaceSnapshot) GetLastUpdatedBy() string { type Namespace struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Snapshots []*NamespaceSnapshot `protobuf:"bytes,2,rep,name=snapshots" json:"snapshots,omitempty"` + Snapshots []*NamespaceSnapshot `protobuf:"bytes,2,rep,name=snapshots,proto3" json:"snapshots,omitempty"` } -func (m *Namespace) Reset() { *m = Namespace{} } -func (m *Namespace) String() string { return proto.CompactTextString(m) } -func (*Namespace) ProtoMessage() {} -func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{1} } +func (m *Namespace) Reset() { *m = Namespace{} } +func (m *Namespace) String() string { return proto.CompactTextString(m) } +func (*Namespace) ProtoMessage() {} +func (*Namespace) Descriptor() ([]byte, []int) { + return fileDescriptor_1a7c5b621e438740, []int{1} +} +func (m *Namespace) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Namespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Namespace.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 *Namespace) XXX_Merge(src proto.Message) { + xxx_messageInfo_Namespace.Merge(m, src) +} +func (m *Namespace) XXX_Size() int { + return m.Size() +} +func (m *Namespace) XXX_DiscardUnknown() { + xxx_messageInfo_Namespace.DiscardUnknown(m) +} + +var xxx_messageInfo_Namespace proto.InternalMessageInfo func (m *Namespace) GetName() string { if m != nil { @@ -124,13 +163,41 @@ func (m *Namespace) GetSnapshots() []*NamespaceSnapshot { } type Namespaces struct { - Namespaces []*Namespace `protobuf:"bytes,1,rep,name=namespaces" json:"namespaces,omitempty"` + Namespaces []*Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"` +} + +func (m *Namespaces) Reset() { *m = Namespaces{} } +func (m *Namespaces) String() string { return proto.CompactTextString(m) } +func (*Namespaces) ProtoMessage() {} +func (*Namespaces) Descriptor() ([]byte, []int) { + return fileDescriptor_1a7c5b621e438740, []int{2} +} +func (m *Namespaces) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Namespaces) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Namespaces.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 *Namespaces) XXX_Merge(src proto.Message) { + xxx_messageInfo_Namespaces.Merge(m, src) +} +func (m *Namespaces) XXX_Size() int { + return m.Size() +} +func (m *Namespaces) XXX_DiscardUnknown() { + xxx_messageInfo_Namespaces.DiscardUnknown(m) } -func (m *Namespaces) Reset() { *m = Namespaces{} } -func (m *Namespaces) String() string { return proto.CompactTextString(m) } -func (*Namespaces) ProtoMessage() {} -func (*Namespaces) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{2} } +var xxx_messageInfo_Namespaces proto.InternalMessageInfo func (m *Namespaces) GetNamespaces() []*Namespace { if m != nil { @@ -144,10 +211,40 @@ func init() { proto.RegisterType((*Namespace)(nil), "rulepb.Namespace") proto.RegisterType((*Namespaces)(nil), "rulepb.Namespaces") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/rulepb/namespace.proto", fileDescriptor_1a7c5b621e438740) +} + +var fileDescriptor_1a7c5b621e438740 = []byte{ + // 328 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xcf, 0x4a, 0x33, 0x31, + 0x14, 0xc5, 0x9b, 0xb6, 0x5f, 0xf9, 0xe6, 0x8a, 0x48, 0x23, 0xc2, 0xb8, 0x09, 0x43, 0x17, 0x32, + 0xab, 0x09, 0xb5, 0x88, 0x4b, 0xb1, 0xe0, 0xb6, 0x42, 0x44, 0x11, 0x37, 0x43, 0x66, 0x26, 0xfd, + 0x03, 0x9d, 0x64, 0xc8, 0x4d, 0x85, 0xbe, 0x85, 0x4f, 0xe4, 0xda, 0x65, 0x97, 0x2e, 0xa5, 0x7d, + 0x11, 0x99, 0x19, 0xad, 0x95, 0xee, 0xdc, 0x25, 0xe7, 0x77, 0x72, 0x39, 0x27, 0x17, 0x6e, 0x26, + 0x33, 0x37, 0x5d, 0x24, 0x51, 0x6a, 0x72, 0x9e, 0x0f, 0xb2, 0x84, 0xe7, 0x03, 0x8e, 0x36, 0xe5, + 0xb9, 0x72, 0x76, 0x96, 0x22, 0x9f, 0x28, 0xad, 0xac, 0x74, 0x2a, 0xe3, 0x85, 0x35, 0xce, 0x70, + 0xbb, 0x98, 0xab, 0x22, 0xe1, 0x5a, 0xe6, 0x0a, 0x0b, 0x99, 0xaa, 0xa8, 0x92, 0x69, 0xa7, 0xd6, + 0x7b, 0xaf, 0x04, 0xba, 0xa3, 0x6f, 0x76, 0xa7, 0x65, 0x81, 0x53, 0xe3, 0x68, 0x04, 0xc7, 0x63, + 0x63, 0xe3, 0xd2, 0x83, 0xca, 0xc5, 0xcf, 0xca, 0xe2, 0xcc, 0x68, 0x9f, 0x04, 0x24, 0xfc, 0x27, + 0xba, 0x63, 0x63, 0x45, 0x4d, 0x1e, 0x6a, 0x40, 0x19, 0x80, 0x33, 0x79, 0x82, 0xce, 0x68, 0x95, + 0xf9, 0xcd, 0x80, 0x84, 0xff, 0xc5, 0x8e, 0x42, 0xfb, 0x70, 0x32, 0x97, 0xe8, 0xe2, 0x45, 0x91, + 0x95, 0xd1, 0x62, 0xe9, 0x62, 0x2d, 0xb5, 0x41, 0xbf, 0x15, 0x90, 0xb0, 0x25, 0x68, 0x09, 0xef, + 0x6b, 0x76, 0xed, 0x46, 0x25, 0xa1, 0x67, 0x70, 0xf4, 0xeb, 0x49, 0xb2, 0xf4, 0xdb, 0x01, 0x09, + 0x3d, 0x71, 0xb8, 0x63, 0x1e, 0x2e, 0x7b, 0x8f, 0xe0, 0x6d, 0xf3, 0x53, 0x0a, 0xed, 0xb2, 0x68, + 0x15, 0xd4, 0x13, 0xd5, 0x99, 0x5e, 0x82, 0x87, 0x5f, 0xbd, 0xd0, 0x6f, 0x06, 0xad, 0xf0, 0xe0, + 0xfc, 0x34, 0xaa, 0xdb, 0x47, 0x7b, 0xcd, 0xc5, 0x8f, 0xb7, 0x77, 0x05, 0xb0, 0xe5, 0x48, 0xfb, + 0x00, 0xdb, 0x3f, 0x44, 0x9f, 0x54, 0x73, 0xba, 0x7b, 0x73, 0xc4, 0x8e, 0x69, 0x78, 0xfb, 0xb6, + 0x66, 0x64, 0xb5, 0x66, 0xe4, 0x63, 0xcd, 0xc8, 0xcb, 0x86, 0x35, 0x56, 0x1b, 0xd6, 0x78, 0xdf, + 0xb0, 0xc6, 0xd3, 0xc5, 0x9f, 0x96, 0x98, 0x74, 0xaa, 0xdb, 0xe0, 0x33, 0x00, 0x00, 0xff, 0xff, + 0xf5, 0x82, 0x02, 0xa0, 0x04, 0x02, 0x00, 0x00, +} + func (m *NamespaceSnapshot) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -155,43 +252,49 @@ func (m *NamespaceSnapshot) Marshal() (dAtA []byte, err error) { } func (m *NamespaceSnapshot) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ForRulesetVersion != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.ForRulesetVersion)) + if len(m.LastUpdatedBy) > 0 { + i -= len(m.LastUpdatedBy) + copy(dAtA[i:], m.LastUpdatedBy) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.LastUpdatedBy))) + i-- + dAtA[i] = 0x22 + } + if m.LastUpdatedAtNanos != 0 { + i = encodeVarintNamespace(dAtA, i, uint64(m.LastUpdatedAtNanos)) + i-- + dAtA[i] = 0x18 } if m.Tombstoned { - dAtA[i] = 0x10 - i++ + i-- if m.Tombstoned { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ - } - if m.LastUpdatedAtNanos != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.LastUpdatedAtNanos)) + i-- + dAtA[i] = 0x10 } - if len(m.LastUpdatedBy) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.LastUpdatedBy))) - i += copy(dAtA[i:], m.LastUpdatedBy) + if m.ForRulesetVersion != 0 { + i = encodeVarintNamespace(dAtA, i, uint64(m.ForRulesetVersion)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Namespace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -199,35 +302,43 @@ func (m *Namespace) Marshal() (dAtA []byte, err error) { } func (m *Namespace) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Namespace) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if len(m.Snapshots) > 0 { - for _, msg := range m.Snapshots { - dAtA[i] = 0x12 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Snapshots[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *Namespaces) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -235,35 +346,47 @@ func (m *Namespaces) Marshal() (dAtA []byte, err error) { } func (m *Namespaces) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Namespaces) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Namespaces) > 0 { - for _, msg := range m.Namespaces { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Namespaces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func encodeVarintNamespace(dAtA []byte, offset int, v uint64) int { + offset -= sovNamespace(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *NamespaceSnapshot) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.ForRulesetVersion != 0 { @@ -283,6 +406,9 @@ func (m *NamespaceSnapshot) Size() (n int) { } func (m *Namespace) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -299,6 +425,9 @@ func (m *Namespace) Size() (n int) { } func (m *Namespaces) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Namespaces) > 0 { @@ -311,14 +440,7 @@ func (m *Namespaces) Size() (n int) { } func sovNamespace(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozNamespace(x uint64) (n int) { return sovNamespace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -338,7 +460,7 @@ func (m *NamespaceSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -366,7 +488,7 @@ func (m *NamespaceSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ForRulesetVersion |= (int32(b) & 0x7F) << shift + m.ForRulesetVersion |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -385,7 +507,7 @@ func (m *NamespaceSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -405,7 +527,7 @@ func (m *NamespaceSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastUpdatedAtNanos |= (int64(b) & 0x7F) << shift + m.LastUpdatedAtNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -424,7 +546,7 @@ func (m *NamespaceSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -434,6 +556,9 @@ func (m *NamespaceSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -445,7 +570,7 @@ func (m *NamespaceSnapshot) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -475,7 +600,7 @@ func (m *Namespace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -503,7 +628,7 @@ func (m *Namespace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -513,6 +638,9 @@ func (m *Namespace) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -532,7 +660,7 @@ func (m *Namespace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -541,6 +669,9 @@ func (m *Namespace) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -555,7 +686,7 @@ func (m *Namespace) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -585,7 +716,7 @@ func (m *Namespaces) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -613,7 +744,7 @@ func (m *Namespaces) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -622,6 +753,9 @@ func (m *Namespaces) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -636,7 +770,7 @@ func (m *Namespaces) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -654,6 +788,7 @@ func (m *Namespaces) Unmarshal(dAtA []byte) error { func skipNamespace(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -685,10 +820,8 @@ func skipNamespace(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -705,82 +838,34 @@ func skipNamespace(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthNamespace } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNamespace - } - 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 := skipNamespace(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupNamespace + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthNamespace + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupNamespace = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/rulepb/namespace.proto", fileDescriptorNamespace) -} - -var fileDescriptorNamespace = []byte{ - // 321 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xcf, 0x4a, 0x33, 0x31, - 0x14, 0xc5, 0xbf, 0xb4, 0xfd, 0x8a, 0x73, 0x45, 0xa4, 0x11, 0x61, 0xdc, 0x0c, 0x43, 0x17, 0x32, - 0xab, 0x09, 0xb5, 0x88, 0x4b, 0xb1, 0x20, 0xee, 0xba, 0x88, 0x28, 0xe2, 0x66, 0x48, 0x66, 0xd2, - 0x3f, 0xd0, 0x24, 0x43, 0x6e, 0x2a, 0xf4, 0x2d, 0x7c, 0x22, 0xd7, 0x2e, 0x7d, 0x04, 0xa9, 0x2f, - 0x22, 0x33, 0xa3, 0xb5, 0xd2, 0x9d, 0xbb, 0xe4, 0xfc, 0x4e, 0x2e, 0xe7, 0xe4, 0xc2, 0xf5, 0x74, - 0xee, 0x67, 0x4b, 0x99, 0xe6, 0x56, 0x33, 0x3d, 0x2c, 0x24, 0xd3, 0x43, 0x86, 0x2e, 0x67, 0x5a, - 0x79, 0x37, 0xcf, 0x91, 0x4d, 0x95, 0x51, 0x4e, 0x78, 0x55, 0xb0, 0xd2, 0x59, 0x6f, 0x99, 0x5b, - 0x2e, 0x54, 0x29, 0x99, 0x11, 0x5a, 0x61, 0x29, 0x72, 0x95, 0xd6, 0x32, 0xed, 0x36, 0x7a, 0xff, - 0x85, 0x40, 0x6f, 0xfc, 0xcd, 0x6e, 0x8d, 0x28, 0x71, 0x66, 0x3d, 0x4d, 0xe1, 0x68, 0x62, 0x5d, - 0x56, 0x79, 0x50, 0xf9, 0xec, 0x49, 0x39, 0x9c, 0x5b, 0x13, 0x92, 0x98, 0x24, 0xff, 0x79, 0x6f, - 0x62, 0x1d, 0x6f, 0xc8, 0x7d, 0x03, 0x68, 0x04, 0xe0, 0xad, 0x96, 0xe8, 0xad, 0x51, 0x45, 0xd8, - 0x8a, 0x49, 0xb2, 0xc7, 0xb7, 0x14, 0x3a, 0x80, 0xe3, 0x85, 0x40, 0x9f, 0x2d, 0xcb, 0xa2, 0x8a, - 0x96, 0x09, 0x9f, 0x19, 0x61, 0x2c, 0x86, 0xed, 0x98, 0x24, 0x6d, 0x4e, 0x2b, 0x78, 0xd7, 0xb0, - 0x2b, 0x3f, 0xae, 0x08, 0x3d, 0x85, 0xc3, 0x5f, 0x4f, 0xe4, 0x2a, 0xec, 0xc4, 0x24, 0x09, 0xf8, - 0xc1, 0x96, 0x79, 0xb4, 0xea, 0x3f, 0x40, 0xb0, 0xc9, 0x4f, 0x29, 0x74, 0xaa, 0xa2, 0x75, 0xd0, - 0x80, 0xd7, 0x67, 0x7a, 0x01, 0x01, 0x7e, 0xf5, 0xc2, 0xb0, 0x15, 0xb7, 0x93, 0xfd, 0xb3, 0x93, - 0xb4, 0x69, 0x9f, 0xee, 0x34, 0xe7, 0x3f, 0xde, 0xfe, 0x25, 0xc0, 0x86, 0x23, 0x1d, 0x00, 0x6c, - 0xfe, 0x10, 0x43, 0x52, 0xcf, 0xe9, 0xed, 0xcc, 0xe1, 0x5b, 0xa6, 0xd1, 0xcd, 0xeb, 0x3a, 0x22, - 0x6f, 0xeb, 0x88, 0xbc, 0xaf, 0x23, 0xf2, 0xfc, 0x11, 0xfd, 0x7b, 0x3c, 0xff, 0xd3, 0xf2, 0x64, - 0xb7, 0xbe, 0x0d, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x2c, 0xd7, 0x1c, 0xfc, 0x01, 0x00, - 0x00, -} diff --git a/src/metrics/generated/proto/rulepb/rule.pb.go b/src/metrics/generated/proto/rulepb/rule.pb.go index e681eac593..c3b2808468 100644 --- a/src/metrics/generated/proto/rulepb/rule.pb.go +++ b/src/metrics/generated/proto/rulepb/rule.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/metrics/generated/proto/rulepb/rule.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,40 +23,76 @@ package rulepb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import aggregationpb "github.com/m3db/m3/src/metrics/generated/proto/aggregationpb" -import pipelinepb "github.com/m3db/m3/src/metrics/generated/proto/pipelinepb" -import policypb "github.com/m3db/m3/src/metrics/generated/proto/policypb" -import metricpb "github.com/m3db/m3/src/metrics/generated/proto/metricpb" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + aggregationpb "github.com/m3db/m3/src/metrics/generated/proto/aggregationpb" + metricpb "github.com/m3db/m3/src/metrics/generated/proto/metricpb" + pipelinepb "github.com/m3db/m3/src/metrics/generated/proto/pipelinepb" + policypb "github.com/m3db/m3/src/metrics/generated/proto/policypb" + io "io" + math "math" + math_bits "math/bits" +) // 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 + type MappingRuleSnapshot struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Tombstoned bool `protobuf:"varint,2,opt,name=tombstoned,proto3" json:"tombstoned,omitempty"` CutoverNanos int64 `protobuf:"varint,3,opt,name=cutover_nanos,json=cutoverNanos,proto3" json:"cutover_nanos,omitempty"` Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` // TODO(xichen): remove this and mark the field number reserved once all mapping rules are updated in KV. - Policies []*policypb.Policy `protobuf:"bytes,5,rep,name=policies" json:"policies,omitempty"` + Policies []*policypb.Policy `protobuf:"bytes,5,rep,name=policies,proto3" json:"policies,omitempty"` LastUpdatedAtNanos int64 `protobuf:"varint,6,opt,name=last_updated_at_nanos,json=lastUpdatedAtNanos,proto3" json:"last_updated_at_nanos,omitempty"` LastUpdatedBy string `protobuf:"bytes,7,opt,name=last_updated_by,json=lastUpdatedBy,proto3" json:"last_updated_by,omitempty"` - AggregationTypes []aggregationpb.AggregationType `protobuf:"varint,8,rep,packed,name=aggregation_types,json=aggregationTypes,enum=aggregationpb.AggregationType" json:"aggregation_types,omitempty"` - StoragePolicies []*policypb.StoragePolicy `protobuf:"bytes,9,rep,name=storage_policies,json=storagePolicies" json:"storage_policies,omitempty"` + AggregationTypes []aggregationpb.AggregationType `protobuf:"varint,8,rep,packed,name=aggregation_types,json=aggregationTypes,proto3,enum=aggregationpb.AggregationType" json:"aggregation_types,omitempty"` + StoragePolicies []*policypb.StoragePolicy `protobuf:"bytes,9,rep,name=storage_policies,json=storagePolicies,proto3" json:"storage_policies,omitempty"` DropPolicy policypb.DropPolicy `protobuf:"varint,10,opt,name=drop_policy,json=dropPolicy,proto3,enum=policypb.DropPolicy" json:"drop_policy,omitempty"` - Tags []*metricpb.Tag `protobuf:"bytes,11,rep,name=tags" json:"tags,omitempty"` + Tags []*metricpb.Tag `protobuf:"bytes,11,rep,name=tags,proto3" json:"tags,omitempty"` +} + +func (m *MappingRuleSnapshot) Reset() { *m = MappingRuleSnapshot{} } +func (m *MappingRuleSnapshot) String() string { return proto.CompactTextString(m) } +func (*MappingRuleSnapshot) ProtoMessage() {} +func (*MappingRuleSnapshot) Descriptor() ([]byte, []int) { + return fileDescriptor_fbf9dbfd2e445e0a, []int{0} +} +func (m *MappingRuleSnapshot) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MappingRuleSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MappingRuleSnapshot.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 *MappingRuleSnapshot) XXX_Merge(src proto.Message) { + xxx_messageInfo_MappingRuleSnapshot.Merge(m, src) +} +func (m *MappingRuleSnapshot) XXX_Size() int { + return m.Size() +} +func (m *MappingRuleSnapshot) XXX_DiscardUnknown() { + xxx_messageInfo_MappingRuleSnapshot.DiscardUnknown(m) } -func (m *MappingRuleSnapshot) Reset() { *m = MappingRuleSnapshot{} } -func (m *MappingRuleSnapshot) String() string { return proto.CompactTextString(m) } -func (*MappingRuleSnapshot) ProtoMessage() {} -func (*MappingRuleSnapshot) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{0} } +var xxx_messageInfo_MappingRuleSnapshot proto.InternalMessageInfo func (m *MappingRuleSnapshot) GetName() string { if m != nil { @@ -137,13 +173,41 @@ func (m *MappingRuleSnapshot) GetTags() []*metricpb.Tag { type MappingRule struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` - Snapshots []*MappingRuleSnapshot `protobuf:"bytes,2,rep,name=snapshots" json:"snapshots,omitempty"` + Snapshots []*MappingRuleSnapshot `protobuf:"bytes,2,rep,name=snapshots,proto3" json:"snapshots,omitempty"` +} + +func (m *MappingRule) Reset() { *m = MappingRule{} } +func (m *MappingRule) String() string { return proto.CompactTextString(m) } +func (*MappingRule) ProtoMessage() {} +func (*MappingRule) Descriptor() ([]byte, []int) { + return fileDescriptor_fbf9dbfd2e445e0a, []int{1} +} +func (m *MappingRule) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MappingRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MappingRule.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 *MappingRule) XXX_Merge(src proto.Message) { + xxx_messageInfo_MappingRule.Merge(m, src) +} +func (m *MappingRule) XXX_Size() int { + return m.Size() +} +func (m *MappingRule) XXX_DiscardUnknown() { + xxx_messageInfo_MappingRule.DiscardUnknown(m) } -func (m *MappingRule) Reset() { *m = MappingRule{} } -func (m *MappingRule) String() string { return proto.CompactTextString(m) } -func (*MappingRule) ProtoMessage() {} -func (*MappingRule) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{1} } +var xxx_messageInfo_MappingRule proto.InternalMessageInfo func (m *MappingRule) GetUuid() string { if m != nil { @@ -162,14 +226,42 @@ func (m *MappingRule) GetSnapshots() []*MappingRuleSnapshot { // TODO(xichen): remove this once all rules are updated in KV. type RollupTarget struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Tags []string `protobuf:"bytes,2,rep,name=tags" json:"tags,omitempty"` - Policies []*policypb.Policy `protobuf:"bytes,3,rep,name=policies" json:"policies,omitempty"` + Tags []string `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"` + Policies []*policypb.Policy `protobuf:"bytes,3,rep,name=policies,proto3" json:"policies,omitempty"` +} + +func (m *RollupTarget) Reset() { *m = RollupTarget{} } +func (m *RollupTarget) String() string { return proto.CompactTextString(m) } +func (*RollupTarget) ProtoMessage() {} +func (*RollupTarget) Descriptor() ([]byte, []int) { + return fileDescriptor_fbf9dbfd2e445e0a, []int{2} +} +func (m *RollupTarget) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RollupTarget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RollupTarget.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 *RollupTarget) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollupTarget.Merge(m, src) +} +func (m *RollupTarget) XXX_Size() int { + return m.Size() +} +func (m *RollupTarget) XXX_DiscardUnknown() { + xxx_messageInfo_RollupTarget.DiscardUnknown(m) } -func (m *RollupTarget) Reset() { *m = RollupTarget{} } -func (m *RollupTarget) String() string { return proto.CompactTextString(m) } -func (*RollupTarget) ProtoMessage() {} -func (*RollupTarget) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{2} } +var xxx_messageInfo_RollupTarget proto.InternalMessageInfo func (m *RollupTarget) GetName() string { if m != nil { @@ -194,15 +286,43 @@ func (m *RollupTarget) GetPolicies() []*policypb.Policy { // TODO(xichen): rename this once all rules are updated in KV. type RollupTargetV2 struct { - Pipeline *pipelinepb.Pipeline `protobuf:"bytes,1,opt,name=pipeline" json:"pipeline,omitempty"` - StoragePolicies []*policypb.StoragePolicy `protobuf:"bytes,2,rep,name=storage_policies,json=storagePolicies" json:"storage_policies,omitempty"` + Pipeline *pipelinepb.Pipeline `protobuf:"bytes,1,opt,name=pipeline,proto3" json:"pipeline,omitempty"` + StoragePolicies []*policypb.StoragePolicy `protobuf:"bytes,2,rep,name=storage_policies,json=storagePolicies,proto3" json:"storage_policies,omitempty"` ResendEnabled bool `protobuf:"varint,3,opt,name=resend_enabled,json=resendEnabled,proto3" json:"resend_enabled,omitempty"` } -func (m *RollupTargetV2) Reset() { *m = RollupTargetV2{} } -func (m *RollupTargetV2) String() string { return proto.CompactTextString(m) } -func (*RollupTargetV2) ProtoMessage() {} -func (*RollupTargetV2) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{3} } +func (m *RollupTargetV2) Reset() { *m = RollupTargetV2{} } +func (m *RollupTargetV2) String() string { return proto.CompactTextString(m) } +func (*RollupTargetV2) ProtoMessage() {} +func (*RollupTargetV2) Descriptor() ([]byte, []int) { + return fileDescriptor_fbf9dbfd2e445e0a, []int{3} +} +func (m *RollupTargetV2) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RollupTargetV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RollupTargetV2.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 *RollupTargetV2) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollupTargetV2.Merge(m, src) +} +func (m *RollupTargetV2) XXX_Size() int { + return m.Size() +} +func (m *RollupTargetV2) XXX_DiscardUnknown() { + xxx_messageInfo_RollupTargetV2.DiscardUnknown(m) +} + +var xxx_messageInfo_RollupTargetV2 proto.InternalMessageInfo func (m *RollupTargetV2) GetPipeline() *pipelinepb.Pipeline { if m != nil { @@ -231,19 +351,47 @@ type RollupRuleSnapshot struct { CutoverNanos int64 `protobuf:"varint,3,opt,name=cutover_nanos,json=cutoverNanos,proto3" json:"cutover_nanos,omitempty"` Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` // TODO(xichen): remove this and mark the field number reserved once all rollup rules are updated in KV. - Targets []*RollupTarget `protobuf:"bytes,5,rep,name=targets" json:"targets,omitempty"` + Targets []*RollupTarget `protobuf:"bytes,5,rep,name=targets,proto3" json:"targets,omitempty"` LastUpdatedAtNanos int64 `protobuf:"varint,6,opt,name=last_updated_at_nanos,json=lastUpdatedAtNanos,proto3" json:"last_updated_at_nanos,omitempty"` LastUpdatedBy string `protobuf:"bytes,7,opt,name=last_updated_by,json=lastUpdatedBy,proto3" json:"last_updated_by,omitempty"` // TODO(xichen): rename this once all rules are updated in KV. - TargetsV2 []*RollupTargetV2 `protobuf:"bytes,8,rep,name=targets_v2,json=targetsV2" json:"targets_v2,omitempty"` + TargetsV2 []*RollupTargetV2 `protobuf:"bytes,8,rep,name=targets_v2,json=targetsV2,proto3" json:"targets_v2,omitempty"` KeepOriginal bool `protobuf:"varint,9,opt,name=keep_original,json=keepOriginal,proto3" json:"keep_original,omitempty"` - Tags []*metricpb.Tag `protobuf:"bytes,10,rep,name=tags" json:"tags,omitempty"` + Tags []*metricpb.Tag `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"` +} + +func (m *RollupRuleSnapshot) Reset() { *m = RollupRuleSnapshot{} } +func (m *RollupRuleSnapshot) String() string { return proto.CompactTextString(m) } +func (*RollupRuleSnapshot) ProtoMessage() {} +func (*RollupRuleSnapshot) Descriptor() ([]byte, []int) { + return fileDescriptor_fbf9dbfd2e445e0a, []int{4} +} +func (m *RollupRuleSnapshot) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RollupRuleSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RollupRuleSnapshot.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 *RollupRuleSnapshot) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollupRuleSnapshot.Merge(m, src) +} +func (m *RollupRuleSnapshot) XXX_Size() int { + return m.Size() +} +func (m *RollupRuleSnapshot) XXX_DiscardUnknown() { + xxx_messageInfo_RollupRuleSnapshot.DiscardUnknown(m) } -func (m *RollupRuleSnapshot) Reset() { *m = RollupRuleSnapshot{} } -func (m *RollupRuleSnapshot) String() string { return proto.CompactTextString(m) } -func (*RollupRuleSnapshot) ProtoMessage() {} -func (*RollupRuleSnapshot) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{4} } +var xxx_messageInfo_RollupRuleSnapshot proto.InternalMessageInfo func (m *RollupRuleSnapshot) GetName() string { if m != nil { @@ -317,13 +465,41 @@ func (m *RollupRuleSnapshot) GetTags() []*metricpb.Tag { type RollupRule struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` - Snapshots []*RollupRuleSnapshot `protobuf:"bytes,2,rep,name=snapshots" json:"snapshots,omitempty"` + Snapshots []*RollupRuleSnapshot `protobuf:"bytes,2,rep,name=snapshots,proto3" json:"snapshots,omitempty"` +} + +func (m *RollupRule) Reset() { *m = RollupRule{} } +func (m *RollupRule) String() string { return proto.CompactTextString(m) } +func (*RollupRule) ProtoMessage() {} +func (*RollupRule) Descriptor() ([]byte, []int) { + return fileDescriptor_fbf9dbfd2e445e0a, []int{5} +} +func (m *RollupRule) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RollupRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RollupRule.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 *RollupRule) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollupRule.Merge(m, src) +} +func (m *RollupRule) XXX_Size() int { + return m.Size() +} +func (m *RollupRule) XXX_DiscardUnknown() { + xxx_messageInfo_RollupRule.DiscardUnknown(m) } -func (m *RollupRule) Reset() { *m = RollupRule{} } -func (m *RollupRule) String() string { return proto.CompactTextString(m) } -func (*RollupRule) ProtoMessage() {} -func (*RollupRule) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{5} } +var xxx_messageInfo_RollupRule proto.InternalMessageInfo func (m *RollupRule) GetUuid() string { if m != nil { @@ -346,15 +522,43 @@ type RuleSet struct { LastUpdatedAtNanos int64 `protobuf:"varint,4,opt,name=last_updated_at_nanos,json=lastUpdatedAtNanos,proto3" json:"last_updated_at_nanos,omitempty"` Tombstoned bool `protobuf:"varint,5,opt,name=tombstoned,proto3" json:"tombstoned,omitempty"` CutoverNanos int64 `protobuf:"varint,6,opt,name=cutover_nanos,json=cutoverNanos,proto3" json:"cutover_nanos,omitempty"` - MappingRules []*MappingRule `protobuf:"bytes,7,rep,name=mapping_rules,json=mappingRules" json:"mapping_rules,omitempty"` - RollupRules []*RollupRule `protobuf:"bytes,8,rep,name=rollup_rules,json=rollupRules" json:"rollup_rules,omitempty"` + MappingRules []*MappingRule `protobuf:"bytes,7,rep,name=mapping_rules,json=mappingRules,proto3" json:"mapping_rules,omitempty"` + RollupRules []*RollupRule `protobuf:"bytes,8,rep,name=rollup_rules,json=rollupRules,proto3" json:"rollup_rules,omitempty"` LastUpdatedBy string `protobuf:"bytes,9,opt,name=last_updated_by,json=lastUpdatedBy,proto3" json:"last_updated_by,omitempty"` } -func (m *RuleSet) Reset() { *m = RuleSet{} } -func (m *RuleSet) String() string { return proto.CompactTextString(m) } -func (*RuleSet) ProtoMessage() {} -func (*RuleSet) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{6} } +func (m *RuleSet) Reset() { *m = RuleSet{} } +func (m *RuleSet) String() string { return proto.CompactTextString(m) } +func (*RuleSet) ProtoMessage() {} +func (*RuleSet) Descriptor() ([]byte, []int) { + return fileDescriptor_fbf9dbfd2e445e0a, []int{6} +} +func (m *RuleSet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RuleSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RuleSet.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 *RuleSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_RuleSet.Merge(m, src) +} +func (m *RuleSet) XXX_Size() int { + return m.Size() +} +func (m *RuleSet) XXX_DiscardUnknown() { + xxx_messageInfo_RuleSet.DiscardUnknown(m) +} + +var xxx_messageInfo_RuleSet proto.InternalMessageInfo func (m *RuleSet) GetUuid() string { if m != nil { @@ -428,10 +632,69 @@ func init() { proto.RegisterType((*RollupRule)(nil), "rulepb.RollupRule") proto.RegisterType((*RuleSet)(nil), "rulepb.RuleSet") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/rulepb/rule.proto", fileDescriptor_fbf9dbfd2e445e0a) +} + +var fileDescriptor_fbf9dbfd2e445e0a = []byte{ + // 785 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xdd, 0x6a, 0xe3, 0x46, + 0x14, 0x8e, 0x6c, 0xaf, 0x6d, 0x1d, 0xff, 0xac, 0x3b, 0xbb, 0xdd, 0x8a, 0xb4, 0x08, 0xd7, 0xa5, + 0xc5, 0x17, 0x45, 0x6e, 0x15, 0x02, 0xdb, 0xbb, 0x6e, 0xd8, 0x42, 0xa1, 0x74, 0x13, 0x26, 0x69, + 0x2e, 0x42, 0x41, 0x8c, 0xac, 0xa9, 0x22, 0xaa, 0x9f, 0x61, 0x66, 0x14, 0xf0, 0x53, 0xb4, 0x2f, + 0xd2, 0xf7, 0xe8, 0x65, 0x2e, 0x7b, 0x59, 0x92, 0x77, 0xe8, 0x45, 0xaf, 0x8a, 0x66, 0x24, 0x5b, + 0x26, 0x32, 0xc1, 0x81, 0xb2, 0x57, 0x3e, 0x73, 0xe6, 0xcc, 0x77, 0x7e, 0xbe, 0xef, 0x08, 0xc3, + 0xb7, 0x61, 0x24, 0xaf, 0x73, 0xdf, 0x59, 0x66, 0xc9, 0x22, 0x39, 0x0a, 0xfc, 0x45, 0x72,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 0x8d, 0x3b, 0x67, 0xca, 0xc0, 0xeb, 0x08, 0xf4, 0x35, 0x7c, 0x18, + 0x13, 0x21, 0xbd, 0x9c, 0x05, 0x45, 0x8b, 0x1e, 0x91, 0x65, 0xca, 0xae, 0x4a, 0x89, 0x8a, 0xcb, + 0x9f, 0xf4, 0xdd, 0x1b, 0xa9, 0x13, 0x7f, 0x01, 0xcf, 0xb7, 0x9e, 0xf8, 0x2b, 0xab, 0xa7, 0x2a, + 0x18, 0xd5, 0x82, 0x4f, 0x56, 0xe8, 0x07, 0xf8, 0xa0, 0x46, 0xbe, 0x27, 0x57, 0x8c, 0x0a, 0xab, + 0x3f, 0x6d, 0xcf, 0xc7, 0xae, 0xed, 0x6c, 0x89, 0xc4, 0x79, 0xb3, 0x39, 0x5d, 0xac, 0x18, 0xc5, + 0x13, 0xb2, 0xed, 0x10, 0xe8, 0x04, 0x26, 0x42, 0x66, 0x9c, 0x84, 0xd4, 0x5b, 0x77, 0x67, 0xaa, + 0xee, 0x3e, 0xda, 0x74, 0x77, 0xae, 0x23, 0xca, 0x26, 0x9f, 0x8b, 0xda, 0xb1, 0xe8, 0xf5, 0x18, + 0x06, 0x01, 0xcf, 0x98, 0x06, 0x58, 0x59, 0x30, 0x35, 0xe6, 0x63, 0xf7, 0xe5, 0xe6, 0xf9, 0x5b, + 0x9e, 0xb1, 0xf2, 0x2d, 0x04, 0x6b, 0x1b, 0x7d, 0x0a, 0x1d, 0x49, 0x42, 0x61, 0x0d, 0x54, 0xba, + 0x91, 0x53, 0xf1, 0xef, 0x5c, 0x90, 0x10, 0xab, 0xab, 0xd9, 0xcf, 0x30, 0xa8, 0x71, 0x5f, 0x70, + 0x9e, 0xe7, 0x51, 0x50, 0x71, 0x5e, 0xd8, 0xe8, 0x1b, 0x30, 0x45, 0xa9, 0x09, 0x61, 0xb5, 0x14, + 0xd4, 0xc7, 0x8e, 0xde, 0x30, 0xa7, 0x41, 0x37, 0x78, 0x13, 0x3d, 0x0b, 0x60, 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 0xc5, 0xb0, 0x89, 0x37, 0x0e, 0x34, 0x87, 0xc9, 0x92, 0xd3, 0xed, 0x71, + 0x6b, 0x8e, 0xc7, 0xa5, 0xbf, 0x1a, 0xf5, 0x4e, 0x76, 0x3a, 0x3b, 0xd9, 0xd9, 0x56, 0xd7, 0xb3, + 0xc7, 0xd5, 0xd5, 0x6d, 0x50, 0xd7, 0x6b, 0x18, 0x25, 0xfa, 0x2b, 0xe0, 0x15, 0xf3, 0x10, 0x56, + 0x4f, 0x4d, 0xe7, 0x45, 0xc3, 0x27, 0x02, 0x0f, 0x93, 0xcd, 0xa1, 0xf8, 0xaa, 0x0d, 0xb9, 0x1a, + 0x5d, 0xf9, 0x50, 0xd3, 0x8e, 0x1e, 0x8e, 0x15, 0x0f, 0xf8, 0xda, 0x6e, 0xd4, 0x94, 0xd9, 0xa0, + 0xa9, 0x93, 0xd3, 0x3f, 0xef, 0x6c, 0xe3, 0xf6, 0xce, 0x36, 0xfe, 0xbe, 0xb3, 0x8d, 0xdf, 0xef, + 0xed, 0x83, 0xdb, 0x7b, 0xfb, 0xe0, 0xaf, 0x7b, 0xfb, 0xe0, 0xea, 0xf8, 0x49, 0xff, 0x30, 0xfc, + 0xae, 0x3a, 0x1d, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xa8, 0xef, 0x67, 0xa1, 0x08, 0x00, + 0x00, +} + func (m *MappingRuleSnapshot) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -439,60 +702,48 @@ func (m *MappingRuleSnapshot) Marshal() (dAtA []byte, err error) { } func (m *MappingRuleSnapshot) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MappingRuleSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRule(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Tombstoned { - dAtA[i] = 0x10 - i++ - if m.Tombstoned { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Tags) > 0 { + for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Tags[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a } - i++ } - if m.CutoverNanos != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintRule(dAtA, i, uint64(m.CutoverNanos)) - } - if len(m.Filter) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintRule(dAtA, i, uint64(len(m.Filter))) - i += copy(dAtA[i:], m.Filter) + if m.DropPolicy != 0 { + i = encodeVarintRule(dAtA, i, uint64(m.DropPolicy)) + i-- + dAtA[i] = 0x50 } - if len(m.Policies) > 0 { - for _, msg := range m.Policies { - dAtA[i] = 0x2a - i++ - i = encodeVarintRule(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.StoragePolicies) > 0 { + for iNdEx := len(m.StoragePolicies) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.StoragePolicies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x4a } } - if m.LastUpdatedAtNanos != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintRule(dAtA, i, uint64(m.LastUpdatedAtNanos)) - } - if len(m.LastUpdatedBy) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintRule(dAtA, i, uint64(len(m.LastUpdatedBy))) - i += copy(dAtA[i:], m.LastUpdatedBy) - } if len(m.AggregationTypes) > 0 { dAtA2 := make([]byte, len(m.AggregationTypes)*10) var j1 int @@ -505,47 +756,74 @@ func (m *MappingRuleSnapshot) MarshalTo(dAtA []byte) (int, error) { dAtA2[j1] = uint8(num) j1++ } - dAtA[i] = 0x42 - i++ + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) i = encodeVarintRule(dAtA, i, uint64(j1)) - i += copy(dAtA[i:], dAtA2[:j1]) + i-- + dAtA[i] = 0x42 } - if len(m.StoragePolicies) > 0 { - for _, msg := range m.StoragePolicies { - dAtA[i] = 0x4a - i++ - i = encodeVarintRule(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.LastUpdatedBy) > 0 { + i -= len(m.LastUpdatedBy) + copy(dAtA[i:], m.LastUpdatedBy) + i = encodeVarintRule(dAtA, i, uint64(len(m.LastUpdatedBy))) + i-- + dAtA[i] = 0x3a + } + if m.LastUpdatedAtNanos != 0 { + i = encodeVarintRule(dAtA, i, uint64(m.LastUpdatedAtNanos)) + i-- + dAtA[i] = 0x30 + } + if len(m.Policies) > 0 { + for iNdEx := len(m.Policies) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Policies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x2a } } - if m.DropPolicy != 0 { - dAtA[i] = 0x50 - i++ - i = encodeVarintRule(dAtA, i, uint64(m.DropPolicy)) + if len(m.Filter) > 0 { + i -= len(m.Filter) + copy(dAtA[i:], m.Filter) + i = encodeVarintRule(dAtA, i, uint64(len(m.Filter))) + i-- + dAtA[i] = 0x22 } - if len(m.Tags) > 0 { - for _, msg := range m.Tags { - dAtA[i] = 0x5a - i++ - i = encodeVarintRule(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n + if m.CutoverNanos != 0 { + i = encodeVarintRule(dAtA, i, uint64(m.CutoverNanos)) + i-- + dAtA[i] = 0x18 + } + if m.Tombstoned { + i-- + if m.Tombstoned { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintRule(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *MappingRule) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -553,35 +831,43 @@ func (m *MappingRule) Marshal() (dAtA []byte, err error) { } func (m *MappingRule) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MappingRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Uuid) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRule(dAtA, i, uint64(len(m.Uuid))) - i += copy(dAtA[i:], m.Uuid) - } if len(m.Snapshots) > 0 { - for _, msg := range m.Snapshots { - dAtA[i] = 0x12 - i++ - i = encodeVarintRule(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Snapshots[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - return i, nil + if len(m.Uuid) > 0 { + i -= len(m.Uuid) + copy(dAtA[i:], m.Uuid) + i = encodeVarintRule(dAtA, i, uint64(len(m.Uuid))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *RollupTarget) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -589,50 +875,52 @@ func (m *RollupTarget) Marshal() (dAtA []byte, err error) { } func (m *RollupTarget) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RollupTarget) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRule(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if len(m.Policies) > 0 { + for iNdEx := len(m.Policies) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Policies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } if len(m.Tags) > 0 { - for _, s := range m.Tags { + for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Tags[iNdEx]) + copy(dAtA[i:], m.Tags[iNdEx]) + i = encodeVarintRule(dAtA, i, uint64(len(m.Tags[iNdEx]))) + i-- dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if len(m.Policies) > 0 { - for _, msg := range m.Policies { - dAtA[i] = 0x1a - i++ - i = encodeVarintRule(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintRule(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *RollupTargetV2) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -640,49 +928,58 @@ func (m *RollupTargetV2) Marshal() (dAtA []byte, err error) { } func (m *RollupTargetV2) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RollupTargetV2) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Pipeline != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRule(dAtA, i, uint64(m.Pipeline.Size())) - n3, err := m.Pipeline.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.ResendEnabled { + i-- + if m.ResendEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i += n3 + i-- + dAtA[i] = 0x18 } if len(m.StoragePolicies) > 0 { - for _, msg := range m.StoragePolicies { + for iNdEx := len(m.StoragePolicies) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.StoragePolicies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintRule(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + } + } + if m.Pipeline != nil { + { + size, err := m.Pipeline.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n - } - } - if m.ResendEnabled { - dAtA[i] = 0x18 - i++ - if m.ResendEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) } - i++ + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *RollupRuleSnapshot) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -690,101 +987,115 @@ func (m *RollupRuleSnapshot) Marshal() (dAtA []byte, err error) { } func (m *RollupRuleSnapshot) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RollupRuleSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRule(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if len(m.Tags) > 0 { + for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Tags[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } } - if m.Tombstoned { - dAtA[i] = 0x10 - i++ - if m.Tombstoned { + if m.KeepOriginal { + i-- + if m.KeepOriginal { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ - } - if m.CutoverNanos != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintRule(dAtA, i, uint64(m.CutoverNanos)) - } - if len(m.Filter) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintRule(dAtA, i, uint64(len(m.Filter))) - i += copy(dAtA[i:], m.Filter) + i-- + dAtA[i] = 0x48 } - if len(m.Targets) > 0 { - for _, msg := range m.Targets { - dAtA[i] = 0x2a - i++ - i = encodeVarintRule(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.TargetsV2) > 0 { + for iNdEx := len(m.TargetsV2) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TargetsV2[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x42 } } - if m.LastUpdatedAtNanos != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintRule(dAtA, i, uint64(m.LastUpdatedAtNanos)) - } if len(m.LastUpdatedBy) > 0 { - dAtA[i] = 0x3a - i++ + i -= len(m.LastUpdatedBy) + copy(dAtA[i:], m.LastUpdatedBy) i = encodeVarintRule(dAtA, i, uint64(len(m.LastUpdatedBy))) - i += copy(dAtA[i:], m.LastUpdatedBy) + i-- + dAtA[i] = 0x3a } - if len(m.TargetsV2) > 0 { - for _, msg := range m.TargetsV2 { - dAtA[i] = 0x42 - i++ - i = encodeVarintRule(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.LastUpdatedAtNanos != 0 { + i = encodeVarintRule(dAtA, i, uint64(m.LastUpdatedAtNanos)) + i-- + dAtA[i] = 0x30 + } + if len(m.Targets) > 0 { + for iNdEx := len(m.Targets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Targets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x2a } } - if m.KeepOriginal { - dAtA[i] = 0x48 - i++ - if m.KeepOriginal { + if len(m.Filter) > 0 { + i -= len(m.Filter) + copy(dAtA[i:], m.Filter) + i = encodeVarintRule(dAtA, i, uint64(len(m.Filter))) + i-- + dAtA[i] = 0x22 + } + if m.CutoverNanos != 0 { + i = encodeVarintRule(dAtA, i, uint64(m.CutoverNanos)) + i-- + dAtA[i] = 0x18 + } + if m.Tombstoned { + i-- + if m.Tombstoned { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if len(m.Tags) > 0 { - for _, msg := range m.Tags { - dAtA[i] = 0x52 - i++ - i = encodeVarintRule(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintRule(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *RollupRule) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -792,35 +1103,43 @@ func (m *RollupRule) Marshal() (dAtA []byte, err error) { } func (m *RollupRule) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RollupRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Uuid) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRule(dAtA, i, uint64(len(m.Uuid))) - i += copy(dAtA[i:], m.Uuid) - } if len(m.Snapshots) > 0 { - for _, msg := range m.Snapshots { - dAtA[i] = 0x12 - i++ - i = encodeVarintRule(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Snapshots[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - return i, nil + if len(m.Uuid) > 0 { + i -= len(m.Uuid) + copy(dAtA[i:], m.Uuid) + i = encodeVarintRule(dAtA, i, uint64(len(m.Uuid))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *RuleSet) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -828,90 +1147,107 @@ func (m *RuleSet) Marshal() (dAtA []byte, err error) { } func (m *RuleSet) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RuleSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Uuid) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRule(dAtA, i, uint64(len(m.Uuid))) - i += copy(dAtA[i:], m.Uuid) + if len(m.LastUpdatedBy) > 0 { + i -= len(m.LastUpdatedBy) + copy(dAtA[i:], m.LastUpdatedBy) + i = encodeVarintRule(dAtA, i, uint64(len(m.LastUpdatedBy))) + i-- + dAtA[i] = 0x4a } - if len(m.Namespace) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRule(dAtA, i, uint64(len(m.Namespace))) - i += copy(dAtA[i:], m.Namespace) + if len(m.RollupRules) > 0 { + for iNdEx := len(m.RollupRules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RollupRules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } } - if m.CreatedAtNanos != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintRule(dAtA, i, uint64(m.CreatedAtNanos)) + if len(m.MappingRules) > 0 { + for iNdEx := len(m.MappingRules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MappingRules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRule(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } } - if m.LastUpdatedAtNanos != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintRule(dAtA, i, uint64(m.LastUpdatedAtNanos)) + if m.CutoverNanos != 0 { + i = encodeVarintRule(dAtA, i, uint64(m.CutoverNanos)) + i-- + dAtA[i] = 0x30 } if m.Tombstoned { - dAtA[i] = 0x28 - i++ + i-- if m.Tombstoned { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x28 } - if m.CutoverNanos != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintRule(dAtA, i, uint64(m.CutoverNanos)) + if m.LastUpdatedAtNanos != 0 { + i = encodeVarintRule(dAtA, i, uint64(m.LastUpdatedAtNanos)) + i-- + dAtA[i] = 0x20 } - if len(m.MappingRules) > 0 { - for _, msg := range m.MappingRules { - dAtA[i] = 0x3a - i++ - i = encodeVarintRule(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.CreatedAtNanos != 0 { + i = encodeVarintRule(dAtA, i, uint64(m.CreatedAtNanos)) + i-- + dAtA[i] = 0x18 } - if len(m.RollupRules) > 0 { - for _, msg := range m.RollupRules { - dAtA[i] = 0x42 - i++ - i = encodeVarintRule(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRule(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 } - if len(m.LastUpdatedBy) > 0 { - dAtA[i] = 0x4a - i++ - i = encodeVarintRule(dAtA, i, uint64(len(m.LastUpdatedBy))) - i += copy(dAtA[i:], m.LastUpdatedBy) + if len(m.Uuid) > 0 { + i -= len(m.Uuid) + copy(dAtA[i:], m.Uuid) + i = encodeVarintRule(dAtA, i, uint64(len(m.Uuid))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintRule(dAtA []byte, offset int, v uint64) int { + offset -= sovRule(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *MappingRuleSnapshot) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -967,6 +1303,9 @@ func (m *MappingRuleSnapshot) Size() (n int) { } func (m *MappingRule) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Uuid) @@ -983,6 +1322,9 @@ func (m *MappingRule) Size() (n int) { } func (m *RollupTarget) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -1005,6 +1347,9 @@ func (m *RollupTarget) Size() (n int) { } func (m *RollupTargetV2) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Pipeline != nil { @@ -1024,6 +1369,9 @@ func (m *RollupTargetV2) Size() (n int) { } func (m *RollupRuleSnapshot) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -1072,6 +1420,9 @@ func (m *RollupRuleSnapshot) Size() (n int) { } func (m *RollupRule) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Uuid) @@ -1088,6 +1439,9 @@ func (m *RollupRule) Size() (n int) { } func (m *RuleSet) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Uuid) @@ -1130,14 +1484,7 @@ func (m *RuleSet) Size() (n int) { } func sovRule(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRule(x uint64) (n int) { return sovRule(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1157,7 +1504,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1185,7 +1532,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1195,6 +1542,9 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1214,7 +1564,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1234,7 +1584,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CutoverNanos |= (int64(b) & 0x7F) << shift + m.CutoverNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1253,7 +1603,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1263,6 +1613,9 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1282,7 +1635,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1291,6 +1644,9 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1313,7 +1669,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastUpdatedAtNanos |= (int64(b) & 0x7F) << shift + m.LastUpdatedAtNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1332,7 +1688,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1342,6 +1698,9 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1359,7 +1718,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (aggregationpb.AggregationType(b) & 0x7F) << shift + v |= aggregationpb.AggregationType(b&0x7F) << shift if b < 0x80 { break } @@ -1376,7 +1735,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1385,9 +1744,16 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + if elementCount != 0 && len(m.AggregationTypes) == 0 { + m.AggregationTypes = make([]aggregationpb.AggregationType, 0, elementCount) + } for iNdEx < postIndex { var v aggregationpb.AggregationType for shift := uint(0); ; shift += 7 { @@ -1399,7 +1765,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (aggregationpb.AggregationType(b) & 0x7F) << shift + v |= aggregationpb.AggregationType(b&0x7F) << shift if b < 0x80 { break } @@ -1423,7 +1789,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1432,6 +1798,9 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1454,7 +1823,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DropPolicy |= (policypb.DropPolicy(b) & 0x7F) << shift + m.DropPolicy |= policypb.DropPolicy(b&0x7F) << shift if b < 0x80 { break } @@ -1473,7 +1842,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1482,6 +1851,9 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1496,7 +1868,7 @@ func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRule } if (iNdEx + skippy) > l { @@ -1526,7 +1898,7 @@ func (m *MappingRule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1554,7 +1926,7 @@ func (m *MappingRule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1564,6 +1936,9 @@ func (m *MappingRule) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1583,7 +1958,7 @@ func (m *MappingRule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1592,6 +1967,9 @@ func (m *MappingRule) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1606,7 +1984,7 @@ func (m *MappingRule) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRule } if (iNdEx + skippy) > l { @@ -1636,7 +2014,7 @@ func (m *RollupTarget) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1664,7 +2042,7 @@ func (m *RollupTarget) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1674,6 +2052,9 @@ func (m *RollupTarget) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1693,7 +2074,7 @@ func (m *RollupTarget) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1703,6 +2084,9 @@ func (m *RollupTarget) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1722,7 +2106,7 @@ func (m *RollupTarget) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1731,6 +2115,9 @@ func (m *RollupTarget) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1745,7 +2132,7 @@ func (m *RollupTarget) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRule } if (iNdEx + skippy) > l { @@ -1775,7 +2162,7 @@ func (m *RollupTargetV2) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1803,7 +2190,7 @@ func (m *RollupTargetV2) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1812,6 +2199,9 @@ func (m *RollupTargetV2) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1836,7 +2226,7 @@ func (m *RollupTargetV2) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1845,6 +2235,9 @@ func (m *RollupTargetV2) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1867,7 +2260,7 @@ func (m *RollupTargetV2) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1879,7 +2272,7 @@ func (m *RollupTargetV2) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRule } if (iNdEx + skippy) > l { @@ -1909,7 +2302,7 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1937,7 +2330,7 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1947,6 +2340,9 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1966,7 +2362,7 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1986,7 +2382,7 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CutoverNanos |= (int64(b) & 0x7F) << shift + m.CutoverNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -2005,7 +2401,7 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2015,6 +2411,9 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2034,7 +2433,7 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2043,6 +2442,9 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2065,7 +2467,7 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastUpdatedAtNanos |= (int64(b) & 0x7F) << shift + m.LastUpdatedAtNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -2084,7 +2486,7 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2094,6 +2496,9 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2113,7 +2518,7 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2122,6 +2527,9 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2144,7 +2552,7 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2164,7 +2572,7 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2173,6 +2581,9 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2187,7 +2598,7 @@ func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRule } if (iNdEx + skippy) > l { @@ -2217,7 +2628,7 @@ func (m *RollupRule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2245,7 +2656,7 @@ func (m *RollupRule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2255,6 +2666,9 @@ func (m *RollupRule) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2274,7 +2688,7 @@ func (m *RollupRule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2283,6 +2697,9 @@ func (m *RollupRule) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2297,7 +2714,7 @@ func (m *RollupRule) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRule } if (iNdEx + skippy) > l { @@ -2327,7 +2744,7 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2355,7 +2772,7 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2365,6 +2782,9 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2384,7 +2804,7 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2394,6 +2814,9 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2413,7 +2836,7 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CreatedAtNanos |= (int64(b) & 0x7F) << shift + m.CreatedAtNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -2432,7 +2855,7 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastUpdatedAtNanos |= (int64(b) & 0x7F) << shift + m.LastUpdatedAtNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -2451,7 +2874,7 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2471,7 +2894,7 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CutoverNanos |= (int64(b) & 0x7F) << shift + m.CutoverNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -2490,7 +2913,7 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2499,6 +2922,9 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2521,7 +2947,7 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2530,6 +2956,9 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2552,7 +2981,7 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2562,6 +2991,9 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRule } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRule + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2573,7 +3005,7 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRule } if (iNdEx + skippy) > l { @@ -2591,6 +3023,7 @@ func (m *RuleSet) Unmarshal(dAtA []byte) error { func skipRule(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2622,10 +3055,8 @@ func skipRule(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2642,110 +3073,34 @@ func skipRule(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthRule } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRule - } - 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 := skipRule(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRule + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthRule + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthRule = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRule = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthRule = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRule = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRule = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/rulepb/rule.proto", fileDescriptorRule) -} - -var fileDescriptorRule = []byte{ - // 775 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcb, 0x6e, 0xf3, 0x44, - 0x14, 0xc6, 0x49, 0x9a, 0xc4, 0x27, 0x97, 0x86, 0x69, 0x29, 0x56, 0x41, 0x51, 0x08, 0x02, 0x65, - 0x81, 0x1c, 0x70, 0x55, 0xa9, 0xec, 0x68, 0x55, 0x04, 0x12, 0xa2, 0x54, 0xd3, 0xd2, 0x45, 0x85, - 0x64, 0x8d, 0xe3, 0xc1, 0xb5, 0xf0, 0x65, 0x34, 0x33, 0xae, 0x94, 0xa7, 0x80, 0x17, 0xe1, 0x3d, - 0x58, 0xf2, 0x08, 0xa8, 0xbc, 0x03, 0x0b, 0x56, 0xbf, 0x3c, 0x63, 0x27, 0x8e, 0xea, 0xa8, 0x4a, - 0xa5, 0x5f, 0xff, 0x2a, 0x67, 0xce, 0x9c, 0xf9, 0xce, 0xe5, 0xfb, 0x8e, 0x15, 0xf8, 0x26, 0x08, - 0xe5, 0x43, 0xe6, 0xd9, 0x8b, 0x34, 0x9e, 0xc7, 0x27, 0xbe, 0x37, 0x8f, 0x4f, 0xe6, 0x82, 0x2f, - 0xe6, 0x31, 0x95, 0x3c, 0x5c, 0x88, 0x79, 0x40, 0x13, 0xca, 0x89, 0xa4, 0xfe, 0x9c, 0xf1, 0x54, - 0xa6, 0x73, 0x9e, 0x45, 0x94, 0x79, 0xea, 0xc7, 0x56, 0x1e, 0xd4, 0xd6, 0xae, 0xe3, 0xab, 0x1d, - 0x91, 0x48, 0x10, 0x70, 0x1a, 0x10, 0x19, 0xa6, 0x09, 0xf3, 0xaa, 0x27, 0x8d, 0x7b, 0xfc, 0xfd, - 0x8e, 0x78, 0x2c, 0x64, 0x34, 0x0a, 0x93, 0xbc, 0xba, 0xd2, 0x2c, 0x90, 0x2e, 0x77, 0x45, 0x4a, - 0xa3, 0x70, 0xb1, 0xcc, 0x71, 0x94, 0xf1, 0x4a, 0x14, 0xed, 0x67, 0x5e, 0x61, 0x68, 0x94, 0xe9, - 0xff, 0x4d, 0x38, 0xf8, 0x91, 0x30, 0x16, 0x26, 0x01, 0xce, 0x22, 0x7a, 0x93, 0x10, 0x26, 0x1e, - 0x52, 0x89, 0x10, 0xb4, 0x12, 0x12, 0x53, 0xcb, 0x98, 0x18, 0x33, 0x13, 0x2b, 0x1b, 0x8d, 0x01, - 0x64, 0x1a, 0x7b, 0x42, 0xa6, 0x09, 0xf5, 0xad, 0xc6, 0xc4, 0x98, 0x75, 0x71, 0xc5, 0x83, 0x3e, - 0x85, 0xc1, 0x22, 0x93, 0xe9, 0x23, 0xe5, 0x6e, 0x42, 0x92, 0x54, 0x58, 0xcd, 0x89, 0x31, 0x6b, - 0xe2, 0x7e, 0xe1, 0xbc, 0xca, 0x7d, 0xe8, 0x08, 0xda, 0xbf, 0x86, 0x91, 0xa4, 0xdc, 0x6a, 0x29, - 0xe8, 0xe2, 0x84, 0xbe, 0x80, 0xae, 0x6a, 0x2f, 0xa4, 0xc2, 0xda, 0x9b, 0x34, 0x67, 0x3d, 0x67, - 0x64, 0x97, 0x8d, 0xdb, 0xd7, 0xca, 0xc0, 0xab, 0x08, 0xf4, 0x15, 0x7c, 0x10, 0x11, 0x21, 0xdd, - 0x8c, 0xf9, 0x79, 0x8b, 0x2e, 0x91, 0x45, 0xca, 0xb6, 0x4a, 0x89, 0xf2, 0xcb, 0x9f, 0xf5, 0xdd, - 0xb9, 0xd4, 0x89, 0x3f, 0x87, 0xfd, 0x8d, 0x27, 0xde, 0xd2, 0xea, 0xa8, 0x0a, 0x06, 0x95, 0xe0, - 0x8b, 0x25, 0xfa, 0x01, 0xde, 0xaf, 0x90, 0xef, 0xca, 0x25, 0xa3, 0xc2, 0xea, 0x4e, 0x9a, 0xb3, - 0xa1, 0x33, 0xb6, 0x37, 0x44, 0x62, 0x9f, 0xaf, 0x4f, 0xb7, 0x4b, 0x46, 0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, 0x6b, 0x35, 0x65, 0xd6, 0x68, 0xea, 0xe2, 0xbb, 0xbf, - 0x9e, 0xc6, 0xc6, 0xdf, 0x4f, 0x63, 0xe3, 0x9f, 0xa7, 0xb1, 0xf1, 0xc7, 0xbf, 0xe3, 0xf7, 0xee, - 0x4f, 0x5f, 0xf5, 0xcf, 0xc2, 0x6b, 0xab, 0xd3, 0xc9, 0x9b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x66, - 0x1c, 0x70, 0x44, 0x99, 0x08, 0x00, 0x00, -} diff --git a/src/metrics/generated/proto/transformationpb/transformation.pb.go b/src/metrics/generated/proto/transformationpb/transformation.pb.go index 88f42764c8..36f36f5aca 100644 --- a/src/metrics/generated/proto/transformationpb/transformation.pb.go +++ b/src/metrics/generated/proto/transformationpb/transformation.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/metrics/generated/proto/transformationpb/transformation.proto -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,19 +21,13 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* -Package transformationpb is a generated protocol buffer package. - -It is generated from these files: - github.com/m3db/m3/src/metrics/generated/proto/transformationpb/transformation.proto - -It has these top-level messages: -*/ package transformationpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -44,7 +38,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type TransformationType int32 @@ -65,6 +59,7 @@ var TransformationType_name = map[int32]string{ 4: "ADD", 5: "RESET", } + var TransformationType_value = map[string]int32{ "UNKNOWN": 0, "ABSOLUTE": 1, @@ -77,8 +72,9 @@ var TransformationType_value = map[string]int32{ func (x TransformationType) String() string { return proto.EnumName(TransformationType_name, int32(x)) } + func (TransformationType) EnumDescriptor() ([]byte, []int) { - return fileDescriptorTransformation, []int{0} + return fileDescriptor_52d9d07487101988, []int{0} } func init() { @@ -86,11 +82,11 @@ func init() { } func init() { - proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/transformationpb/transformation.proto", fileDescriptorTransformation) + proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/transformationpb/transformation.proto", fileDescriptor_52d9d07487101988) } -var fileDescriptorTransformation = []byte{ - // 212 bytes of a gzipped FileDescriptorProto +var fileDescriptor_52d9d07487101988 = []byte{ + // 220 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x0a, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, 0x2e, 0x4a, 0xd6, 0xcf, 0x4d, 0x2d, 0x29, 0xca, 0x4c, 0x2e, 0xd6, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, @@ -101,8 +97,8 @@ var fileDescriptorTransformation = []byte{ 0xe1, 0xe8, 0x14, 0xec, 0xef, 0x13, 0x1a, 0xe2, 0x2a, 0xc0, 0x28, 0xc4, 0xcb, 0xc5, 0x19, 0xe0, 0x1a, 0x14, 0xec, 0xea, 0xec, 0xef, 0xe7, 0x22, 0xc0, 0x04, 0x92, 0xf4, 0xf4, 0x73, 0x0e, 0x72, 0x75, 0x0c, 0x76, 0x15, 0x60, 0x16, 0x62, 0xe7, 0x62, 0x76, 0x74, 0x71, 0x11, 0x60, 0x11, 0xe2, - 0xe4, 0x62, 0x0d, 0x72, 0x0d, 0x76, 0x0d, 0x11, 0x60, 0x75, 0x0a, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, - 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0x88, 0xb2, 0xa7, 0xd0, - 0x6f, 0x49, 0x6c, 0x60, 0x71, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x71, 0x38, 0xb4, 0xa1, - 0x25, 0x01, 0x00, 0x00, + 0xe4, 0x62, 0x0d, 0x72, 0x0d, 0x76, 0x0d, 0x11, 0x60, 0x75, 0x8a, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, + 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, + 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x7b, 0x0a, 0xfd, 0x98, 0xc4, 0x06, 0x16, 0x37, 0x06, 0x04, + 0x00, 0x00, 0xff, 0xff, 0xd0, 0xbc, 0xfc, 0x98, 0x2d, 0x01, 0x00, 0x00, } diff --git a/src/metrics/metric/id/m3/id_bench_test.go b/src/metrics/metric/id/m3/id_bench_test.go index 0271a40383..a2cc7b3297 100644 --- a/src/metrics/metric/id/m3/id_bench_test.go +++ b/src/metrics/metric/id/m3/id_bench_test.go @@ -1,3 +1,23 @@ +// Copyright (c) 2024 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + package m3 import ( diff --git a/src/metrics/rules/active_ruleset_bench_test.go b/src/metrics/rules/active_ruleset_bench_test.go index da9f2540fc..4b2eddfd7b 100644 --- a/src/metrics/rules/active_ruleset_bench_test.go +++ b/src/metrics/rules/active_ruleset_bench_test.go @@ -1,3 +1,23 @@ +// Copyright (c) 2024 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + package rules import ( diff --git a/src/msg/generated/proto/msgpb/msg.pb.go b/src/msg/generated/proto/msgpb/msg.pb.go index 30395d7060..7bed3db340 100644 --- a/src/msg/generated/proto/msgpb/msg.pb.go +++ b/src/msg/generated/proto/msgpb/msg.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/msg/generated/proto/msgpb/msg.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,25 +21,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package msgpb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/msg/generated/proto/msgpb/msg.proto - - It has these top-level messages: - Metadata - Message - Ack -*/ package msgpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -50,7 +41,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Metadata struct { Shard uint64 `protobuf:"varint,1,opt,name=shard,proto3" json:"shard,omitempty"` @@ -58,10 +49,38 @@ type Metadata struct { SentAtNanos uint64 `protobuf:"varint,3,opt,name=sentAtNanos,proto3" json:"sentAtNanos,omitempty"` } -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { return fileDescriptorMsg, []int{0} } +func (m *Metadata) Reset() { *m = Metadata{} } +func (m *Metadata) String() string { return proto.CompactTextString(m) } +func (*Metadata) ProtoMessage() {} +func (*Metadata) Descriptor() ([]byte, []int) { + return fileDescriptor_3489de64506039f5, []int{0} +} +func (m *Metadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metadata.Merge(m, src) +} +func (m *Metadata) XXX_Size() int { + return m.Size() +} +func (m *Metadata) XXX_DiscardUnknown() { + xxx_messageInfo_Metadata.DiscardUnknown(m) +} + +var xxx_messageInfo_Metadata proto.InternalMessageInfo func (m *Metadata) GetShard() uint64 { if m != nil { @@ -85,14 +104,42 @@ func (m *Metadata) GetSentAtNanos() uint64 { } type Message struct { - Metadata Metadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata"` + Metadata Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorMsg, []int{1} } +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_3489de64506039f5, []int{1} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.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 *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(m, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo func (m *Message) GetMetadata() Metadata { if m != nil { @@ -109,13 +156,41 @@ func (m *Message) GetValue() []byte { } type Ack struct { - Metadata []Metadata `protobuf:"bytes,1,rep,name=metadata" json:"metadata"` + Metadata []Metadata `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata"` } -func (m *Ack) Reset() { *m = Ack{} } -func (m *Ack) String() string { return proto.CompactTextString(m) } -func (*Ack) ProtoMessage() {} -func (*Ack) Descriptor() ([]byte, []int) { return fileDescriptorMsg, []int{2} } +func (m *Ack) Reset() { *m = Ack{} } +func (m *Ack) String() string { return proto.CompactTextString(m) } +func (*Ack) ProtoMessage() {} +func (*Ack) Descriptor() ([]byte, []int) { + return fileDescriptor_3489de64506039f5, []int{2} +} +func (m *Ack) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Ack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Ack.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 *Ack) XXX_Merge(src proto.Message) { + xxx_messageInfo_Ack.Merge(m, src) +} +func (m *Ack) XXX_Size() int { + return m.Size() +} +func (m *Ack) XXX_DiscardUnknown() { + xxx_messageInfo_Ack.DiscardUnknown(m) +} + +var xxx_messageInfo_Ack proto.InternalMessageInfo func (m *Ack) GetMetadata() []Metadata { if m != nil { @@ -129,10 +204,36 @@ func init() { proto.RegisterType((*Message)(nil), "msgpb.Message") proto.RegisterType((*Ack)(nil), "msgpb.Ack") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/msg/generated/proto/msgpb/msg.proto", fileDescriptor_3489de64506039f5) +} + +var fileDescriptor_3489de64506039f5 = []byte{ + // 262 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4a, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, + 0x2e, 0x4a, 0xd6, 0xcf, 0x2d, 0x4e, 0xd7, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, + 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x07, 0x89, 0x15, 0x24, 0x81, 0x48, 0x3d, 0x30, 0x5f, 0x88, + 0x15, 0x2c, 0x20, 0xa5, 0x8b, 0x64, 0x44, 0x7a, 0x7e, 0x7a, 0x3e, 0x44, 0x75, 0x52, 0x69, 0x1a, + 0x98, 0x07, 0xd1, 0x0a, 0x62, 0x41, 0x74, 0x29, 0x05, 0x71, 0x71, 0xf8, 0xa6, 0x96, 0x24, 0xa6, + 0x24, 0x96, 0x24, 0x0a, 0x89, 0x70, 0xb1, 0x16, 0x67, 0x24, 0x16, 0xa5, 0x48, 0x30, 0x2a, 0x30, + 0x6a, 0xb0, 0x04, 0x41, 0x38, 0x42, 0x7c, 0x5c, 0x4c, 0x99, 0x29, 0x12, 0x4c, 0x60, 0x21, 0xa6, + 0xcc, 0x14, 0x21, 0x05, 0x2e, 0xee, 0xe2, 0xd4, 0xbc, 0x12, 0xc7, 0x12, 0xbf, 0xc4, 0xbc, 0xfc, + 0x62, 0x09, 0x66, 0xb0, 0x04, 0xb2, 0x90, 0x52, 0x10, 0x17, 0xbb, 0x6f, 0x6a, 0x71, 0x71, 0x62, + 0x7a, 0xaa, 0x90, 0x21, 0x17, 0x47, 0x2e, 0xd4, 0x78, 0xb0, 0xa9, 0xdc, 0x46, 0xfc, 0x7a, 0x60, + 0x77, 0xea, 0xc1, 0x6c, 0x75, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xae, 0x0c, 0xe4, 0x8a, + 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0xb0, 0x95, 0x3c, 0x41, 0x10, 0x8e, 0x92, 0x05, 0x17, 0xb3, 0x63, + 0x72, 0x36, 0x9a, 0x79, 0xcc, 0x44, 0x98, 0xe7, 0x24, 0x71, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, + 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, + 0xc7, 0x72, 0x0c, 0x49, 0x6c, 0xe0, 0x20, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x2e, 0x76, + 0x60, 0x12, 0x76, 0x01, 0x00, 0x00, +} + func (m *Metadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -140,32 +241,37 @@ func (m *Metadata) Marshal() (dAtA []byte, err error) { } func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Shard != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintMsg(dAtA, i, uint64(m.Shard)) + if m.SentAtNanos != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.SentAtNanos)) + i-- + dAtA[i] = 0x18 } if m.Id != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintMsg(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 } - if m.SentAtNanos != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintMsg(dAtA, i, uint64(m.SentAtNanos)) + if m.Shard != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Shard)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Message) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -173,31 +279,39 @@ func (m *Message) Marshal() (dAtA []byte, err error) { } func (m *Message) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintMsg(dAtA, i, uint64(m.Metadata.Size())) - n1, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Value) + copy(dAtA[i:], m.Value) i = encodeVarintMsg(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) + i-- + dAtA[i] = 0x12 } - return i, nil + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *Ack) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -205,35 +319,47 @@ func (m *Ack) Marshal() (dAtA []byte, err error) { } func (m *Ack) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Ack) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Metadata) > 0 { - for _, msg := range m.Metadata { - dAtA[i] = 0xa - i++ - i = encodeVarintMsg(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Metadata) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Metadata[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMsg(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func encodeVarintMsg(dAtA []byte, offset int, v uint64) int { + offset -= sovMsg(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Metadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Shard != 0 { @@ -249,6 +375,9 @@ func (m *Metadata) Size() (n int) { } func (m *Message) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Metadata.Size() @@ -261,6 +390,9 @@ func (m *Message) Size() (n int) { } func (m *Ack) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Metadata) > 0 { @@ -273,14 +405,7 @@ func (m *Ack) Size() (n int) { } func sovMsg(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozMsg(x uint64) (n int) { return sovMsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -300,7 +425,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -328,7 +453,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Shard |= (uint64(b) & 0x7F) << shift + m.Shard |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -347,7 +472,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= (uint64(b) & 0x7F) << shift + m.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -366,7 +491,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SentAtNanos |= (uint64(b) & 0x7F) << shift + m.SentAtNanos |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -377,7 +502,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsg } if (iNdEx + skippy) > l { @@ -407,7 +532,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -435,7 +560,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -444,6 +569,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMsg } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -465,7 +593,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -474,6 +602,9 @@ func (m *Message) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMsg } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -488,7 +619,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsg } if (iNdEx + skippy) > l { @@ -518,7 +649,7 @@ func (m *Ack) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -546,7 +677,7 @@ func (m *Ack) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -555,6 +686,9 @@ func (m *Ack) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMsg } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -569,7 +703,7 @@ func (m *Ack) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMsg } if (iNdEx + skippy) > l { @@ -587,6 +721,7 @@ func (m *Ack) Unmarshal(dAtA []byte) error { func skipMsg(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -618,10 +753,8 @@ func skipMsg(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -638,77 +771,34 @@ func skipMsg(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthMsg } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMsg - } - 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 := skipMsg(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMsg + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthMsg + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/msg/generated/proto/msgpb/msg.proto", fileDescriptorMsg) -} - -var fileDescriptorMsg = []byte{ - // 253 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4a, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, - 0x2e, 0x4a, 0xd6, 0xcf, 0x2d, 0x4e, 0xd7, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, - 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x07, 0x89, 0x15, 0x24, 0x81, 0x48, 0x3d, 0x30, 0x5f, 0x88, - 0x15, 0x2c, 0x20, 0xa5, 0x8b, 0x64, 0x44, 0x7a, 0x7e, 0x7a, 0x3e, 0x44, 0x75, 0x52, 0x69, 0x1a, - 0x98, 0x07, 0xd1, 0x0a, 0x62, 0x41, 0x74, 0x29, 0x05, 0x71, 0x71, 0xf8, 0xa6, 0x96, 0x24, 0xa6, - 0x24, 0x96, 0x24, 0x0a, 0x89, 0x70, 0xb1, 0x16, 0x67, 0x24, 0x16, 0xa5, 0x48, 0x30, 0x2a, 0x30, - 0x6a, 0xb0, 0x04, 0x41, 0x38, 0x42, 0x7c, 0x5c, 0x4c, 0x99, 0x29, 0x12, 0x4c, 0x60, 0x21, 0xa6, - 0xcc, 0x14, 0x21, 0x05, 0x2e, 0xee, 0xe2, 0xd4, 0xbc, 0x12, 0xc7, 0x12, 0xbf, 0xc4, 0xbc, 0xfc, - 0x62, 0x09, 0x66, 0xb0, 0x04, 0xb2, 0x90, 0x52, 0x10, 0x17, 0xbb, 0x6f, 0x6a, 0x71, 0x71, 0x62, - 0x7a, 0xaa, 0x90, 0x21, 0x17, 0x47, 0x2e, 0xd4, 0x78, 0xb0, 0xa9, 0xdc, 0x46, 0xfc, 0x7a, 0x60, - 0x77, 0xea, 0xc1, 0x6c, 0x75, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xae, 0x0c, 0xe4, 0x8a, - 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0xb0, 0x95, 0x3c, 0x41, 0x10, 0x8e, 0x92, 0x05, 0x17, 0xb3, 0x63, - 0x72, 0x36, 0x9a, 0x79, 0xcc, 0x44, 0x98, 0xe7, 0x24, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, - 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x90, 0xc4, 0x06, 0xf6, 0xba, 0x31, - 0x20, 0x00, 0x00, 0xff, 0xff, 0x60, 0x29, 0xbd, 0x49, 0x6e, 0x01, 0x00, 0x00, -} diff --git a/src/msg/generated/proto/topicpb/topic.pb.go b/src/msg/generated/proto/topicpb/topic.pb.go index c749befdd4..74fe90af06 100644 --- a/src/msg/generated/proto/topicpb/topic.pb.go +++ b/src/msg/generated/proto/topicpb/topic.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/msg/generated/proto/topicpb/topic.proto -// Copyright (c) 2018 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,24 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package topicpb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/msg/generated/proto/topicpb/topic.proto - - It has these top-level messages: - Topic - ConsumerService - ServiceID -*/ package topicpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -49,7 +40,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ConsumptionType int32 @@ -64,6 +55,7 @@ var ConsumptionType_name = map[int32]string{ 1: "SHARED", 2: "REPLICATED", } + var ConsumptionType_value = map[string]int32{ "UNKNOWN": 0, "SHARED": 1, @@ -73,18 +65,49 @@ var ConsumptionType_value = map[string]int32{ func (x ConsumptionType) String() string { return proto.EnumName(ConsumptionType_name, int32(x)) } -func (ConsumptionType) EnumDescriptor() ([]byte, []int) { return fileDescriptorTopic, []int{0} } + +func (ConsumptionType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_d836b24b87c59fae, []int{0} +} type Topic struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` NumberOfShards uint32 `protobuf:"varint,2,opt,name=number_of_shards,json=numberOfShards,proto3" json:"number_of_shards,omitempty"` - ConsumerServices []*ConsumerService `protobuf:"bytes,3,rep,name=consumer_services,json=consumerServices" json:"consumer_services,omitempty"` + ConsumerServices []*ConsumerService `protobuf:"bytes,3,rep,name=consumer_services,json=consumerServices,proto3" json:"consumer_services,omitempty"` } -func (m *Topic) Reset() { *m = Topic{} } -func (m *Topic) String() string { return proto.CompactTextString(m) } -func (*Topic) ProtoMessage() {} -func (*Topic) Descriptor() ([]byte, []int) { return fileDescriptorTopic, []int{0} } +func (m *Topic) Reset() { *m = Topic{} } +func (m *Topic) String() string { return proto.CompactTextString(m) } +func (*Topic) ProtoMessage() {} +func (*Topic) Descriptor() ([]byte, []int) { + return fileDescriptor_d836b24b87c59fae, []int{0} +} +func (m *Topic) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Topic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Topic.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 *Topic) XXX_Merge(src proto.Message) { + xxx_messageInfo_Topic.Merge(m, src) +} +func (m *Topic) XXX_Size() int { + return m.Size() +} +func (m *Topic) XXX_DiscardUnknown() { + xxx_messageInfo_Topic.DiscardUnknown(m) +} + +var xxx_messageInfo_Topic proto.InternalMessageInfo func (m *Topic) GetName() string { if m != nil { @@ -108,15 +131,43 @@ func (m *Topic) GetConsumerServices() []*ConsumerService { } type ConsumerService struct { - ServiceId *ServiceID `protobuf:"bytes,1,opt,name=service_id,json=serviceId" json:"service_id,omitempty"` + ServiceId *ServiceID `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` ConsumptionType ConsumptionType `protobuf:"varint,2,opt,name=consumption_type,json=consumptionType,proto3,enum=topicpb.ConsumptionType" json:"consumption_type,omitempty"` MessageTtlNanos int64 `protobuf:"varint,3,opt,name=message_ttl_nanos,json=messageTtlNanos,proto3" json:"message_ttl_nanos,omitempty"` } -func (m *ConsumerService) Reset() { *m = ConsumerService{} } -func (m *ConsumerService) String() string { return proto.CompactTextString(m) } -func (*ConsumerService) ProtoMessage() {} -func (*ConsumerService) Descriptor() ([]byte, []int) { return fileDescriptorTopic, []int{1} } +func (m *ConsumerService) Reset() { *m = ConsumerService{} } +func (m *ConsumerService) String() string { return proto.CompactTextString(m) } +func (*ConsumerService) ProtoMessage() {} +func (*ConsumerService) Descriptor() ([]byte, []int) { + return fileDescriptor_d836b24b87c59fae, []int{1} +} +func (m *ConsumerService) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConsumerService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConsumerService.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 *ConsumerService) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConsumerService.Merge(m, src) +} +func (m *ConsumerService) XXX_Size() int { + return m.Size() +} +func (m *ConsumerService) XXX_DiscardUnknown() { + xxx_messageInfo_ConsumerService.DiscardUnknown(m) +} + +var xxx_messageInfo_ConsumerService proto.InternalMessageInfo func (m *ConsumerService) GetServiceId() *ServiceID { if m != nil { @@ -145,10 +196,38 @@ type ServiceID struct { Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty"` } -func (m *ServiceID) Reset() { *m = ServiceID{} } -func (m *ServiceID) String() string { return proto.CompactTextString(m) } -func (*ServiceID) ProtoMessage() {} -func (*ServiceID) Descriptor() ([]byte, []int) { return fileDescriptorTopic, []int{2} } +func (m *ServiceID) Reset() { *m = ServiceID{} } +func (m *ServiceID) String() string { return proto.CompactTextString(m) } +func (*ServiceID) ProtoMessage() {} +func (*ServiceID) Descriptor() ([]byte, []int) { + return fileDescriptor_d836b24b87c59fae, []int{2} +} +func (m *ServiceID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceID.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 *ServiceID) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceID.Merge(m, src) +} +func (m *ServiceID) XXX_Size() int { + return m.Size() +} +func (m *ServiceID) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceID.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceID proto.InternalMessageInfo func (m *ServiceID) GetName() string { if m != nil { @@ -172,15 +251,49 @@ func (m *ServiceID) GetZone() string { } func init() { + proto.RegisterEnum("topicpb.ConsumptionType", ConsumptionType_name, ConsumptionType_value) proto.RegisterType((*Topic)(nil), "topicpb.Topic") proto.RegisterType((*ConsumerService)(nil), "topicpb.ConsumerService") proto.RegisterType((*ServiceID)(nil), "topicpb.ServiceID") - proto.RegisterEnum("topicpb.ConsumptionType", ConsumptionType_name, ConsumptionType_value) } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/msg/generated/proto/topicpb/topic.proto", fileDescriptor_d836b24b87c59fae) +} + +var fileDescriptor_d836b24b87c59fae = []byte{ + // 394 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcf, 0x6e, 0xd4, 0x30, + 0x10, 0x87, 0xe3, 0x2e, 0xb4, 0xca, 0x44, 0xec, 0xa6, 0x3e, 0xe5, 0x14, 0x45, 0x7b, 0x8a, 0x7a, + 0x48, 0x44, 0xf7, 0xc6, 0x01, 0xa9, 0xec, 0x46, 0x62, 0x05, 0x4a, 0x91, 0x37, 0x15, 0xc7, 0x28, + 0x7f, 0xdc, 0x34, 0x52, 0x6d, 0x47, 0xb6, 0xb7, 0x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xbc, 0xd4, + 0xf7, 0x03, 0x35, 0xde, 0xd3, 0x7f, 0x64, 0x4c, 0xa0, 0xb8, 0x1f, 0x28, 0x99, 0x35, 0x4f, 0x01, + 0x3e, 0x83, 0x53, 0x46, 0x95, 0xaa, 0x3a, 0x5a, 0x6a, 0x7d, 0x5b, 0xf2, 0x8a, 0x8b, 0xf1, 0x4a, + 0x28, 0x9e, 0x90, 0x99, 0xfd, 0x51, 0xe8, 0xdb, 0x7c, 0xc4, 0xf3, 0x2b, 0x70, 0x1f, 0x45, 0xfe, + 0xbb, 0xc9, 0x08, 0x3c, 0xca, 0xef, 0x7a, 0x29, 0x38, 0xa3, 0x5c, 0x1b, 0x19, 0x97, 0xfc, 0x89, + 0xc6, 0x53, 0x9f, 0x04, 0xa7, 0x66, 0x82, 0x4b, 0x4c, 0x7d, 0xf6, 0xea, 0xd7, 0x36, 0x7e, 0x5b, + 0x79, 0x70, 0x72, 0x95, 0xbf, 0xcb, 0x2f, 0x3f, 0xe6, 0xbe, 0x83, 0x01, 0x8e, 0x37, 0x6f, 0x2f, + 0x48, 0xb6, 0xf2, 0x11, 0x9e, 0x02, 0x90, 0xec, 0xc3, 0xfb, 0xf5, 0xf2, 0xa2, 0xc8, 0x56, 0xfe, + 0xd1, 0x9b, 0xe0, 0xdb, 0x2e, 0x44, 0x0f, 0xbb, 0x10, 0xfd, 0xd8, 0x85, 0xe8, 0xcb, 0x3e, 0x74, + 0x1e, 0xf6, 0xa1, 0xf3, 0x7d, 0x1f, 0x3a, 0xf5, 0xb1, 0x79, 0x03, 0x8b, 0x9f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x02, 0x05, 0x0a, 0x56, 0x45, 0x02, 0x00, 0x00, +} + func (m *Topic) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -188,40 +301,48 @@ func (m *Topic) Marshal() (dAtA []byte, err error) { } func (m *Topic) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Topic) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTopic(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if len(m.ConsumerServices) > 0 { + for iNdEx := len(m.ConsumerServices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ConsumerServices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTopic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } if m.NumberOfShards != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintTopic(dAtA, i, uint64(m.NumberOfShards)) + i-- + dAtA[i] = 0x10 } - if len(m.ConsumerServices) > 0 { - for _, msg := range m.ConsumerServices { - dAtA[i] = 0x1a - i++ - i = encodeVarintTopic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTopic(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ConsumerService) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -229,37 +350,44 @@ func (m *ConsumerService) Marshal() (dAtA []byte, err error) { } func (m *ConsumerService) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConsumerService) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ServiceId != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTopic(dAtA, i, uint64(m.ServiceId.Size())) - n1, err := m.ServiceId.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 + if m.MessageTtlNanos != 0 { + i = encodeVarintTopic(dAtA, i, uint64(m.MessageTtlNanos)) + i-- + dAtA[i] = 0x18 } if m.ConsumptionType != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintTopic(dAtA, i, uint64(m.ConsumptionType)) + i-- + dAtA[i] = 0x10 } - if m.MessageTtlNanos != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintTopic(dAtA, i, uint64(m.MessageTtlNanos)) + if m.ServiceId != nil { + { + size, err := m.ServiceId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTopic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ServiceID) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -267,41 +395,54 @@ func (m *ServiceID) Marshal() (dAtA []byte, err error) { } func (m *ServiceID) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTopic(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintTopic(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0x1a } if len(m.Environment) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Environment) + copy(dAtA[i:], m.Environment) i = encodeVarintTopic(dAtA, i, uint64(len(m.Environment))) - i += copy(dAtA[i:], m.Environment) + i-- + dAtA[i] = 0x12 } - if len(m.Zone) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintTopic(dAtA, i, uint64(len(m.Zone))) - i += copy(dAtA[i:], m.Zone) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTopic(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintTopic(dAtA []byte, offset int, v uint64) int { + offset -= sovTopic(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Topic) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -321,6 +462,9 @@ func (m *Topic) Size() (n int) { } func (m *ConsumerService) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.ServiceId != nil { @@ -337,6 +481,9 @@ func (m *ConsumerService) Size() (n int) { } func (m *ServiceID) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -355,14 +502,7 @@ func (m *ServiceID) Size() (n int) { } func sovTopic(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTopic(x uint64) (n int) { return sovTopic(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -382,7 +522,7 @@ func (m *Topic) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -410,7 +550,7 @@ func (m *Topic) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -420,6 +560,9 @@ func (m *Topic) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTopic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTopic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -439,7 +582,7 @@ func (m *Topic) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumberOfShards |= (uint32(b) & 0x7F) << shift + m.NumberOfShards |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -458,7 +601,7 @@ func (m *Topic) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -467,6 +610,9 @@ func (m *Topic) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTopic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTopic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -481,7 +627,7 @@ func (m *Topic) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTopic } if (iNdEx + skippy) > l { @@ -511,7 +657,7 @@ func (m *ConsumerService) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -539,7 +685,7 @@ func (m *ConsumerService) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -548,6 +694,9 @@ func (m *ConsumerService) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTopic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTopic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -572,7 +721,7 @@ func (m *ConsumerService) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ConsumptionType |= (ConsumptionType(b) & 0x7F) << shift + m.ConsumptionType |= ConsumptionType(b&0x7F) << shift if b < 0x80 { break } @@ -591,7 +740,7 @@ func (m *ConsumerService) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MessageTtlNanos |= (int64(b) & 0x7F) << shift + m.MessageTtlNanos |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -602,7 +751,7 @@ func (m *ConsumerService) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTopic } if (iNdEx + skippy) > l { @@ -632,7 +781,7 @@ func (m *ServiceID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -660,7 +809,7 @@ func (m *ServiceID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -670,6 +819,9 @@ func (m *ServiceID) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTopic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTopic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -689,7 +841,7 @@ func (m *ServiceID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -699,6 +851,9 @@ func (m *ServiceID) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTopic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTopic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -718,7 +873,7 @@ func (m *ServiceID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -728,6 +883,9 @@ func (m *ServiceID) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTopic } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTopic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -739,7 +897,7 @@ func (m *ServiceID) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTopic } if (iNdEx + skippy) > l { @@ -757,6 +915,7 @@ func (m *ServiceID) Unmarshal(dAtA []byte) error { func skipTopic(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -788,10 +947,8 @@ func skipTopic(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -808,86 +965,34 @@ func skipTopic(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthTopic } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTopic - } - 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 := skipTopic(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTopic + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthTopic + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthTopic = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTopic = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthTopic = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTopic = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTopic = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/msg/generated/proto/topicpb/topic.proto", fileDescriptorTopic) -} - -var fileDescriptorTopic = []byte{ - // 385 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x4f, 0x8e, 0xd3, 0x30, - 0x14, 0x87, 0xc7, 0x53, 0x98, 0x51, 0x5e, 0x44, 0x9b, 0xf1, 0x2a, 0xab, 0x28, 0xea, 0x2a, 0x9a, - 0x45, 0x22, 0xa6, 0x3b, 0x16, 0x48, 0x43, 0x1b, 0x89, 0x0a, 0x94, 0x41, 0x6e, 0x46, 0x2c, 0xa3, - 0xfc, 0xf1, 0x64, 0x22, 0xd5, 0x76, 0x64, 0xbb, 0x95, 0xca, 0x19, 0x58, 0x70, 0x19, 0xee, 0xc0, - 0x92, 0x23, 0xa0, 0x72, 0x11, 0x14, 0xd7, 0x14, 0x0a, 0xb3, 0xca, 0xd3, 0x97, 0x9f, 0xdf, 0xfb, - 0xfc, 0x0c, 0xaf, 0xdb, 0x4e, 0x3f, 0x6e, 0xaa, 0xb8, 0x16, 0x2c, 0x61, 0xb3, 0xa6, 0x4a, 0xd8, - 0x2c, 0x51, 0xb2, 0x4e, 0x98, 0x6a, 0x93, 0x96, 0x72, 0x2a, 0x4b, 0x4d, 0x9b, 0xa4, 0x97, 0x42, - 0x8b, 0x44, 0x8b, 0xbe, 0xab, 0xfb, 0xea, 0xf0, 0x8d, 0x0d, 0xc3, 0x97, 0x16, 0x4e, 0x3f, 0x23, - 0x78, 0x9e, 0x0f, 0x35, 0xc6, 0xf0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 0xc6, 0x1f, 0x2b, 0x17, 0x2e, - 0xef, 0xb3, 0x77, 0xd9, 0xdd, 0xc7, 0xcc, 0x3b, 0xc3, 0x00, 0x17, 0xab, 0xb7, 0xb7, 0x24, 0x5d, - 0x78, 0x08, 0x8f, 0x01, 0x48, 0xfa, 0xe1, 0xfd, 0x72, 0x7e, 0x9b, 0xa7, 0x0b, 0xef, 0xfc, 0x8d, - 0xf7, 0x6d, 0x1f, 0xa0, 0xef, 0xfb, 0x00, 0xfd, 0xd8, 0x07, 0xe8, 0xcb, 0xcf, 0xe0, 0xac, 0xba, - 0x30, 0x6f, 0x3f, 0xfb, 0x15, 0x00, 0x00, 0xff, 0xff, 0xd4, 0xd7, 0xf0, 0x71, 0x3d, 0x02, 0x00, - 0x00, -} diff --git a/src/query/generated/proto/admin/database.pb.go b/src/query/generated/proto/admin/database.pb.go index 8dfc9b22fd..c0f406bfba 100644 --- a/src/query/generated/proto/admin/database.pb.go +++ b/src/query/generated/proto/admin/database.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/query/generated/proto/admin/database.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,49 +21,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package admin is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/query/generated/proto/admin/database.proto - github.com/m3db/m3/src/query/generated/proto/admin/namespace.proto - github.com/m3db/m3/src/query/generated/proto/admin/placement.proto - github.com/m3db/m3/src/query/generated/proto/admin/topic.proto - - It has these top-level messages: - DatabaseCreateRequest - AggregatedNamespace - BlockSize - Host - DatabaseCreateResponse - NamespaceGetResponse - NamespaceAddRequest - NamespaceUpdateRequest - NamespaceSchemaAddRequest - NamespaceSchemaAddResponse - NamespaceSchemaResetRequest - NamespaceSchemaResetResponse - NamespaceReadyRequest - NamespaceReadyResponse - PlacementInitRequest - PlacementGetResponse - PlacementAddRequest - PlacementRemoveRequest - PlacementReplaceRequest - PlacementSetRequest - PlacementSetResponse - TopicGetResponse - TopicInitRequest - TopicAddRequest - TopicUpdateRequest -*/ package admin -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -74,7 +40,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type DatabaseCreateRequest struct { // Required fields @@ -87,17 +53,45 @@ type DatabaseCreateRequest struct { RetentionTime string `protobuf:"bytes,5,opt,name=retention_time,json=retentionTime,proto3" json:"retention_time,omitempty"` // If no block size fields are set then the block size is // derived from the length of the retention period - BlockSize *BlockSize `protobuf:"bytes,6,opt,name=block_size,json=blockSize" json:"block_size,omitempty"` + BlockSize *BlockSize `protobuf:"bytes,6,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"` // Required if not using local database type - Hosts []*Host `protobuf:"bytes,7,rep,name=hosts" json:"hosts,omitempty"` + Hosts []*Host `protobuf:"bytes,7,rep,name=hosts,proto3" json:"hosts,omitempty"` // Optional field to add an additional aggregated namespace. - AggregatedNamespace *AggregatedNamespace `protobuf:"bytes,8,opt,name=aggregated_namespace,json=aggregatedNamespace" json:"aggregated_namespace,omitempty"` + AggregatedNamespace *AggregatedNamespace `protobuf:"bytes,8,opt,name=aggregated_namespace,json=aggregatedNamespace,proto3" json:"aggregated_namespace,omitempty"` } -func (m *DatabaseCreateRequest) Reset() { *m = DatabaseCreateRequest{} } -func (m *DatabaseCreateRequest) String() string { return proto.CompactTextString(m) } -func (*DatabaseCreateRequest) ProtoMessage() {} -func (*DatabaseCreateRequest) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{0} } +func (m *DatabaseCreateRequest) Reset() { *m = DatabaseCreateRequest{} } +func (m *DatabaseCreateRequest) String() string { return proto.CompactTextString(m) } +func (*DatabaseCreateRequest) ProtoMessage() {} +func (*DatabaseCreateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2a4e104b0c13efd7, []int{0} +} +func (m *DatabaseCreateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DatabaseCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DatabaseCreateRequest.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 *DatabaseCreateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DatabaseCreateRequest.Merge(m, src) +} +func (m *DatabaseCreateRequest) XXX_Size() int { + return m.Size() +} +func (m *DatabaseCreateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DatabaseCreateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DatabaseCreateRequest proto.InternalMessageInfo func (m *DatabaseCreateRequest) GetNamespaceName() string { if m != nil { @@ -166,10 +160,38 @@ type AggregatedNamespace struct { RetentionTime string `protobuf:"bytes,3,opt,name=retention_time,json=retentionTime,proto3" json:"retention_time,omitempty"` } -func (m *AggregatedNamespace) Reset() { *m = AggregatedNamespace{} } -func (m *AggregatedNamespace) String() string { return proto.CompactTextString(m) } -func (*AggregatedNamespace) ProtoMessage() {} -func (*AggregatedNamespace) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{1} } +func (m *AggregatedNamespace) Reset() { *m = AggregatedNamespace{} } +func (m *AggregatedNamespace) String() string { return proto.CompactTextString(m) } +func (*AggregatedNamespace) ProtoMessage() {} +func (*AggregatedNamespace) Descriptor() ([]byte, []int) { + return fileDescriptor_2a4e104b0c13efd7, []int{1} +} +func (m *AggregatedNamespace) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AggregatedNamespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AggregatedNamespace.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 *AggregatedNamespace) XXX_Merge(src proto.Message) { + xxx_messageInfo_AggregatedNamespace.Merge(m, src) +} +func (m *AggregatedNamespace) XXX_Size() int { + return m.Size() +} +func (m *AggregatedNamespace) XXX_DiscardUnknown() { + xxx_messageInfo_AggregatedNamespace.DiscardUnknown(m) +} + +var xxx_messageInfo_AggregatedNamespace proto.InternalMessageInfo func (m *AggregatedNamespace) GetName() string { if m != nil { @@ -199,10 +221,38 @@ type BlockSize struct { ExpectedSeriesDatapointsPerHour int64 `protobuf:"varint,2,opt,name=expected_series_datapoints_per_hour,json=expectedSeriesDatapointsPerHour,proto3" json:"expected_series_datapoints_per_hour,omitempty"` } -func (m *BlockSize) Reset() { *m = BlockSize{} } -func (m *BlockSize) String() string { return proto.CompactTextString(m) } -func (*BlockSize) ProtoMessage() {} -func (*BlockSize) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{2} } +func (m *BlockSize) Reset() { *m = BlockSize{} } +func (m *BlockSize) String() string { return proto.CompactTextString(m) } +func (*BlockSize) ProtoMessage() {} +func (*BlockSize) Descriptor() ([]byte, []int) { + return fileDescriptor_2a4e104b0c13efd7, []int{2} +} +func (m *BlockSize) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlockSize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlockSize.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 *BlockSize) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockSize.Merge(m, src) +} +func (m *BlockSize) XXX_Size() int { + return m.Size() +} +func (m *BlockSize) XXX_DiscardUnknown() { + xxx_messageInfo_BlockSize.DiscardUnknown(m) +} + +var xxx_messageInfo_BlockSize proto.InternalMessageInfo func (m *BlockSize) GetTime() string { if m != nil { @@ -236,10 +286,38 @@ type Host struct { Weight uint32 `protobuf:"varint,6,opt,name=weight,proto3" json:"weight,omitempty"` } -func (m *Host) Reset() { *m = Host{} } -func (m *Host) String() string { return proto.CompactTextString(m) } -func (*Host) ProtoMessage() {} -func (*Host) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{3} } +func (m *Host) Reset() { *m = Host{} } +func (m *Host) String() string { return proto.CompactTextString(m) } +func (*Host) ProtoMessage() {} +func (*Host) Descriptor() ([]byte, []int) { + return fileDescriptor_2a4e104b0c13efd7, []int{3} +} +func (m *Host) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Host) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Host.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 *Host) XXX_Merge(src proto.Message) { + xxx_messageInfo_Host.Merge(m, src) +} +func (m *Host) XXX_Size() int { + return m.Size() +} +func (m *Host) XXX_DiscardUnknown() { + xxx_messageInfo_Host.DiscardUnknown(m) +} + +var xxx_messageInfo_Host proto.InternalMessageInfo func (m *Host) GetId() string { if m != nil { @@ -284,14 +362,42 @@ func (m *Host) GetWeight() uint32 { } type DatabaseCreateResponse struct { - Namespace *NamespaceGetResponse `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"` - Placement *PlacementGetResponse `protobuf:"bytes,2,opt,name=placement" json:"placement,omitempty"` + Namespace *NamespaceGetResponse `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Placement *PlacementGetResponse `protobuf:"bytes,2,opt,name=placement,proto3" json:"placement,omitempty"` +} + +func (m *DatabaseCreateResponse) Reset() { *m = DatabaseCreateResponse{} } +func (m *DatabaseCreateResponse) String() string { return proto.CompactTextString(m) } +func (*DatabaseCreateResponse) ProtoMessage() {} +func (*DatabaseCreateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2a4e104b0c13efd7, []int{4} +} +func (m *DatabaseCreateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DatabaseCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DatabaseCreateResponse.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 *DatabaseCreateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DatabaseCreateResponse.Merge(m, src) +} +func (m *DatabaseCreateResponse) XXX_Size() int { + return m.Size() +} +func (m *DatabaseCreateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DatabaseCreateResponse.DiscardUnknown(m) } -func (m *DatabaseCreateResponse) Reset() { *m = DatabaseCreateResponse{} } -func (m *DatabaseCreateResponse) String() string { return proto.CompactTextString(m) } -func (*DatabaseCreateResponse) ProtoMessage() {} -func (*DatabaseCreateResponse) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{4} } +var xxx_messageInfo_DatabaseCreateResponse proto.InternalMessageInfo func (m *DatabaseCreateResponse) GetNamespace() *NamespaceGetResponse { if m != nil { @@ -314,10 +420,56 @@ func init() { proto.RegisterType((*Host)(nil), "admin.Host") proto.RegisterType((*DatabaseCreateResponse)(nil), "admin.DatabaseCreateResponse") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/admin/database.proto", fileDescriptor_2a4e104b0c13efd7) +} + +var fileDescriptor_2a4e104b0c13efd7 = []byte{ + // 582 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x41, 0x6f, 0xd3, 0x4c, + 0x10, 0xad, 0x93, 0x26, 0xfd, 0xbc, 0x51, 0xf2, 0xc1, 0x16, 0x2a, 0xab, 0x08, 0x13, 0x82, 0x10, + 0xb9, 0x10, 0x4b, 0xcd, 0x89, 0x63, 0x43, 0x45, 0x7b, 0x80, 0xaa, 0x72, 0xb8, 0x5b, 0x6b, 0x7b, + 0x70, 0x56, 0x64, 0xbd, 0xdb, 0xdd, 0xb5, 0xa0, 0xf9, 0x11, 0x88, 0x2b, 0xff, 0x88, 0x63, 0x8f, + 0x1c, 0x51, 0x72, 0xe3, 0x57, 0xa0, 0xdd, 0xd8, 0x4e, 0x80, 0x9c, 0x7a, 0x1b, 0xbf, 0x79, 0x33, + 0x3b, 0xef, 0xcd, 0x18, 0x9d, 0x66, 0x54, 0xcf, 0x8a, 0x78, 0x94, 0x70, 0x16, 0xb0, 0x71, 0x1a, + 0x07, 0x6c, 0x1c, 0x28, 0x99, 0x04, 0xd7, 0x05, 0xc8, 0x9b, 0x20, 0x83, 0x1c, 0x24, 0xd1, 0x90, + 0x06, 0x42, 0x72, 0xcd, 0x03, 0x92, 0x32, 0x9a, 0x07, 0x29, 0xd1, 0x24, 0x26, 0x0a, 0x46, 0x16, + 0xc4, 0x2d, 0x8b, 0x1e, 0x4f, 0xee, 0xd0, 0x29, 0x27, 0x0c, 0x94, 0x20, 0x49, 0xd9, 0xea, 0x4e, + 0x3d, 0xc4, 0x9c, 0x24, 0xc0, 0x20, 0xd7, 0xeb, 0x1e, 0x83, 0x5f, 0x0d, 0xf4, 0xf0, 0xac, 0x9c, + 0xf0, 0xb5, 0x04, 0xa2, 0x21, 0x84, 0xeb, 0x02, 0x94, 0xc6, 0xcf, 0x51, 0xaf, 0x7e, 0x30, 0x32, + 0x91,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xad, 0xd9, 0x13, 0xef, 0xfb, 0xd2, + 0x77, 0x6e, 0x97, 0xbe, 0xf3, 0x73, 0xe9, 0x3b, 0x5f, 0x57, 0xfe, 0xde, 0xed, 0xca, 0xdf, 0xfb, + 0xb1, 0xf2, 0xf7, 0xe2, 0xb6, 0xfd, 0x37, 0xc7, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcd, 0xa9, + 0x27, 0x91, 0x6f, 0x04, 0x00, 0x00, +} + func (m *DatabaseCreateRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -325,77 +477,91 @@ func (m *DatabaseCreateRequest) Marshal() (dAtA []byte, err error) { } func (m *DatabaseCreateRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DatabaseCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.NamespaceName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDatabase(dAtA, i, uint64(len(m.NamespaceName))) - i += copy(dAtA[i:], m.NamespaceName) - } - if len(m.Type) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintDatabase(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) - } - if m.NumShards != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintDatabase(dAtA, i, uint64(m.NumShards)) - } - if m.ReplicationFactor != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintDatabase(dAtA, i, uint64(m.ReplicationFactor)) - } - if len(m.RetentionTime) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintDatabase(dAtA, i, uint64(len(m.RetentionTime))) - i += copy(dAtA[i:], m.RetentionTime) - } - if m.BlockSize != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintDatabase(dAtA, i, uint64(m.BlockSize.Size())) - n1, err := m.BlockSize.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.AggregatedNamespace != nil { + { + size, err := m.AggregatedNamespace.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDatabase(dAtA, i, uint64(size)) } - i += n1 + i-- + dAtA[i] = 0x42 } if len(m.Hosts) > 0 { - for _, msg := range m.Hosts { + for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Hosts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDatabase(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x3a - i++ - i = encodeVarintDatabase(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + } + } + if m.BlockSize != nil { + { + size, err := m.BlockSize.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintDatabase(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x32 } - if m.AggregatedNamespace != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintDatabase(dAtA, i, uint64(m.AggregatedNamespace.Size())) - n2, err := m.AggregatedNamespace.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 + if len(m.RetentionTime) > 0 { + i -= len(m.RetentionTime) + copy(dAtA[i:], m.RetentionTime) + i = encodeVarintDatabase(dAtA, i, uint64(len(m.RetentionTime))) + i-- + dAtA[i] = 0x2a + } + if m.ReplicationFactor != 0 { + i = encodeVarintDatabase(dAtA, i, uint64(m.ReplicationFactor)) + i-- + dAtA[i] = 0x20 + } + if m.NumShards != 0 { + i = encodeVarintDatabase(dAtA, i, uint64(m.NumShards)) + i-- + dAtA[i] = 0x18 + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintDatabase(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x12 + } + if len(m.NamespaceName) > 0 { + i -= len(m.NamespaceName) + copy(dAtA[i:], m.NamespaceName) + i = encodeVarintDatabase(dAtA, i, uint64(len(m.NamespaceName))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *AggregatedNamespace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -403,35 +569,43 @@ func (m *AggregatedNamespace) Marshal() (dAtA []byte, err error) { } func (m *AggregatedNamespace) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AggregatedNamespace) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDatabase(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if len(m.RetentionTime) > 0 { + i -= len(m.RetentionTime) + copy(dAtA[i:], m.RetentionTime) + i = encodeVarintDatabase(dAtA, i, uint64(len(m.RetentionTime))) + i-- + dAtA[i] = 0x1a } if len(m.Resolution) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Resolution) + copy(dAtA[i:], m.Resolution) i = encodeVarintDatabase(dAtA, i, uint64(len(m.Resolution))) - i += copy(dAtA[i:], m.Resolution) + i-- + dAtA[i] = 0x12 } - if len(m.RetentionTime) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintDatabase(dAtA, i, uint64(len(m.RetentionTime))) - i += copy(dAtA[i:], m.RetentionTime) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintDatabase(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *BlockSize) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -439,28 +613,34 @@ func (m *BlockSize) Marshal() (dAtA []byte, err error) { } func (m *BlockSize) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockSize) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Time) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDatabase(dAtA, i, uint64(len(m.Time))) - i += copy(dAtA[i:], m.Time) - } if m.ExpectedSeriesDatapointsPerHour != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintDatabase(dAtA, i, uint64(m.ExpectedSeriesDatapointsPerHour)) + i-- + dAtA[i] = 0x10 + } + if len(m.Time) > 0 { + i -= len(m.Time) + copy(dAtA[i:], m.Time) + i = encodeVarintDatabase(dAtA, i, uint64(len(m.Time))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Host) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -468,51 +648,60 @@ func (m *Host) Marshal() (dAtA []byte, err error) { } func (m *Host) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Host) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDatabase(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if len(m.Address) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintDatabase(dAtA, i, uint64(len(m.Address))) - i += copy(dAtA[i:], m.Address) + if m.Weight != 0 { + i = encodeVarintDatabase(dAtA, i, uint64(m.Weight)) + i-- + dAtA[i] = 0x30 } - if m.Port != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintDatabase(dAtA, i, uint64(m.Port)) + if len(m.Zone) > 0 { + i -= len(m.Zone) + copy(dAtA[i:], m.Zone) + i = encodeVarintDatabase(dAtA, i, uint64(len(m.Zone))) + i-- + dAtA[i] = 0x2a } if len(m.IsolationGroup) > 0 { - dAtA[i] = 0x22 - i++ + i -= len(m.IsolationGroup) + copy(dAtA[i:], m.IsolationGroup) i = encodeVarintDatabase(dAtA, i, uint64(len(m.IsolationGroup))) - i += copy(dAtA[i:], m.IsolationGroup) + i-- + dAtA[i] = 0x22 } - if len(m.Zone) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintDatabase(dAtA, i, uint64(len(m.Zone))) - i += copy(dAtA[i:], m.Zone) + if m.Port != 0 { + i = encodeVarintDatabase(dAtA, i, uint64(m.Port)) + i-- + dAtA[i] = 0x18 } - if m.Weight != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintDatabase(dAtA, i, uint64(m.Weight)) + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintDatabase(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintDatabase(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *DatabaseCreateResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -520,43 +709,57 @@ func (m *DatabaseCreateResponse) Marshal() (dAtA []byte, err error) { } func (m *DatabaseCreateResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DatabaseCreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Namespace != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintDatabase(dAtA, i, uint64(m.Namespace.Size())) - n3, err := m.Namespace.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } if m.Placement != nil { + { + size, err := m.Placement.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDatabase(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintDatabase(dAtA, i, uint64(m.Placement.Size())) - n4, err := m.Placement.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if m.Namespace != nil { + { + size, err := m.Namespace.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDatabase(dAtA, i, uint64(size)) } - i += n4 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintDatabase(dAtA []byte, offset int, v uint64) int { + offset -= sovDatabase(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *DatabaseCreateRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.NamespaceName) @@ -595,6 +798,9 @@ func (m *DatabaseCreateRequest) Size() (n int) { } func (m *AggregatedNamespace) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -613,6 +819,9 @@ func (m *AggregatedNamespace) Size() (n int) { } func (m *BlockSize) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Time) @@ -626,6 +835,9 @@ func (m *BlockSize) Size() (n int) { } func (m *Host) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Id) @@ -654,6 +866,9 @@ func (m *Host) Size() (n int) { } func (m *DatabaseCreateResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Namespace != nil { @@ -668,14 +883,7 @@ func (m *DatabaseCreateResponse) Size() (n int) { } func sovDatabase(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozDatabase(x uint64) (n int) { return sovDatabase(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -695,7 +903,7 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -723,7 +931,7 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -733,6 +941,9 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -752,7 +963,7 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -762,6 +973,9 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -781,7 +995,7 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumShards |= (int32(b) & 0x7F) << shift + m.NumShards |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -800,7 +1014,7 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ReplicationFactor |= (int32(b) & 0x7F) << shift + m.ReplicationFactor |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -819,7 +1033,7 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -829,6 +1043,9 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -848,7 +1065,7 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -857,6 +1074,9 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -881,7 +1101,7 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -890,6 +1110,9 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -912,7 +1135,7 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -921,6 +1144,9 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -937,7 +1163,7 @@ func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthDatabase } if (iNdEx + skippy) > l { @@ -967,7 +1193,7 @@ func (m *AggregatedNamespace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -995,7 +1221,7 @@ func (m *AggregatedNamespace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1005,6 +1231,9 @@ func (m *AggregatedNamespace) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1024,7 +1253,7 @@ func (m *AggregatedNamespace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1034,6 +1263,9 @@ func (m *AggregatedNamespace) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1053,7 +1285,7 @@ func (m *AggregatedNamespace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1063,6 +1295,9 @@ func (m *AggregatedNamespace) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1074,7 +1309,7 @@ func (m *AggregatedNamespace) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthDatabase } if (iNdEx + skippy) > l { @@ -1104,7 +1339,7 @@ func (m *BlockSize) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1132,7 +1367,7 @@ func (m *BlockSize) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1142,6 +1377,9 @@ func (m *BlockSize) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1161,7 +1399,7 @@ func (m *BlockSize) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ExpectedSeriesDatapointsPerHour |= (int64(b) & 0x7F) << shift + m.ExpectedSeriesDatapointsPerHour |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1172,7 +1410,7 @@ func (m *BlockSize) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthDatabase } if (iNdEx + skippy) > l { @@ -1202,7 +1440,7 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1230,7 +1468,7 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1240,6 +1478,9 @@ func (m *Host) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1259,7 +1500,7 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1269,6 +1510,9 @@ func (m *Host) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1288,7 +1532,7 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Port |= (uint32(b) & 0x7F) << shift + m.Port |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1307,7 +1551,7 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1317,6 +1561,9 @@ func (m *Host) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1336,7 +1583,7 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1346,6 +1593,9 @@ func (m *Host) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1365,7 +1615,7 @@ func (m *Host) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Weight |= (uint32(b) & 0x7F) << shift + m.Weight |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1376,7 +1626,7 @@ func (m *Host) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthDatabase } if (iNdEx + skippy) > l { @@ -1406,7 +1656,7 @@ func (m *DatabaseCreateResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1434,7 +1684,7 @@ func (m *DatabaseCreateResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1443,6 +1693,9 @@ func (m *DatabaseCreateResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1467,7 +1720,7 @@ func (m *DatabaseCreateResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1476,6 +1729,9 @@ func (m *DatabaseCreateResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthDatabase } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDatabase + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1492,7 +1748,7 @@ func (m *DatabaseCreateResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthDatabase } if (iNdEx + skippy) > l { @@ -1510,6 +1766,7 @@ func (m *DatabaseCreateResponse) Unmarshal(dAtA []byte) error { func skipDatabase(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1541,10 +1798,8 @@ func skipDatabase(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1561,97 +1816,34 @@ func skipDatabase(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthDatabase } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDatabase - } - 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 := skipDatabase(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDatabase + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthDatabase + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthDatabase = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDatabase = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthDatabase = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDatabase = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDatabase = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/admin/database.proto", fileDescriptorDatabase) -} - -var fileDescriptorDatabase = []byte{ - // 572 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0xc5, 0x49, 0xd3, 0xe2, 0xa9, 0x5a, 0xca, 0x16, 0x2a, 0xab, 0x88, 0x10, 0x82, 0x10, 0xb9, - 0x10, 0x4b, 0xcd, 0x89, 0x63, 0x43, 0x45, 0x7b, 0x80, 0xaa, 0x72, 0xb8, 0x5b, 0x6b, 0x7b, 0x70, - 0x56, 0x64, 0xbd, 0xdb, 0xdd, 0xb5, 0xa0, 0xf9, 0x08, 0xc4, 0x95, 0x3f, 0xe2, 0xc8, 0x27, 0xa0, - 0x70, 0xe3, 0x2b, 0xd0, 0x6e, 0x6c, 0x27, 0x40, 0x4e, 0xbd, 0x8d, 0xdf, 0xbc, 0x99, 0x9d, 0xf7, - 0x66, 0x0c, 0xa7, 0x39, 0x33, 0xd3, 0x32, 0x19, 0xa6, 0x82, 0x87, 0x7c, 0x94, 0x25, 0x21, 0x1f, - 0x85, 0x5a, 0xa5, 0xe1, 0x75, 0x89, 0xea, 0x26, 0xcc, 0xb1, 0x40, 0x45, 0x0d, 0x66, 0xa1, 0x54, - 0xc2, 0x88, 0x90, 0x66, 0x9c, 0x15, 0x61, 0x46, 0x0d, 0x4d, 0xa8, 0xc6, 0xa1, 0x03, 0x49, 0xc7, - 0xa1, 0xc7, 0xe3, 0x5b, 0x74, 0x2a, 0x28, 0x47, 0x2d, 0x69, 0x5a, 0xb5, 0xba, 0x55, 0x0f, 0x39, - 0xa3, 0x29, 0x72, 0x2c, 0xcc, 0xb2, 0x47, 0xff, 0x77, 0x0b, 0x1e, 0x9e, 0x55, 0x13, 0xbe, 0x56, - 0x48, 0x0d, 0x46, 0x78, 0x5d, 0xa2, 0x36, 0xe4, 0x39, 0xec, 0x37, 0x0f, 0xc6, 0x36, 0x0a,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df, 0x17, 0x5d, 0xef, 0xc7, 0xa2, - 0xeb, 0xfd, 0x5c, 0x74, 0xbd, 0xaf, 0xbf, 0xba, 0x77, 0x92, 0x6d, 0xf7, 0x4f, 0x8e, 0xfe, 0x04, - 0x00, 0x00, 0xff, 0xff, 0xce, 0xeb, 0x60, 0x31, 0x67, 0x04, 0x00, 0x00, -} diff --git a/src/query/generated/proto/admin/namespace.pb.go b/src/query/generated/proto/admin/namespace.pb.go index c44d1a322b..e9a2defb55 100644 --- a/src/query/generated/proto/admin/namespace.pb.go +++ b/src/query/generated/proto/admin/namespace.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/query/generated/proto/admin/namespace.proto -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,28 +23,64 @@ package admin -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import namespace1 "github.com/m3db/m3/src/dbnode/generated/proto/namespace" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + namespace "github.com/m3db/m3/src/dbnode/generated/proto/namespace" + io "io" + math "math" + math_bits "math/bits" +) // 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 + type NamespaceGetResponse struct { - Registry *namespace1.Registry `protobuf:"bytes,1,opt,name=registry" json:"registry,omitempty"` + Registry *namespace.Registry `protobuf:"bytes,1,opt,name=registry,proto3" json:"registry,omitempty"` +} + +func (m *NamespaceGetResponse) Reset() { *m = NamespaceGetResponse{} } +func (m *NamespaceGetResponse) String() string { return proto.CompactTextString(m) } +func (*NamespaceGetResponse) ProtoMessage() {} +func (*NamespaceGetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_81a8012010feba76, []int{0} +} +func (m *NamespaceGetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceGetResponse.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 *NamespaceGetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceGetResponse.Merge(m, src) +} +func (m *NamespaceGetResponse) XXX_Size() int { + return m.Size() +} +func (m *NamespaceGetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceGetResponse.DiscardUnknown(m) } -func (m *NamespaceGetResponse) Reset() { *m = NamespaceGetResponse{} } -func (m *NamespaceGetResponse) String() string { return proto.CompactTextString(m) } -func (*NamespaceGetResponse) ProtoMessage() {} -func (*NamespaceGetResponse) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{0} } +var xxx_messageInfo_NamespaceGetResponse proto.InternalMessageInfo -func (m *NamespaceGetResponse) GetRegistry() *namespace1.Registry { +func (m *NamespaceGetResponse) GetRegistry() *namespace.Registry { if m != nil { return m.Registry } @@ -52,14 +88,42 @@ func (m *NamespaceGetResponse) GetRegistry() *namespace1.Registry { } type NamespaceAddRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Options *namespace1.NamespaceOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Options *namespace.NamespaceOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` +} + +func (m *NamespaceAddRequest) Reset() { *m = NamespaceAddRequest{} } +func (m *NamespaceAddRequest) String() string { return proto.CompactTextString(m) } +func (*NamespaceAddRequest) ProtoMessage() {} +func (*NamespaceAddRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_81a8012010feba76, []int{1} +} +func (m *NamespaceAddRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceAddRequest.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 *NamespaceAddRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceAddRequest.Merge(m, src) +} +func (m *NamespaceAddRequest) XXX_Size() int { + return m.Size() +} +func (m *NamespaceAddRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceAddRequest.DiscardUnknown(m) } -func (m *NamespaceAddRequest) Reset() { *m = NamespaceAddRequest{} } -func (m *NamespaceAddRequest) String() string { return proto.CompactTextString(m) } -func (*NamespaceAddRequest) ProtoMessage() {} -func (*NamespaceAddRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{1} } +var xxx_messageInfo_NamespaceAddRequest proto.InternalMessageInfo func (m *NamespaceAddRequest) GetName() string { if m != nil { @@ -68,7 +132,7 @@ func (m *NamespaceAddRequest) GetName() string { return "" } -func (m *NamespaceAddRequest) GetOptions() *namespace1.NamespaceOptions { +func (m *NamespaceAddRequest) GetOptions() *namespace.NamespaceOptions { if m != nil { return m.Options } @@ -76,14 +140,42 @@ func (m *NamespaceAddRequest) GetOptions() *namespace1.NamespaceOptions { } type NamespaceUpdateRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Options *namespace1.NamespaceOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Options *namespace.NamespaceOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` +} + +func (m *NamespaceUpdateRequest) Reset() { *m = NamespaceUpdateRequest{} } +func (m *NamespaceUpdateRequest) String() string { return proto.CompactTextString(m) } +func (*NamespaceUpdateRequest) ProtoMessage() {} +func (*NamespaceUpdateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_81a8012010feba76, []int{2} +} +func (m *NamespaceUpdateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceUpdateRequest.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 *NamespaceUpdateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceUpdateRequest.Merge(m, src) +} +func (m *NamespaceUpdateRequest) XXX_Size() int { + return m.Size() +} +func (m *NamespaceUpdateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceUpdateRequest.DiscardUnknown(m) } -func (m *NamespaceUpdateRequest) Reset() { *m = NamespaceUpdateRequest{} } -func (m *NamespaceUpdateRequest) String() string { return proto.CompactTextString(m) } -func (*NamespaceUpdateRequest) ProtoMessage() {} -func (*NamespaceUpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{2} } +var xxx_messageInfo_NamespaceUpdateRequest proto.InternalMessageInfo func (m *NamespaceUpdateRequest) GetName() string { if m != nil { @@ -92,7 +184,7 @@ func (m *NamespaceUpdateRequest) GetName() string { return "" } -func (m *NamespaceUpdateRequest) GetOptions() *namespace1.NamespaceOptions { +func (m *NamespaceUpdateRequest) GetOptions() *namespace.NamespaceOptions { if m != nil { return m.Options } @@ -115,16 +207,42 @@ type NamespaceSchemaAddRequest struct { // import "mainpkg/imported.proto"; // Then the map key for imported.proto must be "mainpkg/imported.proto" // See src/dbnode/namespame/kvadmin test for example. - ProtoMap map[string]string `protobuf:"bytes,4,rep,name=protoMap" json:"protoMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ProtoMap map[string]string `protobuf:"bytes,4,rep,name=protoMap,proto3" json:"protoMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *NamespaceSchemaAddRequest) Reset() { *m = NamespaceSchemaAddRequest{} } func (m *NamespaceSchemaAddRequest) String() string { return proto.CompactTextString(m) } func (*NamespaceSchemaAddRequest) ProtoMessage() {} func (*NamespaceSchemaAddRequest) Descriptor() ([]byte, []int) { - return fileDescriptorNamespace, []int{3} + return fileDescriptor_81a8012010feba76, []int{3} +} +func (m *NamespaceSchemaAddRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceSchemaAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceSchemaAddRequest.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 *NamespaceSchemaAddRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceSchemaAddRequest.Merge(m, src) +} +func (m *NamespaceSchemaAddRequest) XXX_Size() int { + return m.Size() +} +func (m *NamespaceSchemaAddRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceSchemaAddRequest.DiscardUnknown(m) } +var xxx_messageInfo_NamespaceSchemaAddRequest proto.InternalMessageInfo + func (m *NamespaceSchemaAddRequest) GetName() string { if m != nil { return m.Name @@ -161,9 +279,35 @@ func (m *NamespaceSchemaAddResponse) Reset() { *m = NamespaceSchemaAddRe func (m *NamespaceSchemaAddResponse) String() string { return proto.CompactTextString(m) } func (*NamespaceSchemaAddResponse) ProtoMessage() {} func (*NamespaceSchemaAddResponse) Descriptor() ([]byte, []int) { - return fileDescriptorNamespace, []int{4} + return fileDescriptor_81a8012010feba76, []int{4} +} +func (m *NamespaceSchemaAddResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceSchemaAddResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceSchemaAddResponse.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 *NamespaceSchemaAddResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceSchemaAddResponse.Merge(m, src) +} +func (m *NamespaceSchemaAddResponse) XXX_Size() int { + return m.Size() +} +func (m *NamespaceSchemaAddResponse) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceSchemaAddResponse.DiscardUnknown(m) } +var xxx_messageInfo_NamespaceSchemaAddResponse proto.InternalMessageInfo + func (m *NamespaceSchemaAddResponse) GetDeployID() string { if m != nil { return m.DeployID @@ -181,9 +325,35 @@ func (m *NamespaceSchemaResetRequest) Reset() { *m = NamespaceSchemaRese func (m *NamespaceSchemaResetRequest) String() string { return proto.CompactTextString(m) } func (*NamespaceSchemaResetRequest) ProtoMessage() {} func (*NamespaceSchemaResetRequest) Descriptor() ([]byte, []int) { - return fileDescriptorNamespace, []int{5} + return fileDescriptor_81a8012010feba76, []int{5} +} +func (m *NamespaceSchemaResetRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceSchemaResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceSchemaResetRequest.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 *NamespaceSchemaResetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceSchemaResetRequest.Merge(m, src) +} +func (m *NamespaceSchemaResetRequest) XXX_Size() int { + return m.Size() +} +func (m *NamespaceSchemaResetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceSchemaResetRequest.DiscardUnknown(m) } +var xxx_messageInfo_NamespaceSchemaResetRequest proto.InternalMessageInfo + func (m *NamespaceSchemaResetRequest) GetName() string { if m != nil { return m.Name @@ -198,9 +368,35 @@ func (m *NamespaceSchemaResetResponse) Reset() { *m = NamespaceSchemaRes func (m *NamespaceSchemaResetResponse) String() string { return proto.CompactTextString(m) } func (*NamespaceSchemaResetResponse) ProtoMessage() {} func (*NamespaceSchemaResetResponse) Descriptor() ([]byte, []int) { - return fileDescriptorNamespace, []int{6} + return fileDescriptor_81a8012010feba76, []int{6} +} +func (m *NamespaceSchemaResetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceSchemaResetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceSchemaResetResponse.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 *NamespaceSchemaResetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceSchemaResetResponse.Merge(m, src) +} +func (m *NamespaceSchemaResetResponse) XXX_Size() int { + return m.Size() +} +func (m *NamespaceSchemaResetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceSchemaResetResponse.DiscardUnknown(m) } +var xxx_messageInfo_NamespaceSchemaResetResponse proto.InternalMessageInfo + // NamespaceReadyRequest is the request for transitioning a namespace // to the ready state. Calls to this endpoint are idempotent and can // be safely retried on error. @@ -213,10 +409,38 @@ type NamespaceReadyRequest struct { Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` } -func (m *NamespaceReadyRequest) Reset() { *m = NamespaceReadyRequest{} } -func (m *NamespaceReadyRequest) String() string { return proto.CompactTextString(m) } -func (*NamespaceReadyRequest) ProtoMessage() {} -func (*NamespaceReadyRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{7} } +func (m *NamespaceReadyRequest) Reset() { *m = NamespaceReadyRequest{} } +func (m *NamespaceReadyRequest) String() string { return proto.CompactTextString(m) } +func (*NamespaceReadyRequest) ProtoMessage() {} +func (*NamespaceReadyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_81a8012010feba76, []int{7} +} +func (m *NamespaceReadyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceReadyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceReadyRequest.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 *NamespaceReadyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceReadyRequest.Merge(m, src) +} +func (m *NamespaceReadyRequest) XXX_Size() int { + return m.Size() +} +func (m *NamespaceReadyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceReadyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NamespaceReadyRequest proto.InternalMessageInfo func (m *NamespaceReadyRequest) GetName() string { if m != nil { @@ -238,10 +462,38 @@ type NamespaceReadyResponse struct { Ready bool `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"` } -func (m *NamespaceReadyResponse) Reset() { *m = NamespaceReadyResponse{} } -func (m *NamespaceReadyResponse) String() string { return proto.CompactTextString(m) } -func (*NamespaceReadyResponse) ProtoMessage() {} -func (*NamespaceReadyResponse) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{8} } +func (m *NamespaceReadyResponse) Reset() { *m = NamespaceReadyResponse{} } +func (m *NamespaceReadyResponse) String() string { return proto.CompactTextString(m) } +func (*NamespaceReadyResponse) ProtoMessage() {} +func (*NamespaceReadyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_81a8012010feba76, []int{8} +} +func (m *NamespaceReadyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceReadyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceReadyResponse.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 *NamespaceReadyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceReadyResponse.Merge(m, src) +} +func (m *NamespaceReadyResponse) XXX_Size() int { + return m.Size() +} +func (m *NamespaceReadyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceReadyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_NamespaceReadyResponse proto.InternalMessageInfo func (m *NamespaceReadyResponse) GetReady() bool { if m != nil { @@ -255,16 +507,54 @@ func init() { proto.RegisterType((*NamespaceAddRequest)(nil), "admin.NamespaceAddRequest") proto.RegisterType((*NamespaceUpdateRequest)(nil), "admin.NamespaceUpdateRequest") proto.RegisterType((*NamespaceSchemaAddRequest)(nil), "admin.NamespaceSchemaAddRequest") + proto.RegisterMapType((map[string]string)(nil), "admin.NamespaceSchemaAddRequest.ProtoMapEntry") proto.RegisterType((*NamespaceSchemaAddResponse)(nil), "admin.NamespaceSchemaAddResponse") proto.RegisterType((*NamespaceSchemaResetRequest)(nil), "admin.NamespaceSchemaResetRequest") proto.RegisterType((*NamespaceSchemaResetResponse)(nil), "admin.NamespaceSchemaResetResponse") proto.RegisterType((*NamespaceReadyRequest)(nil), "admin.NamespaceReadyRequest") proto.RegisterType((*NamespaceReadyResponse)(nil), "admin.NamespaceReadyResponse") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/admin/namespace.proto", fileDescriptor_81a8012010feba76) +} + +var fileDescriptor_81a8012010feba76 = []byte{ + // 442 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 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 0x59, 0xe9, 0xb4, 0x79, 0x53, 0xc8, 0x1b, 0x91, + 0xd0, 0x1b, 0x7b, 0xd2, 0x22, 0xda, 0xb7, 0x8c, 0x60, 0xa0, 0xeb, 0x82, 0x83, 0x84, 0xbc, 0x11, + 0x67, 0xd1, 0xf7, 0x65, 0x1c, 0x5c, 0x2d, 0xe3, 0xe0, 0xe7, 0x32, 0x0e, 0xbe, 0xad, 0xe2, 0xde, + 0xd5, 0x2a, 0xee, 0xfd, 0x58, 0xc5, 0xbd, 0xd9, 0x3d, 0x37, 0xe0, 0xc9, 0xef, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x6a, 0x1f, 0x65, 0x62, 0xb9, 0x03, 0x00, 0x00, +} + func (m *NamespaceGetResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -272,27 +562,34 @@ func (m *NamespaceGetResponse) Marshal() (dAtA []byte, err error) { } func (m *NamespaceGetResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceGetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Registry != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.Registry.Size())) - n1, err := m.Registry.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Registry.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n1 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *NamespaceAddRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -300,33 +597,41 @@ func (m *NamespaceAddRequest) Marshal() (dAtA []byte, err error) { } func (m *NamespaceAddRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if m.Options != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.Options.Size())) - n2, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *NamespaceUpdateRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -334,33 +639,41 @@ func (m *NamespaceUpdateRequest) Marshal() (dAtA []byte, err error) { } func (m *NamespaceUpdateRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceUpdateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if m.Options != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.Options.Size())) - n3, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *NamespaceSchemaAddRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -368,52 +681,62 @@ func (m *NamespaceSchemaAddRequest) Marshal() (dAtA []byte, err error) { } func (m *NamespaceSchemaAddRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceSchemaAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.MsgName) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.MsgName))) - i += copy(dAtA[i:], m.MsgName) - } - if len(m.ProtoName) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.ProtoName))) - i += copy(dAtA[i:], m.ProtoName) - } if len(m.ProtoMap) > 0 { - for k, _ := range m.ProtoMap { - dAtA[i] = 0x22 - i++ + for k := range m.ProtoMap { v := m.ProtoMap[k] - mapSize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) - i = encodeVarintNamespace(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintNamespace(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintNamespace(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintNamespace(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x22 } } - return i, nil + if len(m.ProtoName) > 0 { + i -= len(m.ProtoName) + copy(dAtA[i:], m.ProtoName) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.ProtoName))) + i-- + dAtA[i] = 0x1a + } + if len(m.MsgName) > 0 { + i -= len(m.MsgName) + copy(dAtA[i:], m.MsgName) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.MsgName))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *NamespaceSchemaAddResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -421,23 +744,29 @@ func (m *NamespaceSchemaAddResponse) Marshal() (dAtA []byte, err error) { } func (m *NamespaceSchemaAddResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceSchemaAddResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.DeployID) > 0 { - dAtA[i] = 0xa - i++ + i -= len(m.DeployID) + copy(dAtA[i:], m.DeployID) i = encodeVarintNamespace(dAtA, i, uint64(len(m.DeployID))) - i += copy(dAtA[i:], m.DeployID) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *NamespaceSchemaResetRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -445,23 +774,29 @@ func (m *NamespaceSchemaResetRequest) Marshal() (dAtA []byte, err error) { } func (m *NamespaceSchemaResetRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceSchemaResetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ + i -= len(m.Name) + copy(dAtA[i:], m.Name) i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *NamespaceSchemaResetResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -469,17 +804,22 @@ func (m *NamespaceSchemaResetResponse) Marshal() (dAtA []byte, err error) { } func (m *NamespaceSchemaResetResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceSchemaResetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - return i, nil + return len(dAtA) - i, nil } func (m *NamespaceReadyRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -487,33 +827,39 @@ func (m *NamespaceReadyRequest) Marshal() (dAtA []byte, err error) { } func (m *NamespaceReadyRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceReadyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if m.Force { - dAtA[i] = 0x10 - i++ + i-- if m.Force { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *NamespaceReadyResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -521,33 +867,43 @@ func (m *NamespaceReadyResponse) Marshal() (dAtA []byte, err error) { } func (m *NamespaceReadyResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceReadyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Ready { - dAtA[i] = 0x8 - i++ + i-- if m.Ready { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintNamespace(dAtA []byte, offset int, v uint64) int { + offset -= sovNamespace(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *NamespaceGetResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Registry != nil { @@ -558,6 +914,9 @@ func (m *NamespaceGetResponse) Size() (n int) { } func (m *NamespaceAddRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -572,6 +931,9 @@ func (m *NamespaceAddRequest) Size() (n int) { } func (m *NamespaceUpdateRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -586,6 +948,9 @@ func (m *NamespaceUpdateRequest) Size() (n int) { } func (m *NamespaceSchemaAddRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -612,6 +977,9 @@ func (m *NamespaceSchemaAddRequest) Size() (n int) { } func (m *NamespaceSchemaAddResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.DeployID) @@ -622,6 +990,9 @@ func (m *NamespaceSchemaAddResponse) Size() (n int) { } func (m *NamespaceSchemaResetRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -632,12 +1003,18 @@ func (m *NamespaceSchemaResetRequest) Size() (n int) { } func (m *NamespaceSchemaResetResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l return n } func (m *NamespaceReadyRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -651,6 +1028,9 @@ func (m *NamespaceReadyRequest) Size() (n int) { } func (m *NamespaceReadyResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Ready { @@ -660,14 +1040,7 @@ func (m *NamespaceReadyResponse) Size() (n int) { } func sovNamespace(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozNamespace(x uint64) (n int) { return sovNamespace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -687,7 +1060,7 @@ func (m *NamespaceGetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -715,7 +1088,7 @@ func (m *NamespaceGetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -724,11 +1097,14 @@ func (m *NamespaceGetResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } if m.Registry == nil { - m.Registry = &namespace1.Registry{} + m.Registry = &namespace.Registry{} } if err := m.Registry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -740,7 +1116,7 @@ func (m *NamespaceGetResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -770,7 +1146,7 @@ func (m *NamespaceAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -798,7 +1174,7 @@ func (m *NamespaceAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -808,6 +1184,9 @@ func (m *NamespaceAddRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -827,7 +1206,7 @@ func (m *NamespaceAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -836,11 +1215,14 @@ func (m *NamespaceAddRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } if m.Options == nil { - m.Options = &namespace1.NamespaceOptions{} + m.Options = &namespace.NamespaceOptions{} } if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -852,7 +1234,7 @@ func (m *NamespaceAddRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -882,7 +1264,7 @@ func (m *NamespaceUpdateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -910,7 +1292,7 @@ func (m *NamespaceUpdateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -920,6 +1302,9 @@ func (m *NamespaceUpdateRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -939,7 +1324,7 @@ func (m *NamespaceUpdateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -948,11 +1333,14 @@ func (m *NamespaceUpdateRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } if m.Options == nil { - m.Options = &namespace1.NamespaceOptions{} + m.Options = &namespace.NamespaceOptions{} } if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -964,7 +1352,7 @@ func (m *NamespaceUpdateRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -994,7 +1382,7 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1022,7 +1410,7 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1032,6 +1420,9 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1051,7 +1442,7 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1061,6 +1452,9 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1080,7 +1474,7 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1090,6 +1484,9 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1109,7 +1506,7 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1118,6 +1515,9 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1138,7 +1538,7 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1155,7 +1555,7 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1165,6 +1565,9 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthNamespace + } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } @@ -1181,7 +1584,7 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift + stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1191,6 +1594,9 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthNamespace + } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } @@ -1202,7 +1608,7 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > postIndex { @@ -1219,7 +1625,7 @@ func (m *NamespaceSchemaAddRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -1249,7 +1655,7 @@ func (m *NamespaceSchemaAddResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1277,7 +1683,7 @@ func (m *NamespaceSchemaAddResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1287,6 +1693,9 @@ func (m *NamespaceSchemaAddResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1298,7 +1707,7 @@ func (m *NamespaceSchemaAddResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -1328,7 +1737,7 @@ func (m *NamespaceSchemaResetRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1356,7 +1765,7 @@ func (m *NamespaceSchemaResetRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1366,6 +1775,9 @@ func (m *NamespaceSchemaResetRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1377,7 +1789,7 @@ func (m *NamespaceSchemaResetRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -1407,7 +1819,7 @@ func (m *NamespaceSchemaResetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1427,7 +1839,7 @@ func (m *NamespaceSchemaResetResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -1457,7 +1869,7 @@ func (m *NamespaceReadyRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1485,7 +1897,7 @@ func (m *NamespaceReadyRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1495,6 +1907,9 @@ func (m *NamespaceReadyRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNamespace + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1514,7 +1929,7 @@ func (m *NamespaceReadyRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1526,7 +1941,7 @@ func (m *NamespaceReadyRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -1556,7 +1971,7 @@ func (m *NamespaceReadyResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1584,7 +1999,7 @@ func (m *NamespaceReadyResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1596,7 +2011,7 @@ func (m *NamespaceReadyResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { @@ -1614,6 +2029,7 @@ func (m *NamespaceReadyResponse) Unmarshal(dAtA []byte) error { func skipNamespace(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1645,10 +2061,8 @@ func skipNamespace(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1665,89 +2079,34 @@ func skipNamespace(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthNamespace } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNamespace - } - 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 := skipNamespace(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupNamespace + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthNamespace + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupNamespace = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/admin/namespace.proto", fileDescriptorNamespace) -} - -var fileDescriptorNamespace = []byte{ - // 433 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x92, 0xdf, 0x6e, 0xd3, 0x30, - 0x14, 0xc6, 0xc9, 0xba, 0xb2, 0xf4, 0x4c, 0x48, 0x93, 0x57, 0x50, 0xe9, 0xa6, 0x68, 0xf2, 0xd5, - 0xae, 0x6c, 0xb1, 0x0a, 0x69, 0x82, 0xab, 0x4d, 0xa0, 0x0a, 0x24, 0xfe, 0xc8, 0x88, 0x7b, 0xdc, - 0xf8, 0xd0, 0x45, 0x2c, 0x71, 0x66, 0x3b, 0x48, 0x79, 0x0b, 0x1e, 0x8b, 0x4b, 0x1e, 0x01,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b9, 0x78, 0x5f, 0xb1, 0x03, 0x00, - 0x00, -} diff --git a/src/query/generated/proto/admin/placement.pb.go b/src/query/generated/proto/admin/placement.pb.go index 38cd3c2c4b..c39232c47c 100644 --- a/src/query/generated/proto/admin/placement.pb.go +++ b/src/query/generated/proto/admin/placement.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/query/generated/proto/admin/placement.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,29 +23,65 @@ package admin -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import placementpb "github.com/m3db/m3/src/cluster/generated/proto/placementpb" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + placementpb "github.com/m3db/m3/src/cluster/generated/proto/placementpb" + io "io" + math "math" + math_bits "math/bits" +) // 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 + type PlacementInitRequest struct { - Instances []*placementpb.Instance `protobuf:"bytes,1,rep,name=instances" json:"instances,omitempty"` + Instances []*placementpb.Instance `protobuf:"bytes,1,rep,name=instances,proto3" json:"instances,omitempty"` NumShards int32 `protobuf:"varint,2,opt,name=num_shards,json=numShards,proto3" json:"num_shards,omitempty"` ReplicationFactor int32 `protobuf:"varint,3,opt,name=replication_factor,json=replicationFactor,proto3" json:"replication_factor,omitempty"` - OptionOverride *placementpb.Options `protobuf:"bytes,99,opt,name=option_override,json=optionOverride" json:"option_override,omitempty"` + OptionOverride *placementpb.Options `protobuf:"bytes,99,opt,name=option_override,json=optionOverride,proto3" json:"option_override,omitempty"` +} + +func (m *PlacementInitRequest) Reset() { *m = PlacementInitRequest{} } +func (m *PlacementInitRequest) String() string { return proto.CompactTextString(m) } +func (*PlacementInitRequest) ProtoMessage() {} +func (*PlacementInitRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c02b5df7aadc2496, []int{0} +} +func (m *PlacementInitRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementInitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementInitRequest.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 *PlacementInitRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementInitRequest.Merge(m, src) +} +func (m *PlacementInitRequest) XXX_Size() int { + return m.Size() +} +func (m *PlacementInitRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementInitRequest.DiscardUnknown(m) } -func (m *PlacementInitRequest) Reset() { *m = PlacementInitRequest{} } -func (m *PlacementInitRequest) String() string { return proto.CompactTextString(m) } -func (*PlacementInitRequest) ProtoMessage() {} -func (*PlacementInitRequest) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{0} } +var xxx_messageInfo_PlacementInitRequest proto.InternalMessageInfo func (m *PlacementInitRequest) GetInstances() []*placementpb.Instance { if m != nil { @@ -76,14 +112,42 @@ func (m *PlacementInitRequest) GetOptionOverride() *placementpb.Options { } type PlacementGetResponse struct { - Placement *placementpb.Placement `protobuf:"bytes,1,opt,name=placement" json:"placement,omitempty"` + Placement *placementpb.Placement `protobuf:"bytes,1,opt,name=placement,proto3" json:"placement,omitempty"` Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` } -func (m *PlacementGetResponse) Reset() { *m = PlacementGetResponse{} } -func (m *PlacementGetResponse) String() string { return proto.CompactTextString(m) } -func (*PlacementGetResponse) ProtoMessage() {} -func (*PlacementGetResponse) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{1} } +func (m *PlacementGetResponse) Reset() { *m = PlacementGetResponse{} } +func (m *PlacementGetResponse) String() string { return proto.CompactTextString(m) } +func (*PlacementGetResponse) ProtoMessage() {} +func (*PlacementGetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c02b5df7aadc2496, []int{1} +} +func (m *PlacementGetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementGetResponse.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 *PlacementGetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementGetResponse.Merge(m, src) +} +func (m *PlacementGetResponse) XXX_Size() int { + return m.Size() +} +func (m *PlacementGetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementGetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementGetResponse proto.InternalMessageInfo func (m *PlacementGetResponse) GetPlacement() *placementpb.Placement { if m != nil { @@ -100,17 +164,45 @@ func (m *PlacementGetResponse) GetVersion() int32 { } type PlacementAddRequest struct { - Instances []*placementpb.Instance `protobuf:"bytes,1,rep,name=instances" json:"instances,omitempty"` + Instances []*placementpb.Instance `protobuf:"bytes,1,rep,name=instances,proto3" json:"instances,omitempty"` // By default add requests will only succeed if all instances in the placement // are AVAILABLE for all their shards. force overrides that. Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` - OptionOverride *placementpb.Options `protobuf:"bytes,99,opt,name=option_override,json=optionOverride" json:"option_override,omitempty"` + OptionOverride *placementpb.Options `protobuf:"bytes,99,opt,name=option_override,json=optionOverride,proto3" json:"option_override,omitempty"` +} + +func (m *PlacementAddRequest) Reset() { *m = PlacementAddRequest{} } +func (m *PlacementAddRequest) String() string { return proto.CompactTextString(m) } +func (*PlacementAddRequest) ProtoMessage() {} +func (*PlacementAddRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c02b5df7aadc2496, []int{2} +} +func (m *PlacementAddRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementAddRequest.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 *PlacementAddRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementAddRequest.Merge(m, src) +} +func (m *PlacementAddRequest) XXX_Size() int { + return m.Size() +} +func (m *PlacementAddRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementAddRequest.DiscardUnknown(m) } -func (m *PlacementAddRequest) Reset() { *m = PlacementAddRequest{} } -func (m *PlacementAddRequest) String() string { return proto.CompactTextString(m) } -func (*PlacementAddRequest) ProtoMessage() {} -func (*PlacementAddRequest) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{2} } +var xxx_messageInfo_PlacementAddRequest proto.InternalMessageInfo func (m *PlacementAddRequest) GetInstances() []*placementpb.Instance { if m != nil { @@ -134,15 +226,43 @@ func (m *PlacementAddRequest) GetOptionOverride() *placementpb.Options { } type PlacementRemoveRequest struct { - InstanceIds []string `protobuf:"bytes,1,rep,name=instance_ids,json=instanceIds" json:"instance_ids,omitempty"` + InstanceIds []string `protobuf:"bytes,1,rep,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"` Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` - OptionOverride *placementpb.Options `protobuf:"bytes,99,opt,name=option_override,json=optionOverride" json:"option_override,omitempty"` + OptionOverride *placementpb.Options `protobuf:"bytes,99,opt,name=option_override,json=optionOverride,proto3" json:"option_override,omitempty"` +} + +func (m *PlacementRemoveRequest) Reset() { *m = PlacementRemoveRequest{} } +func (m *PlacementRemoveRequest) String() string { return proto.CompactTextString(m) } +func (*PlacementRemoveRequest) ProtoMessage() {} +func (*PlacementRemoveRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c02b5df7aadc2496, []int{3} +} +func (m *PlacementRemoveRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementRemoveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementRemoveRequest.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 *PlacementRemoveRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementRemoveRequest.Merge(m, src) +} +func (m *PlacementRemoveRequest) XXX_Size() int { + return m.Size() +} +func (m *PlacementRemoveRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementRemoveRequest.DiscardUnknown(m) } -func (m *PlacementRemoveRequest) Reset() { *m = PlacementRemoveRequest{} } -func (m *PlacementRemoveRequest) String() string { return proto.CompactTextString(m) } -func (*PlacementRemoveRequest) ProtoMessage() {} -func (*PlacementRemoveRequest) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{3} } +var xxx_messageInfo_PlacementRemoveRequest proto.InternalMessageInfo func (m *PlacementRemoveRequest) GetInstanceIds() []string { if m != nil { @@ -166,16 +286,44 @@ func (m *PlacementRemoveRequest) GetOptionOverride() *placementpb.Options { } type PlacementReplaceRequest struct { - LeavingInstanceIDs []string `protobuf:"bytes,1,rep,name=leavingInstanceIDs" json:"leavingInstanceIDs,omitempty"` - Candidates []*placementpb.Instance `protobuf:"bytes,2,rep,name=candidates" json:"candidates,omitempty"` + LeavingInstanceIDs []string `protobuf:"bytes,1,rep,name=leavingInstanceIDs,proto3" json:"leavingInstanceIDs,omitempty"` + Candidates []*placementpb.Instance `protobuf:"bytes,2,rep,name=candidates,proto3" json:"candidates,omitempty"` Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` - OptionOverride *placementpb.Options `protobuf:"bytes,99,opt,name=option_override,json=optionOverride" json:"option_override,omitempty"` + OptionOverride *placementpb.Options `protobuf:"bytes,99,opt,name=option_override,json=optionOverride,proto3" json:"option_override,omitempty"` +} + +func (m *PlacementReplaceRequest) Reset() { *m = PlacementReplaceRequest{} } +func (m *PlacementReplaceRequest) String() string { return proto.CompactTextString(m) } +func (*PlacementReplaceRequest) ProtoMessage() {} +func (*PlacementReplaceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c02b5df7aadc2496, []int{4} +} +func (m *PlacementReplaceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementReplaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementReplaceRequest.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 *PlacementReplaceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementReplaceRequest.Merge(m, src) +} +func (m *PlacementReplaceRequest) XXX_Size() int { + return m.Size() +} +func (m *PlacementReplaceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementReplaceRequest.DiscardUnknown(m) } -func (m *PlacementReplaceRequest) Reset() { *m = PlacementReplaceRequest{} } -func (m *PlacementReplaceRequest) String() string { return proto.CompactTextString(m) } -func (*PlacementReplaceRequest) ProtoMessage() {} -func (*PlacementReplaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{4} } +var xxx_messageInfo_PlacementReplaceRequest proto.InternalMessageInfo func (m *PlacementReplaceRequest) GetLeavingInstanceIDs() []string { if m != nil { @@ -206,7 +354,7 @@ func (m *PlacementReplaceRequest) GetOptionOverride() *placementpb.Options { } type PlacementSetRequest struct { - Placement *placementpb.Placement `protobuf:"bytes,1,opt,name=placement" json:"placement,omitempty"` + Placement *placementpb.Placement `protobuf:"bytes,1,opt,name=placement,proto3" json:"placement,omitempty"` Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` // Confirm must be set, otherwise just a dry run is executed. Confirm bool `protobuf:"varint,3,opt,name=confirm,proto3" json:"confirm,omitempty"` @@ -214,10 +362,38 @@ type PlacementSetRequest struct { Force bool `protobuf:"varint,4,opt,name=force,proto3" json:"force,omitempty"` } -func (m *PlacementSetRequest) Reset() { *m = PlacementSetRequest{} } -func (m *PlacementSetRequest) String() string { return proto.CompactTextString(m) } -func (*PlacementSetRequest) ProtoMessage() {} -func (*PlacementSetRequest) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{5} } +func (m *PlacementSetRequest) Reset() { *m = PlacementSetRequest{} } +func (m *PlacementSetRequest) String() string { return proto.CompactTextString(m) } +func (*PlacementSetRequest) ProtoMessage() {} +func (*PlacementSetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c02b5df7aadc2496, []int{5} +} +func (m *PlacementSetRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementSetRequest.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 *PlacementSetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementSetRequest.Merge(m, src) +} +func (m *PlacementSetRequest) XXX_Size() int { + return m.Size() +} +func (m *PlacementSetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementSetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementSetRequest proto.InternalMessageInfo func (m *PlacementSetRequest) GetPlacement() *placementpb.Placement { if m != nil { @@ -248,15 +424,43 @@ func (m *PlacementSetRequest) GetForce() bool { } type PlacementSetResponse struct { - Placement *placementpb.Placement `protobuf:"bytes,1,opt,name=placement" json:"placement,omitempty"` + Placement *placementpb.Placement `protobuf:"bytes,1,opt,name=placement,proto3" json:"placement,omitempty"` Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` DryRun bool `protobuf:"varint,3,opt,name=dryRun,proto3" json:"dryRun,omitempty"` } -func (m *PlacementSetResponse) Reset() { *m = PlacementSetResponse{} } -func (m *PlacementSetResponse) String() string { return proto.CompactTextString(m) } -func (*PlacementSetResponse) ProtoMessage() {} -func (*PlacementSetResponse) Descriptor() ([]byte, []int) { return fileDescriptorPlacement, []int{6} } +func (m *PlacementSetResponse) Reset() { *m = PlacementSetResponse{} } +func (m *PlacementSetResponse) String() string { return proto.CompactTextString(m) } +func (*PlacementSetResponse) ProtoMessage() {} +func (*PlacementSetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c02b5df7aadc2496, []int{6} +} +func (m *PlacementSetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementSetResponse.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 *PlacementSetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementSetResponse.Merge(m, src) +} +func (m *PlacementSetResponse) XXX_Size() int { + return m.Size() +} +func (m *PlacementSetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementSetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementSetResponse proto.InternalMessageInfo func (m *PlacementSetResponse) GetPlacement() *placementpb.Placement { if m != nil { @@ -288,10 +492,50 @@ func init() { proto.RegisterType((*PlacementSetRequest)(nil), "admin.PlacementSetRequest") proto.RegisterType((*PlacementSetResponse)(nil), "admin.PlacementSetResponse") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/admin/placement.proto", fileDescriptor_c02b5df7aadc2496) +} + +var fileDescriptor_c02b5df7aadc2496 = []byte{ + // 481 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6e, 0x13, 0x31, + 0x10, 0xae, 0x09, 0x29, 0x64, 0x82, 0x40, 0x98, 0x10, 0x56, 0x48, 0xac, 0x42, 0x4e, 0xb9, 0xb0, + 0x2b, 0x35, 0x70, 0xe4, 0x40, 0x85, 0x40, 0xe1, 0x52, 0xb4, 0x79, 0x80, 0xc8, 0xb1, 0x27, 0xa9, + 0xa5, 0xac, 0xbd, 0xb5, 0xbd, 0x91, 0x7a, 0xe1, 0x19, 0x7a, 0xe1, 0xcc, 0xeb, 0x70, 0xec, 0x05, + 0xa9, 0x47, 0x94, 0xbc, 0x08, 0xaa, 0xb3, 0x7f, 0xe5, 0xef, 0xd2, 0xf6, 0x38, 0x33, 0xdf, 0x7c, + 0xfe, 0xbe, 0xd1, 0x8c, 0xe1, 0x70, 0x29, 0xdd, 0x71, 0x3e, 0x8f, 0xb8, 0x4e, 0xe3, 0x74, 0x2c, + 0xe6, 0x71, 0x3a, 0x8e, 0xad, 0xe1, 0xf1, 0x49, 0x8e, 0xe6, 0x34, 0x5e, 0xa2, 0x42, 0xc3, 0x1c, + 0x8a, 0x38, 0x33, 0xda, 0xe9, 0x98, 0x89, 0x54, 0xaa, 0x38, 0x5b, 0x31, 0x8e, 0x29, 0x2a, 0x17, + 0xf9, 0x2c, 0x6d, 0xfb, 0xf4, 0xf3, 0x4f, 0xff, 0xa0, 0xe2, 0xab, 0xdc, 0x3a, 0x34, 0x7f, 0x90, + 0x55, 0x34, 0xd9, 0xfc, 0x77, 0xca, 0xe1, 0x05, 0x81, 0xde, 0xe7, 0x32, 0x37, 0x51, 0xd2, 0x25, + 0x78, 0x92, 0xa3, 0x75, 0x74, 0x0c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4, 0x2d, 0x49, 0xfa, 0x41, + 0xe0, 0x59, 0x43, 0x92, 0x6f, 0x29, 0x35, 0x45, 0x40, 0x57, 0xc8, 0xd6, 0x52, 0x2d, 0xcb, 0x09, + 0x4d, 0xde, 0x97, 0xca, 0xfe, 0x52, 0xa1, 0x6f, 0x00, 0x38, 0x53, 0x42, 0x0a, 0xe6, 0xf0, 0x72, + 0xeb, 0xfe, 0x33, 0xe9, 0x06, 0xb0, 0xf6, 0xd5, 0xba, 0x41, 0x5f, 0x5f, 0x9b, 0xcb, 0x30, 0xc5, + 0xea, 0x9c, 0x6e, 0x78, 0xe9, 0x2e, 0x2b, 0x5c, 0xab, 0x85, 0x34, 0x69, 0x21, 0xbf, 0x0c, 0x6b, + 0x5b, 0x77, 0x1b, 0xb6, 0x86, 0x5f, 0x1a, 0xc7, 0x30, 0xbd, 0xbd, 0x63, 0xa0, 0x7d, 0xd8, 0x17, + 0xe6, 0x34, 0xc9, 0x55, 0x21, 0xab, 0x88, 0x0e, 0x83, 0xef, 0x9b, 0x90, 0x9c, 0x6f, 0x42, 0xf2, + 0x73, 0x13, 0x92, 0xb3, 0x6d, 0xb8, 0x77, 0xbe, 0x0d, 0xf7, 0x2e, 0xb6, 0xe1, 0xde, 0x7c, 0xdf, + 0x7f, 0x44, 0xe3, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x6f, 0x66, 0x24, 0x21, 0x05, 0x00, + 0x00, +} + func (m *PlacementInitRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -299,51 +543,60 @@ func (m *PlacementInitRequest) Marshal() (dAtA []byte, err error) { } func (m *PlacementInitRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementInitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Instances) > 0 { - for _, msg := range m.Instances { - dAtA[i] = 0xa - i++ - i = encodeVarintPlacement(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.OptionOverride != nil { + { + size, err := m.OptionOverride.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) } - } - if m.NumShards != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.NumShards)) + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0x9a } if m.ReplicationFactor != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintPlacement(dAtA, i, uint64(m.ReplicationFactor)) + i-- + dAtA[i] = 0x18 } - if m.OptionOverride != nil { - dAtA[i] = 0x9a - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.OptionOverride.Size())) - n1, err := m.OptionOverride.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.NumShards != 0 { + i = encodeVarintPlacement(dAtA, i, uint64(m.NumShards)) + i-- + dAtA[i] = 0x10 + } + if len(m.Instances) > 0 { + for iNdEx := len(m.Instances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Instances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - i += n1 } - return i, nil + return len(dAtA) - i, nil } func (m *PlacementGetResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -351,32 +604,39 @@ func (m *PlacementGetResponse) Marshal() (dAtA []byte, err error) { } func (m *PlacementGetResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementGetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Placement != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.Placement.Size())) - n2, err := m.Placement.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } if m.Version != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintPlacement(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x10 + } + if m.Placement != nil { + { + size, err := m.Placement.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *PlacementAddRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -384,51 +644,60 @@ func (m *PlacementAddRequest) Marshal() (dAtA []byte, err error) { } func (m *PlacementAddRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Instances) > 0 { - for _, msg := range m.Instances { - dAtA[i] = 0xa - i++ - i = encodeVarintPlacement(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.OptionOverride != nil { + { + size, err := m.OptionOverride.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0x9a } if m.Force { - dAtA[i] = 0x10 - i++ + i-- if m.Force { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if m.OptionOverride != nil { - dAtA[i] = 0x9a - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.OptionOverride.Size())) - n3, err := m.OptionOverride.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Instances) > 0 { + for iNdEx := len(m.Instances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Instances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - i += n3 } - return i, nil + return len(dAtA) - i, nil } func (m *PlacementRemoveRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -436,54 +705,55 @@ func (m *PlacementRemoveRequest) Marshal() (dAtA []byte, err error) { } func (m *PlacementRemoveRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementRemoveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.InstanceIds) > 0 { - for _, s := range m.InstanceIds { - dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) + if m.OptionOverride != nil { + { + size, err := m.OptionOverride.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0x9a } if m.Force { - dAtA[i] = 0x10 - i++ + i-- if m.Force { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if m.OptionOverride != nil { - dAtA[i] = 0x9a - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.OptionOverride.Size())) - n4, err := m.OptionOverride.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.InstanceIds) > 0 { + for iNdEx := len(m.InstanceIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.InstanceIds[iNdEx]) + copy(dAtA[i:], m.InstanceIds[iNdEx]) + i = encodeVarintPlacement(dAtA, i, uint64(len(m.InstanceIds[iNdEx]))) + i-- + dAtA[i] = 0xa } - i += n4 } - return i, nil + return len(dAtA) - i, nil } func (m *PlacementReplaceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -491,66 +761,69 @@ func (m *PlacementReplaceRequest) Marshal() (dAtA []byte, err error) { } func (m *PlacementReplaceRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementReplaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.LeavingInstanceIDs) > 0 { - for _, s := range m.LeavingInstanceIDs { - dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.Candidates) > 0 { - for _, msg := range m.Candidates { - dAtA[i] = 0x12 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.OptionOverride != nil { + { + size, err := m.OptionOverride.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0x9a } if m.Force { - dAtA[i] = 0x18 - i++ + i-- if m.Force { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 } - if m.OptionOverride != nil { - dAtA[i] = 0x9a - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.OptionOverride.Size())) - n5, err := m.OptionOverride.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Candidates) > 0 { + for iNdEx := len(m.Candidates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Candidates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.LeavingInstanceIDs) > 0 { + for iNdEx := len(m.LeavingInstanceIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.LeavingInstanceIDs[iNdEx]) + copy(dAtA[i:], m.LeavingInstanceIDs[iNdEx]) + i = encodeVarintPlacement(dAtA, i, uint64(len(m.LeavingInstanceIDs[iNdEx]))) + i-- + dAtA[i] = 0xa } - i += n5 } - return i, nil + return len(dAtA) - i, nil } func (m *PlacementSetRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -558,52 +831,59 @@ func (m *PlacementSetRequest) Marshal() (dAtA []byte, err error) { } func (m *PlacementSetRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Placement != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.Placement.Size())) - n6, err := m.Placement.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Force { + i-- + if m.Force { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i += n6 - } - if m.Version != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x20 } if m.Confirm { - dAtA[i] = 0x18 - i++ + i-- if m.Confirm { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 } - if m.Force { - dAtA[i] = 0x20 - i++ - if m.Force { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.Version != 0 { + i = encodeVarintPlacement(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x10 + } + if m.Placement != nil { + { + size, err := m.Placement.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) } - i++ + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *PlacementSetResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -611,48 +891,60 @@ func (m *PlacementSetResponse) Marshal() (dAtA []byte, err error) { } func (m *PlacementSetResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementSetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Placement != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.Placement.Size())) - n7, err := m.Placement.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.Version != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPlacement(dAtA, i, uint64(m.Version)) - } if m.DryRun { - dAtA[i] = 0x18 - i++ + i-- if m.DryRun { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 + } + if m.Version != 0 { + i = encodeVarintPlacement(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x10 + } + if m.Placement != nil { + { + size, err := m.Placement.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlacement(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintPlacement(dAtA []byte, offset int, v uint64) int { + offset -= sovPlacement(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *PlacementInitRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Instances) > 0 { @@ -675,6 +967,9 @@ func (m *PlacementInitRequest) Size() (n int) { } func (m *PlacementGetResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Placement != nil { @@ -688,6 +983,9 @@ func (m *PlacementGetResponse) Size() (n int) { } func (m *PlacementAddRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Instances) > 0 { @@ -707,6 +1005,9 @@ func (m *PlacementAddRequest) Size() (n int) { } func (m *PlacementRemoveRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.InstanceIds) > 0 { @@ -726,6 +1027,9 @@ func (m *PlacementRemoveRequest) Size() (n int) { } func (m *PlacementReplaceRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.LeavingInstanceIDs) > 0 { @@ -751,6 +1055,9 @@ func (m *PlacementReplaceRequest) Size() (n int) { } func (m *PlacementSetRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Placement != nil { @@ -770,6 +1077,9 @@ func (m *PlacementSetRequest) Size() (n int) { } func (m *PlacementSetResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Placement != nil { @@ -786,14 +1096,7 @@ func (m *PlacementSetResponse) Size() (n int) { } func sovPlacement(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPlacement(x uint64) (n int) { return sovPlacement(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -813,7 +1116,7 @@ func (m *PlacementInitRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -841,7 +1144,7 @@ func (m *PlacementInitRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -850,6 +1153,9 @@ func (m *PlacementInitRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -872,7 +1178,7 @@ func (m *PlacementInitRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumShards |= (int32(b) & 0x7F) << shift + m.NumShards |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -891,7 +1197,7 @@ func (m *PlacementInitRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ReplicationFactor |= (int32(b) & 0x7F) << shift + m.ReplicationFactor |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -910,7 +1216,7 @@ func (m *PlacementInitRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -919,6 +1225,9 @@ func (m *PlacementInitRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -935,7 +1244,7 @@ func (m *PlacementInitRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -965,7 +1274,7 @@ func (m *PlacementGetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -993,7 +1302,7 @@ func (m *PlacementGetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1002,6 +1311,9 @@ func (m *PlacementGetResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1026,7 +1338,7 @@ func (m *PlacementGetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Version |= (int32(b) & 0x7F) << shift + m.Version |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -1037,7 +1349,7 @@ func (m *PlacementGetResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -1067,7 +1379,7 @@ func (m *PlacementAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1095,7 +1407,7 @@ func (m *PlacementAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1104,6 +1416,9 @@ func (m *PlacementAddRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1126,7 +1441,7 @@ func (m *PlacementAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1146,7 +1461,7 @@ func (m *PlacementAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1155,6 +1470,9 @@ func (m *PlacementAddRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1171,7 +1489,7 @@ func (m *PlacementAddRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -1201,7 +1519,7 @@ func (m *PlacementRemoveRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1229,7 +1547,7 @@ func (m *PlacementRemoveRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1239,6 +1557,9 @@ func (m *PlacementRemoveRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1258,7 +1579,7 @@ func (m *PlacementRemoveRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1278,7 +1599,7 @@ func (m *PlacementRemoveRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1287,6 +1608,9 @@ func (m *PlacementRemoveRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1303,7 +1627,7 @@ func (m *PlacementRemoveRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -1333,7 +1657,7 @@ func (m *PlacementReplaceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1361,7 +1685,7 @@ func (m *PlacementReplaceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1371,6 +1695,9 @@ func (m *PlacementReplaceRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1390,7 +1717,7 @@ func (m *PlacementReplaceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1399,6 +1726,9 @@ func (m *PlacementReplaceRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1421,7 +1751,7 @@ func (m *PlacementReplaceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1441,7 +1771,7 @@ func (m *PlacementReplaceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1450,6 +1780,9 @@ func (m *PlacementReplaceRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1466,7 +1799,7 @@ func (m *PlacementReplaceRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -1496,7 +1829,7 @@ func (m *PlacementSetRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1524,7 +1857,7 @@ func (m *PlacementSetRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1533,6 +1866,9 @@ func (m *PlacementSetRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1557,7 +1893,7 @@ func (m *PlacementSetRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Version |= (int32(b) & 0x7F) << shift + m.Version |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -1576,7 +1912,7 @@ func (m *PlacementSetRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1596,7 +1932,7 @@ func (m *PlacementSetRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1608,7 +1944,7 @@ func (m *PlacementSetRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -1638,7 +1974,7 @@ func (m *PlacementSetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1666,7 +2002,7 @@ func (m *PlacementSetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1675,6 +2011,9 @@ func (m *PlacementSetResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlacement } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlacement + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1699,7 +2038,7 @@ func (m *PlacementSetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Version |= (int32(b) & 0x7F) << shift + m.Version |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -1718,7 +2057,7 @@ func (m *PlacementSetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1730,7 +2069,7 @@ func (m *PlacementSetResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlacement } if (iNdEx + skippy) > l { @@ -1748,6 +2087,7 @@ func (m *PlacementSetResponse) Unmarshal(dAtA []byte) error { func skipPlacement(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1779,10 +2119,8 @@ func skipPlacement(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1799,91 +2137,34 @@ func skipPlacement(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthPlacement } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPlacement - } - 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 := skipPlacement(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPlacement + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthPlacement + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthPlacement = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPlacement = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthPlacement = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPlacement = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPlacement = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/admin/placement.proto", fileDescriptorPlacement) -} - -var fileDescriptorPlacement = []byte{ - // 475 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6e, 0x13, 0x31, - 0x10, 0xc6, 0x84, 0x14, 0x32, 0x41, 0xfc, 0x98, 0x10, 0x56, 0x48, 0x44, 0x21, 0xa7, 0x5c, 0xd8, - 0x95, 0x1a, 0x38, 0x72, 0xa0, 0x42, 0xa0, 0x70, 0x29, 0xda, 0x3c, 0x40, 0xe4, 0xd8, 0x93, 0xd4, - 0x52, 0xd6, 0xde, 0xda, 0xde, 0x48, 0xbd, 0xf0, 0x0c, 0xbd, 0x70, 0xe6, 0x75, 0x38, 0x72, 0x41, - 0xe2, 0x88, 0xc2, 0x8b, 0xa0, 0x3a, 0xeb, 0xdd, 0x2d, 0x3f, 0xbd, 0xb4, 0x3d, 0xce, 0xcc, 0x37, - 0x9f, 0xbf, 0x6f, 0x34, 0x63, 0x38, 0x58, 0x49, 0x77, 0x54, 0x2c, 0x62, 0xae, 0xb3, 0x24, 0x9b, - 0x88, 0x45, 0x92, 0x4d, 0x12, 0x6b, 0x78, 0x72, 0x5c, 0xa0, 0x39, 0x49, 0x56, 0xa8, 0xd0, 0x30, - 0x87, 0x22, 0xc9, 0x8d, 0x76, 0x3a, 0x61, 0x22, 0x93, 0x2a, 0xc9, 0xd7, 0x8c, 0x63, 0x86, 0xca, - 0xc5, 0x3e, 0x4b, 0xdb, 0x3e, 0xfd, 0xf4, 0xc3, 0x7f, 0xa8, 0xf8, 0xba, 0xb0, 0x0e, 0xcd, 0x5f, - 0x64, 0x15, 0x4d, 0xbe, 0xf8, 0x93, 0x72, 0xf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0xb8, - 0x1b, 0x1e, 0x9f, 0x4b, 0xb1, 0xd3, 0xd9, 0x49, 0xbb, 0x21, 0x37, 0x15, 0xd7, 0x24, 0xe9, 0x3b, - 0x81, 0x27, 0x0d, 0x49, 0xbe, 0x25, 0x68, 0x8a, 0x81, 0xae, 0x91, 0x6d, 0xa4, 0x5a, 0x85, 0x09, - 0x4d, 0xdf, 0x06, 0x65, 0xff, 0xa8, 0xd0, 0x57, 0x00, 0x9c, 0x29, 0x21, 0x05, 0x73, 0x78, 0xb6, - 0x75, 0x17, 0x4c, 0xba, 0x01, 0xac, 0x7d, 0xb5, 0xae, 0xd0, 0xd7, 0xe7, 0xe6, 0x32, 0xcc, 0xb0, - 0x3a, 0xa7, 0x2b, 0x5e, 0xba, 0xb3, 0x0a, 0xd7, 0x6a, 0x29, 0x4d, 0x56, 0xca, 0x0f, 0x61, 0x6d, - 0xeb, 0x56, 0xc3, 0xd6, 0xe8, 0x53, 0xe3, 0x18, 0x66, 0xd7, 0x77, 0x0c, 0xb4, 0x0f, 0x7b, 0xc2, - 0x9c, 0xa4, 0x85, 0x2a, 0x65, 0x95, 0xd1, 0xc1, 0x83, 0xaf, 0xdb, 0x01, 0xf9, 0xb6, 0x1d, 0x90, - 0x9f, 0xdb, 0x01, 0x39, 0xfd, 0x35, 0xb8, 0xb1, 0xd8, 0xf3, 0x1f, 0xd0, 0xe4, 0x77, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x8c, 0x7a, 0x08, 0x16, 0x19, 0x05, 0x00, 0x00, -} diff --git a/src/query/generated/proto/admin/topic.pb.go b/src/query/generated/proto/admin/topic.pb.go index 6448029cc6..b19a5a8715 100644 --- a/src/query/generated/proto/admin/topic.pb.go +++ b/src/query/generated/proto/admin/topic.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/query/generated/proto/admin/topic.proto -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,27 +23,63 @@ package admin -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import topicpb "github.com/m3db/m3/src/msg/generated/proto/topicpb" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + topicpb "github.com/m3db/m3/src/msg/generated/proto/topicpb" + io "io" + math "math" + math_bits "math/bits" +) // 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 + type TopicGetResponse struct { - Topic *topicpb.Topic `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"` + Topic *topicpb.Topic `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` } -func (m *TopicGetResponse) Reset() { *m = TopicGetResponse{} } -func (m *TopicGetResponse) String() string { return proto.CompactTextString(m) } -func (*TopicGetResponse) ProtoMessage() {} -func (*TopicGetResponse) Descriptor() ([]byte, []int) { return fileDescriptorTopic, []int{0} } +func (m *TopicGetResponse) Reset() { *m = TopicGetResponse{} } +func (m *TopicGetResponse) String() string { return proto.CompactTextString(m) } +func (*TopicGetResponse) ProtoMessage() {} +func (*TopicGetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9864f2eca2353d92, []int{0} +} +func (m *TopicGetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TopicGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TopicGetResponse.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 *TopicGetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TopicGetResponse.Merge(m, src) +} +func (m *TopicGetResponse) XXX_Size() int { + return m.Size() +} +func (m *TopicGetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TopicGetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TopicGetResponse proto.InternalMessageInfo func (m *TopicGetResponse) GetTopic() *topicpb.Topic { if m != nil { @@ -63,10 +99,38 @@ type TopicInitRequest struct { NumberOfShards uint32 `protobuf:"varint,1,opt,name=number_of_shards,json=numberOfShards,proto3" json:"number_of_shards,omitempty"` } -func (m *TopicInitRequest) Reset() { *m = TopicInitRequest{} } -func (m *TopicInitRequest) String() string { return proto.CompactTextString(m) } -func (*TopicInitRequest) ProtoMessage() {} -func (*TopicInitRequest) Descriptor() ([]byte, []int) { return fileDescriptorTopic, []int{1} } +func (m *TopicInitRequest) Reset() { *m = TopicInitRequest{} } +func (m *TopicInitRequest) String() string { return proto.CompactTextString(m) } +func (*TopicInitRequest) ProtoMessage() {} +func (*TopicInitRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9864f2eca2353d92, []int{1} +} +func (m *TopicInitRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TopicInitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TopicInitRequest.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 *TopicInitRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TopicInitRequest.Merge(m, src) +} +func (m *TopicInitRequest) XXX_Size() int { + return m.Size() +} +func (m *TopicInitRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TopicInitRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TopicInitRequest proto.InternalMessageInfo func (m *TopicInitRequest) GetNumberOfShards() uint32 { if m != nil { @@ -76,13 +140,41 @@ func (m *TopicInitRequest) GetNumberOfShards() uint32 { } type TopicAddRequest struct { - ConsumerService *topicpb.ConsumerService `protobuf:"bytes,1,opt,name=consumer_service,json=consumerService" json:"consumer_service,omitempty"` + ConsumerService *topicpb.ConsumerService `protobuf:"bytes,1,opt,name=consumer_service,json=consumerService,proto3" json:"consumer_service,omitempty"` } -func (m *TopicAddRequest) Reset() { *m = TopicAddRequest{} } -func (m *TopicAddRequest) String() string { return proto.CompactTextString(m) } -func (*TopicAddRequest) ProtoMessage() {} -func (*TopicAddRequest) Descriptor() ([]byte, []int) { return fileDescriptorTopic, []int{2} } +func (m *TopicAddRequest) Reset() { *m = TopicAddRequest{} } +func (m *TopicAddRequest) String() string { return proto.CompactTextString(m) } +func (*TopicAddRequest) ProtoMessage() {} +func (*TopicAddRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9864f2eca2353d92, []int{2} +} +func (m *TopicAddRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TopicAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TopicAddRequest.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 *TopicAddRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TopicAddRequest.Merge(m, src) +} +func (m *TopicAddRequest) XXX_Size() int { + return m.Size() +} +func (m *TopicAddRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TopicAddRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TopicAddRequest proto.InternalMessageInfo func (m *TopicAddRequest) GetConsumerService() *topicpb.ConsumerService { if m != nil { @@ -94,14 +186,42 @@ func (m *TopicAddRequest) GetConsumerService() *topicpb.ConsumerService { // Request to update a topic and set its consumer services to a new value. // CheckAndSet is used based on the version passed. type TopicUpdateRequest struct { - ConsumerServices []*topicpb.ConsumerService `protobuf:"bytes,1,rep,name=consumer_services,json=consumerServices" json:"consumer_services,omitempty"` + ConsumerServices []*topicpb.ConsumerService `protobuf:"bytes,1,rep,name=consumer_services,json=consumerServices,proto3" json:"consumer_services,omitempty"` Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` } -func (m *TopicUpdateRequest) Reset() { *m = TopicUpdateRequest{} } -func (m *TopicUpdateRequest) String() string { return proto.CompactTextString(m) } -func (*TopicUpdateRequest) ProtoMessage() {} -func (*TopicUpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptorTopic, []int{3} } +func (m *TopicUpdateRequest) Reset() { *m = TopicUpdateRequest{} } +func (m *TopicUpdateRequest) String() string { return proto.CompactTextString(m) } +func (*TopicUpdateRequest) ProtoMessage() {} +func (*TopicUpdateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9864f2eca2353d92, []int{3} +} +func (m *TopicUpdateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TopicUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TopicUpdateRequest.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 *TopicUpdateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TopicUpdateRequest.Merge(m, src) +} +func (m *TopicUpdateRequest) XXX_Size() int { + return m.Size() +} +func (m *TopicUpdateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TopicUpdateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TopicUpdateRequest proto.InternalMessageInfo func (m *TopicUpdateRequest) GetConsumerServices() []*topicpb.ConsumerService { if m != nil { @@ -123,10 +243,39 @@ func init() { proto.RegisterType((*TopicAddRequest)(nil), "admin.TopicAddRequest") proto.RegisterType((*TopicUpdateRequest)(nil), "admin.TopicUpdateRequest") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/admin/topic.proto", fileDescriptor_9864f2eca2353d92) +} + +var fileDescriptor_9864f2eca2353d92 = []byte{ + // 311 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xcd, 0x4a, 0x33, 0x31, + 0x14, 0x86, 0x3b, 0xdf, 0x47, 0x15, 0x22, 0x6d, 0xc7, 0x59, 0x0d, 0x2e, 0x42, 0x19, 0x5c, 0x74, + 0x35, 0x01, 0xbb, 0x15, 0x41, 0x8b, 0x88, 0x2b, 0x21, 0x55, 0xb7, 0x65, 0x26, 0x39, 0x6d, 0xb3, + 0x48, 0x32, 0xcd, 0x4f, 0xc1, 0xbb, 0xf0, 0xb2, 0x5c, 0x76, 0xe9, 0x52, 0xda, 0x1b, 0x91, 0xa6, + 0x33, 0xa2, 0x95, 0xba, 0x3c, 0xcf, 0x39, 0xef, 0xc3, 0x4b, 0x82, 0xae, 0x66, 0xc2, 0xcd, 0x7d, + 0x99, 0x33, 0x2d, 0x89, 0x1c, 0xf2, 0x92, 0xc8, 0x21, 0xb1, 0x86, 0x91, 0x85, 0x07, 0xf3, 0x42, + 0x66, 0xa0, 0xc0, 0x14, 0x0e, 0x38, 0xa9, 0x8c, 0x76, 0x9a, 0x14, 0x5c, 0x0a, 0x45, 0x9c, 0xae, + 0x04, 0xcb, 0x03, 0x49, 0xda, 0x01, 0x9d, 0x1d, 0xd2, 0x48, 0x3b, 0xfb, 0x25, 0x09, 0xf1, 0xaa, + 0xfc, 0xae, 0xc9, 0x28, 0x8a, 0x1f, 0xb7, 0xe3, 0x1d, 0x38, 0x0a, 0xb6, 0xd2, 0xca, 0x42, 0x72, + 0x8e, 0xda, 0xe1, 0x24, 0x8d, 0xfa, 0xd1, 0xe0, 0xe4, 0xa2, 0x9b, 0xd7, 0xc1, 0x3c, 0x5c, 0xd2, + 0xdd, 0x32, 0x49, 0xd1, 0xf1, 0x12, 0x8c, 0x15, 0x5a, 0xa5, 0xff, 0xfa, 0xd1, 0xa0, 0x43, 0x9b, + 0x31, 0xbb, 0xac, 0x9d, 0xf7, 0x4a, 0x38, 0x0a, 0x0b, 0x0f, 0xd6, 0x25, 0x03, 0x14, 0x2b, 0x2f, + 0x4b, 0x30, 0x13, 0x3d, 0x9d, 0xd8, 0x79, 0x61, 0xb8, 0x0d, 0xfa, 0x0e, 0xed, 0xee, 0xf8, 0xc3, + 0x74, 0x1c, 0x68, 0xf6, 0x8c, 0x7a, 0x21, 0x7d, 0xcd, 0x79, 0x13, 0x1e, 0xa1, 0x98, 0x69, 0x65, + 0xbd, 0x04, 0x33, 0xb1, 0x60, 0x96, 0x82, 0x41, 0xdd, 0x2d, 0xfd, 0xea, 0x36, 0xaa, 0x0f, 0xc6, + 0xbb, 0x3d, 0xed, 0xb1, 0x9f, 0x20, 0xf3, 0x28, 0x09, 0xde, 0xa7, 0x8a, 0x17, 0x0e, 0x1a, 0xf5, + 0x2d, 0x3a, 0xdd, 0x57, 0x6f, 0x8b, 0xfd, 0xff, 0xd3, 0x1d, 0xef, 0xb9, 0xed, 0xe1, 0xc7, 0xb8, + 0x49, 0xdf, 0xd6, 0x38, 0x5a, 0xad, 0x71, 0xf4, 0xb1, 0xc6, 0xd1, 0xeb, 0x06, 0xb7, 0x56, 0x1b, + 0xdc, 0x7a, 0xdf, 0xe0, 0x56, 0x79, 0x14, 0x7e, 0x60, 0xf8, 0x19, 0x00, 0x00, 0xff, 0xff, 0xe5, + 0x4d, 0x64, 0xe2, 0x0a, 0x02, 0x00, 0x00, +} + func (m *TopicGetResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -134,32 +283,39 @@ func (m *TopicGetResponse) Marshal() (dAtA []byte, err error) { } func (m *TopicGetResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TopicGetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Topic != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTopic(dAtA, i, uint64(m.Topic.Size())) - n1, err := m.Topic.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } if m.Version != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintTopic(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x10 } - return i, nil + if m.Topic != nil { + { + size, err := m.Topic.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTopic(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TopicInitRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -167,22 +323,27 @@ func (m *TopicInitRequest) Marshal() (dAtA []byte, err error) { } func (m *TopicInitRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TopicInitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.NumberOfShards != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintTopic(dAtA, i, uint64(m.NumberOfShards)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *TopicAddRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -190,27 +351,34 @@ func (m *TopicAddRequest) Marshal() (dAtA []byte, err error) { } func (m *TopicAddRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TopicAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.ConsumerService != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTopic(dAtA, i, uint64(m.ConsumerService.Size())) - n2, err := m.ConsumerService.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.ConsumerService.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTopic(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *TopicUpdateRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -218,40 +386,52 @@ func (m *TopicUpdateRequest) Marshal() (dAtA []byte, err error) { } func (m *TopicUpdateRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TopicUpdateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.Version != 0 { + i = encodeVarintTopic(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x10 + } if len(m.ConsumerServices) > 0 { - for _, msg := range m.ConsumerServices { - dAtA[i] = 0xa - i++ - i = encodeVarintTopic(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.ConsumerServices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ConsumerServices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTopic(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.Version != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintTopic(dAtA, i, uint64(m.Version)) - } - return i, nil + return len(dAtA) - i, nil } func encodeVarintTopic(dAtA []byte, offset int, v uint64) int { + offset -= sovTopic(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *TopicGetResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Topic != nil { @@ -265,6 +445,9 @@ func (m *TopicGetResponse) Size() (n int) { } func (m *TopicInitRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.NumberOfShards != 0 { @@ -274,6 +457,9 @@ func (m *TopicInitRequest) Size() (n int) { } func (m *TopicAddRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.ConsumerService != nil { @@ -284,6 +470,9 @@ func (m *TopicAddRequest) Size() (n int) { } func (m *TopicUpdateRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.ConsumerServices) > 0 { @@ -299,14 +488,7 @@ func (m *TopicUpdateRequest) Size() (n int) { } func sovTopic(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTopic(x uint64) (n int) { return sovTopic(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -326,7 +508,7 @@ func (m *TopicGetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -354,7 +536,7 @@ func (m *TopicGetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -363,6 +545,9 @@ func (m *TopicGetResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTopic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTopic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -387,7 +572,7 @@ func (m *TopicGetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Version |= (uint32(b) & 0x7F) << shift + m.Version |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -398,7 +583,7 @@ func (m *TopicGetResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTopic } if (iNdEx + skippy) > l { @@ -428,7 +613,7 @@ func (m *TopicInitRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -456,7 +641,7 @@ func (m *TopicInitRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumberOfShards |= (uint32(b) & 0x7F) << shift + m.NumberOfShards |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -467,7 +652,7 @@ func (m *TopicInitRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTopic } if (iNdEx + skippy) > l { @@ -497,7 +682,7 @@ func (m *TopicAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -525,7 +710,7 @@ func (m *TopicAddRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -534,6 +719,9 @@ func (m *TopicAddRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTopic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTopic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -550,7 +738,7 @@ func (m *TopicAddRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTopic } if (iNdEx + skippy) > l { @@ -580,7 +768,7 @@ func (m *TopicUpdateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -608,7 +796,7 @@ func (m *TopicUpdateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -617,6 +805,9 @@ func (m *TopicUpdateRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTopic } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTopic + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -639,7 +830,7 @@ func (m *TopicUpdateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Version |= (uint32(b) & 0x7F) << shift + m.Version |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -650,7 +841,7 @@ func (m *TopicUpdateRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTopic } if (iNdEx + skippy) > l { @@ -668,6 +859,7 @@ func (m *TopicUpdateRequest) Unmarshal(dAtA []byte) error { func skipTopic(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -699,10 +891,8 @@ func skipTopic(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -719,80 +909,34 @@ func skipTopic(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthTopic } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTopic - } - 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 := skipTopic(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTopic + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthTopic + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthTopic = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTopic = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthTopic = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTopic = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTopic = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/admin/topic.proto", fileDescriptorTopic) -} - -var fileDescriptorTopic = []byte{ - // 303 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xcd, 0x4a, 0xf3, 0x40, - 0x14, 0x86, 0xbf, 0xf9, 0xa4, 0x0a, 0x23, 0x6d, 0x63, 0x56, 0xc1, 0x45, 0x28, 0xc1, 0x45, 0x57, - 0x19, 0xb0, 0x5b, 0x11, 0xb4, 0x88, 0xb8, 0x12, 0xa6, 0xea, 0xb6, 0x24, 0x33, 0xa7, 0xed, 0x2c, - 0x66, 0x26, 0x9d, 0x9f, 0x82, 0x77, 0xe1, 0x65, 0xb9, 0xf4, 0x12, 0x24, 0xde, 0x88, 0x74, 0x92, - 0x88, 0x56, 0xea, 0xf2, 0x3c, 0xe7, 0xbc, 0x0f, 0x2f, 0x07, 0x5f, 0x2e, 0x85, 0x5b, 0xf9, 0x32, - 0x67, 0x5a, 0x12, 0x39, 0xe1, 0x25, 0x91, 0x13, 0x62, 0x0d, 0x23, 0x6b, 0x0f, 0xe6, 0x99, 0x2c, - 0x41, 0x81, 0x29, 0x1c, 0x70, 0x52, 0x19, 0xed, 0x34, 0x29, 0xb8, 0x14, 0x8a, 0x38, 0x5d, 0x09, - 0x96, 0x07, 0x12, 0xf7, 0x02, 0x3a, 0xdd, 0xa7, 0x91, 0x76, 0xf9, 0x4b, 0x12, 0xe2, 0x55, 0xf9, - 0x5d, 0x93, 0x51, 0x1c, 0x3d, 0x6c, 0xc7, 0x5b, 0x70, 0x14, 0x6c, 0xa5, 0x95, 0x85, 0xf8, 0x0c, - 0xf7, 0xc2, 0x49, 0x82, 0x46, 0x68, 0x7c, 0x7c, 0x3e, 0xc8, 0xdb, 0x60, 0x1e, 0x2e, 0x69, 0xb3, - 0x8c, 0x13, 0x7c, 0xb4, 0x01, 0x63, 0x85, 0x56, 0xc9, 0xff, 0x11, 0x1a, 0xf7, 0x69, 0x37, 0x66, - 0x17, 0xad, 0xf3, 0x4e, 0x09, 0x47, 0x61, 0xed, 0xc1, 0xba, 0x78, 0x8c, 0x23, 0xe5, 0x65, 0x09, - 0x66, 0xae, 0x17, 0x73, 0xbb, 0x2a, 0x0c, 0xb7, 0x41, 0xdf, 0xa7, 0x83, 0x86, 0xdf, 0x2f, 0x66, - 0x81, 0x66, 0x4f, 0x78, 0x18, 0xd2, 0x57, 0x9c, 0x77, 0xe1, 0x29, 0x8e, 0x98, 0x56, 0xd6, 0x4b, - 0x30, 0x73, 0x0b, 0x66, 0x23, 0x18, 0xb4, 0xdd, 0x92, 0xaf, 0x6e, 0xd3, 0xf6, 0x60, 0xd6, 0xec, - 0xe9, 0x90, 0xfd, 0x04, 0x99, 0xc7, 0x71, 0xf0, 0x3e, 0x56, 0xbc, 0x70, 0xd0, 0xa9, 0x6f, 0xf0, - 0xc9, 0xae, 0x7a, 0x5b, 0xec, 0xe0, 0x4f, 0x77, 0xb4, 0xe3, 0xb6, 0xfb, 0x9f, 0x71, 0x1d, 0xbd, - 0xd6, 0x29, 0x7a, 0xab, 0x53, 0xf4, 0x5e, 0xa7, 0xe8, 0xe5, 0x23, 0xfd, 0x57, 0x1e, 0x86, 0xcf, - 0x4f, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, 0x38, 0x38, 0xc7, 0xf0, 0x02, 0x02, 0x00, 0x00, -} diff --git a/src/query/generated/proto/prompb/remote.pb.go b/src/query/generated/proto/prompb/remote.pb.go index ec72a9a8b1..5d582f852c 100644 --- a/src/query/generated/proto/prompb/remote.pb.go +++ b/src/query/generated/proto/prompb/remote.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/query/generated/proto/prompb/remote.proto -// Copyright (c) 2021 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,33 +21,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package prompb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/query/generated/proto/prompb/remote.proto - github.com/m3db/m3/src/query/generated/proto/prompb/types.proto - - It has these top-level messages: - WriteRequest - ReadRequest - ReadResponse - Query - QueryResult - Sample - TimeSeries - Label - Labels - LabelMatcher -*/ package prompb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -58,16 +41,44 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type WriteRequest struct { - Timeseries []TimeSeries `protobuf:"bytes,1,rep,name=timeseries" json:"timeseries"` + Timeseries []TimeSeries `protobuf:"bytes,1,rep,name=timeseries,proto3" json:"timeseries"` +} + +func (m *WriteRequest) Reset() { *m = WriteRequest{} } +func (m *WriteRequest) String() string { return proto.CompactTextString(m) } +func (*WriteRequest) ProtoMessage() {} +func (*WriteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_47910ee569e085ef, []int{0} +} +func (m *WriteRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WriteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WriteRequest.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 *WriteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_WriteRequest.Merge(m, src) +} +func (m *WriteRequest) XXX_Size() int { + return m.Size() +} +func (m *WriteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_WriteRequest.DiscardUnknown(m) } -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} } +var xxx_messageInfo_WriteRequest proto.InternalMessageInfo func (m *WriteRequest) GetTimeseries() []TimeSeries { if m != nil { @@ -77,13 +88,41 @@ func (m *WriteRequest) GetTimeseries() []TimeSeries { } type ReadRequest struct { - Queries []*Query `protobuf:"bytes,1,rep,name=queries" json:"queries,omitempty"` + Queries []*Query `protobuf:"bytes,1,rep,name=queries,proto3" 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 fileDescriptor_47910ee569e085ef, []int{1} +} +func (m *ReadRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReadRequest.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 *ReadRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReadRequest.Merge(m, src) +} +func (m *ReadRequest) XXX_Size() int { + return m.Size() +} +func (m *ReadRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReadRequest.DiscardUnknown(m) } -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} } +var xxx_messageInfo_ReadRequest proto.InternalMessageInfo func (m *ReadRequest) GetQueries() []*Query { if m != nil { @@ -94,13 +133,41 @@ func (m *ReadRequest) GetQueries() []*Query { type ReadResponse struct { // In same order as the request's queries. - Results []*QueryResult `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` + Results []*QueryResult `protobuf:"bytes,1,rep,name=results,proto3" 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) Reset() { *m = ReadResponse{} } +func (m *ReadResponse) String() string { return proto.CompactTextString(m) } +func (*ReadResponse) ProtoMessage() {} +func (*ReadResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_47910ee569e085ef, []int{2} +} +func (m *ReadResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReadResponse.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 *ReadResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReadResponse.Merge(m, src) +} +func (m *ReadResponse) XXX_Size() int { + return m.Size() +} +func (m *ReadResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReadResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReadResponse proto.InternalMessageInfo func (m *ReadResponse) GetResults() []*QueryResult { if m != nil { @@ -112,13 +179,41 @@ func (m *ReadResponse) GetResults() []*QueryResult { 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"` + Matchers []*LabelMatcher `protobuf:"bytes,3,rep,name=matchers,proto3" json:"matchers,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) Reset() { *m = Query{} } +func (m *Query) String() string { return proto.CompactTextString(m) } +func (*Query) ProtoMessage() {} +func (*Query) Descriptor() ([]byte, []int) { + return fileDescriptor_47910ee569e085ef, []int{3} +} +func (m *Query) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Query.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 *Query) XXX_Merge(src proto.Message) { + xxx_messageInfo_Query.Merge(m, src) +} +func (m *Query) XXX_Size() int { + return m.Size() +} +func (m *Query) XXX_DiscardUnknown() { + xxx_messageInfo_Query.DiscardUnknown(m) +} + +var xxx_messageInfo_Query proto.InternalMessageInfo func (m *Query) GetStartTimestampMs() int64 { if m != nil { @@ -142,13 +237,41 @@ func (m *Query) GetMatchers() []*LabelMatcher { } type QueryResult struct { - Timeseries []*TimeSeries `protobuf:"bytes,1,rep,name=timeseries" json:"timeseries,omitempty"` + Timeseries []*TimeSeries `protobuf:"bytes,1,rep,name=timeseries,proto3" 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 fileDescriptor_47910ee569e085ef, []int{4} +} +func (m *QueryResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryResult.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 *QueryResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryResult.Merge(m, src) +} +func (m *QueryResult) XXX_Size() int { + return m.Size() +} +func (m *QueryResult) XXX_DiscardUnknown() { + xxx_messageInfo_QueryResult.DiscardUnknown(m) } -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} } +var xxx_messageInfo_QueryResult proto.InternalMessageInfo func (m *QueryResult) GetTimeseries() []*TimeSeries { if m != nil { @@ -164,10 +287,43 @@ func init() { proto.RegisterType((*Query)(nil), "m3prometheus.Query") proto.RegisterType((*QueryResult)(nil), "m3prometheus.QueryResult") } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/prompb/remote.proto", fileDescriptor_47910ee569e085ef) +} + +var fileDescriptor_47910ee569e085ef = []byte{ + // 371 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x4b, 0xeb, 0x40, + 0x14, 0x85, 0x93, 0xd7, 0xf7, 0xda, 0xc7, 0xb4, 0x48, 0x89, 0x9b, 0xda, 0x45, 0x2c, 0x59, 0x75, + 0x61, 0x13, 0x30, 0x20, 0x2e, 0x44, 0xa5, 0x2e, 0xdc, 0x58, 0xc1, 0xb1, 0x20, 0xb8, 0x29, 0x49, + 0x73, 0x4d, 0x03, 0x9d, 0x4c, 0x3a, 0x73, 0xb3, 0xe8, 0xbf, 0x70, 0xe7, 0x5f, 0xea, 0xb2, 0x4b, + 0x57, 0x22, 0xed, 0x1f, 0x91, 0xcc, 0x10, 0x4d, 0xc1, 0x8d, 0x6e, 0x42, 0x72, 0xcf, 0x77, 0x0e, + 0x27, 0x77, 0x86, 0x5c, 0xc6, 0x09, 0xce, 0xf2, 0xd0, 0x9d, 0x72, 0xe6, 0x31, 0x3f, 0x0a, 0x3d, + 0xe6, 0x7b, 0x52, 0x4c, 0xbd, 0x45, 0x0e, 0x62, 0xe9, 0xc5, 0x90, 0x82, 0x08, 0x10, 0x22, 0x2f, + 0x13, 0x1c, 0x79, 0xf1, 0x64, 0x59, 0xe8, 0x09, 0x60, 0x1c, 0xc1, 0x55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, 0x26, 0x08, 0x61, 0x3e, 0xd2, 0x08, 0xfd, 0x64, 0x9d, 0x6b, 0xd2, 0xac, 0x34, + 0xb6, 0x4e, 0x7f, 0xb2, 0xeb, 0xea, 0x96, 0x87, 0xbd, 0xd5, 0xc6, 0x36, 0xd7, 0x1b, 0xdb, 0x7c, + 0xdf, 0xd8, 0xe6, 0xf3, 0xd6, 0x36, 0xd6, 0x5b, 0xdb, 0x78, 0xdd, 0xda, 0xc6, 0x63, 0x5d, 0x5f, + 0x89, 0xb0, 0xae, 0x8e, 0xd7, 0xff, 0x08, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x12, 0x57, 0x22, 0xa0, + 0x02, 0x00, 0x00, +} + func (m *WriteRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -175,29 +331,36 @@ func (m *WriteRequest) Marshal() (dAtA []byte, err error) { } func (m *WriteRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WriteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = 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 + for iNdEx := len(m.Timeseries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Timeseries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRemote(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *ReadRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -205,29 +368,36 @@ func (m *ReadRequest) Marshal() (dAtA []byte, err error) { } func (m *ReadRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = 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 + for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Queries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRemote(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *ReadResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -235,29 +405,36 @@ func (m *ReadResponse) Marshal() (dAtA []byte, err error) { } func (m *ReadResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = 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 + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRemote(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *Query) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -265,39 +442,46 @@ func (m *Query) Marshal() (dAtA []byte, err error) { } func (m *Query) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Query) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.StartTimestampMs != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRemote(dAtA, i, uint64(m.StartTimestampMs)) + if len(m.Matchers) > 0 { + for iNdEx := len(m.Matchers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Matchers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRemote(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } if m.EndTimestampMs != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintRemote(dAtA, i, uint64(m.EndTimestampMs)) + i-- + dAtA[i] = 0x10 } - 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.StartTimestampMs != 0 { + i = encodeVarintRemote(dAtA, i, uint64(m.StartTimestampMs)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *QueryResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -305,35 +489,47 @@ func (m *QueryResult) Marshal() (dAtA []byte, err error) { } func (m *QueryResult) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = 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 + for iNdEx := len(m.Timeseries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Timeseries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRemote(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func encodeVarintRemote(dAtA []byte, offset int, v uint64) int { + offset -= sovRemote(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *WriteRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Timeseries) > 0 { @@ -346,6 +542,9 @@ func (m *WriteRequest) Size() (n int) { } func (m *ReadRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Queries) > 0 { @@ -358,6 +557,9 @@ func (m *ReadRequest) Size() (n int) { } func (m *ReadResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Results) > 0 { @@ -370,6 +572,9 @@ func (m *ReadResponse) Size() (n int) { } func (m *Query) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.StartTimestampMs != 0 { @@ -388,6 +593,9 @@ func (m *Query) Size() (n int) { } func (m *QueryResult) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Timeseries) > 0 { @@ -400,14 +608,7 @@ func (m *QueryResult) Size() (n int) { } func sovRemote(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRemote(x uint64) (n int) { return sovRemote(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -427,7 +628,7 @@ func (m *WriteRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -455,7 +656,7 @@ func (m *WriteRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -464,6 +665,9 @@ func (m *WriteRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRemote } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRemote + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -478,7 +682,7 @@ func (m *WriteRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRemote } if (iNdEx + skippy) > l { @@ -508,7 +712,7 @@ func (m *ReadRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -536,7 +740,7 @@ func (m *ReadRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -545,6 +749,9 @@ func (m *ReadRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRemote } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRemote + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -559,7 +766,7 @@ func (m *ReadRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRemote } if (iNdEx + skippy) > l { @@ -589,7 +796,7 @@ func (m *ReadResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -617,7 +824,7 @@ func (m *ReadResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -626,6 +833,9 @@ func (m *ReadResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRemote } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRemote + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -640,7 +850,7 @@ func (m *ReadResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRemote } if (iNdEx + skippy) > l { @@ -670,7 +880,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -698,7 +908,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StartTimestampMs |= (int64(b) & 0x7F) << shift + m.StartTimestampMs |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -717,7 +927,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EndTimestampMs |= (int64(b) & 0x7F) << shift + m.EndTimestampMs |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -736,7 +946,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -745,6 +955,9 @@ func (m *Query) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRemote } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRemote + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -759,7 +972,7 @@ func (m *Query) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRemote } if (iNdEx + skippy) > l { @@ -789,7 +1002,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -817,7 +1030,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -826,6 +1039,9 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { return ErrInvalidLengthRemote } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRemote + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -840,7 +1056,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRemote } if (iNdEx + skippy) > l { @@ -858,6 +1074,7 @@ func (m *QueryResult) Unmarshal(dAtA []byte) error { func skipRemote(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -889,10 +1106,8 @@ func skipRemote(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -909,84 +1124,34 @@ func skipRemote(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthRemote } - return iNdEx, nil + iNdEx += length 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 + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRemote + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthRemote + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthRemote = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRemote = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthRemote = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRemote = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRemote = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/prompb/remote.proto", fileDescriptorRemote) -} - -var fileDescriptorRemote = []byte{ - // 363 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xc1, 0x4a, 0xeb, 0x40, - 0x14, 0x86, 0x9b, 0xdb, 0x7b, 0xdb, 0xcb, 0xb4, 0x48, 0x89, 0x9b, 0xd8, 0x45, 0x94, 0xac, 0xba, - 0xb0, 0x19, 0x30, 0x20, 0x2e, 0x44, 0xa5, 0x2e, 0xdc, 0x58, 0xc1, 0xb1, 0x20, 0xb8, 0x29, 0x49, - 0x73, 0x4c, 0x03, 0x9d, 0x4c, 0x3a, 0x73, 0xb2, 0xe8, 0x5b, 0xb8, 0xf3, 0x95, 0xba, 0xf4, 0x09, - 0x44, 0xea, 0x8b, 0x48, 0x66, 0x88, 0xa6, 0xe0, 0x46, 0x37, 0x21, 0x39, 0xff, 0xf7, 0xff, 0xfc, - 0x39, 0x33, 0xe4, 0x22, 0x49, 0x71, 0x5e, 0x44, 0xfe, 0x4c, 0x70, 0xca, 0x83, 0x38, 0xa2, 0x3c, - 0xa0, 0x4a, 0xce, 0xe8, 0xb2, 0x00, 0xb9, 0xa2, 0x09, 0x64, 0x20, 0x43, 0x84, 0x98, 0xe6, 0x52, - 0xa0, 0x28, 0x9f, 0x3c, 0x8f, 0xa8, 0x04, 0x2e, 0x10, 0x7c, 0x3d, 0xb3, 0xbb, 0x3c, 0x28, 0xc7, - 0x80, 0x73, 0x28, 0x54, 0xff, 0xfc, 0x37, 0x79, 0xb8, 0xca, 0x41, 0x99, 0xb8, 0xfe, 0xb0, 0x16, - 0x90, 0x88, 0x44, 0x18, 0x32, 0x2a, 0x1e, 0xf5, 0x97, 0xb1, 0x95, 0x6f, 0x06, 0xf7, 0x6e, 0x48, - 0xf7, 0x5e, 0xa6, 0x08, 0x0c, 0x96, 0x05, 0x28, 0xb4, 0xcf, 0x08, 0xc1, 0x94, 0x83, 0x02, 0x99, - 0x82, 0x72, 0xac, 0x83, 0xe6, 0xa0, 0x73, 0xe4, 0xf8, 0xf5, 0x8a, 0xfe, 0x24, 0xe5, 0x70, 0xa7, - 0xf5, 0xd1, 0xdf, 0xf5, 0xeb, 0x7e, 0x83, 0xd5, 0x1c, 0xde, 0x29, 0xe9, 0x30, 0x08, 0xe3, 0x2a, - 0x6e, 0x48, 0xda, 0x65, 0xf3, 0xaf, 0xac, 0xdd, 0xed, 0xac, 0xdb, 0xf2, 0xb7, 0x58, 0xc5, 0x78, - 0x97, 0xa4, 0x6b, 0xdc, 0x2a, 0x17, 0x99, 0x02, 0x3b, 0x20, 0x6d, 0x09, 0xaa, 0x58, 0x60, 0x65, - 0xdf, 0xfb, 0xce, 0xae, 0x09, 0x56, 0x91, 0xde, 0xb3, 0x45, 0xfe, 0x69, 0xc1, 0x3e, 0x24, 0xb6, - 0xc2, 0x50, 0xe2, 0x54, 0x17, 0xc4, 0x90, 0xe7, 0x53, 0x5e, 0x26, 0x59, 0x83, 0x26, 0xeb, 0x69, - 0x65, 0x52, 0x09, 0x63, 0x65, 0x0f, 0x48, 0x0f, 0xb2, 0x78, 0x9b, 0xfd, 0xa3, 0xd9, 0x1d, 0xc8, - 0xe2, 0x3a, 0x79, 0x4c, 0xfe, 0xf3, 0x10, 0x67, 0x73, 0x90, 0xca, 0x69, 0xea, 0x5e, 0xfd, 0xed, - 0x5e, 0xd7, 0x61, 0x04, 0x8b, 0xb1, 0x41, 0xd8, 0x27, 0xeb, 0x5d, 0x91, 0x4e, 0xad, 0xb1, 0x7d, - 0xf2, 0x93, 0x5d, 0xd7, 0xb7, 0x3c, 0x72, 0xd6, 0x1b, 0xd7, 0x7a, 0xd9, 0xb8, 0xd6, 0xdb, 0xc6, - 0xb5, 0x9e, 0xde, 0xdd, 0xc6, 0x43, 0xcb, 0x5c, 0x85, 0xa8, 0xa5, 0x8f, 0x35, 0xf8, 0x08, 0x00, - 0x00, 0xff, 0xff, 0x24, 0xf8, 0x63, 0xea, 0x98, 0x02, 0x00, 0x00, -} diff --git a/src/query/generated/proto/prompb/types.pb.go b/src/query/generated/proto/prompb/types.pb.go index d379b97451..73b33661e0 100644 --- a/src/query/generated/proto/prompb/types.pb.go +++ b/src/query/generated/proto/prompb/types.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/query/generated/proto/prompb/types.proto -// Copyright (c) 2023 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,20 +23,27 @@ package prompb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import binary "encoding/binary" - -import io "io" +import ( + encoding_binary "encoding/binary" + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // 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 + type MetricType int32 const ( @@ -60,6 +67,7 @@ var MetricType_name = map[int32]string{ 6: "INFO", 7: "STATESET", } + var MetricType_value = map[string]int32{ "UNKNOWN": 0, "COUNTER": 1, @@ -74,7 +82,10 @@ var MetricType_value = map[string]int32{ func (x MetricType) String() string { return proto.EnumName(MetricType_name, int32(x)) } -func (MetricType) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} } + +func (MetricType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5e74ebaec020bf72, []int{0} +} type M3Type int32 @@ -89,6 +100,7 @@ var M3Type_name = map[int32]string{ 1: "M3_COUNTER", 2: "M3_TIMER", } + var M3Type_value = map[string]int32{ "M3_GAUGE": 0, "M3_COUNTER": 1, @@ -98,7 +110,10 @@ var M3Type_value = map[string]int32{ func (x M3Type) String() string { return proto.EnumName(M3Type_name, int32(x)) } -func (M3Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} } + +func (M3Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5e74ebaec020bf72, []int{1} +} type Source int32 @@ -113,6 +128,7 @@ var Source_name = map[int32]string{ 1: "GRAPHITE", 2: "OPEN_METRICS", } + var Source_value = map[string]int32{ "PROMETHEUS": 0, "GRAPHITE": 1, @@ -122,7 +138,10 @@ var Source_value = map[string]int32{ func (x Source) String() string { return proto.EnumName(Source_name, int32(x)) } -func (Source) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{2} } + +func (Source) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5e74ebaec020bf72, []int{2} +} type LabelMatcher_Type int32 @@ -139,6 +158,7 @@ var LabelMatcher_Type_name = map[int32]string{ 2: "RE", 3: "NRE", } + var LabelMatcher_Type_value = map[string]int32{ "EQ": 0, "NEQ": 1, @@ -149,17 +169,48 @@ var LabelMatcher_Type_value = map[string]int32{ func (x LabelMatcher_Type) String() string { return proto.EnumName(LabelMatcher_Type_name, int32(x)) } -func (LabelMatcher_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{4, 0} } + +func (LabelMatcher_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5e74ebaec020bf72, []int{4, 0} +} type Sample struct { Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } -func (m *Sample) Reset() { *m = Sample{} } -func (m *Sample) String() string { return proto.CompactTextString(m) } -func (*Sample) ProtoMessage() {} -func (*Sample) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} } +func (m *Sample) Reset() { *m = Sample{} } +func (m *Sample) String() string { return proto.CompactTextString(m) } +func (*Sample) ProtoMessage() {} +func (*Sample) Descriptor() ([]byte, []int) { + return fileDescriptor_5e74ebaec020bf72, []int{0} +} +func (m *Sample) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Sample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Sample.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 *Sample) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sample.Merge(m, src) +} +func (m *Sample) XXX_Size() int { + return m.Size() +} +func (m *Sample) XXX_DiscardUnknown() { + xxx_messageInfo_Sample.DiscardUnknown(m) +} + +var xxx_messageInfo_Sample proto.InternalMessageInfo func (m *Sample) GetValue() float64 { if m != nil { @@ -176,8 +227,8 @@ func (m *Sample) GetTimestamp() int64 { } type TimeSeries struct { - Labels []Label `protobuf:"bytes,1,rep,name=labels" json:"labels"` - Samples []Sample `protobuf:"bytes,2,rep,name=samples" json:"samples"` + Labels []Label `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels"` + Samples []Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"samples"` // NB: These are custom fields that M3 uses. They start at 101 so that they // should never clash with prometheus fields. M3Type M3Type `protobuf:"varint,101,opt,name=m3_type,json=m3Type,proto3,enum=m3prometheus.M3Type" json:"m3_type,omitempty"` @@ -185,10 +236,38 @@ type TimeSeries struct { Type MetricType `protobuf:"varint,1001,opt,name=type,proto3,enum=m3prometheus.MetricType" json:"type,omitempty"` } -func (m *TimeSeries) Reset() { *m = TimeSeries{} } -func (m *TimeSeries) String() string { return proto.CompactTextString(m) } -func (*TimeSeries) ProtoMessage() {} -func (*TimeSeries) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} } +func (m *TimeSeries) Reset() { *m = TimeSeries{} } +func (m *TimeSeries) String() string { return proto.CompactTextString(m) } +func (*TimeSeries) ProtoMessage() {} +func (*TimeSeries) Descriptor() ([]byte, []int) { + return fileDescriptor_5e74ebaec020bf72, []int{1} +} +func (m *TimeSeries) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TimeSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TimeSeries.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 *TimeSeries) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimeSeries.Merge(m, src) +} +func (m *TimeSeries) XXX_Size() int { + return m.Size() +} +func (m *TimeSeries) XXX_DiscardUnknown() { + xxx_messageInfo_TimeSeries.DiscardUnknown(m) +} + +var xxx_messageInfo_TimeSeries proto.InternalMessageInfo func (m *TimeSeries) GetLabels() []Label { if m != nil { @@ -230,10 +309,38 @@ type Label struct { Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *Label) Reset() { *m = Label{} } -func (m *Label) String() string { return proto.CompactTextString(m) } -func (*Label) ProtoMessage() {} -func (*Label) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{2} } +func (m *Label) Reset() { *m = Label{} } +func (m *Label) String() string { return proto.CompactTextString(m) } +func (*Label) ProtoMessage() {} +func (*Label) Descriptor() ([]byte, []int) { + return fileDescriptor_5e74ebaec020bf72, []int{2} +} +func (m *Label) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Label) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Label.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 *Label) XXX_Merge(src proto.Message) { + xxx_messageInfo_Label.Merge(m, src) +} +func (m *Label) XXX_Size() int { + return m.Size() +} +func (m *Label) XXX_DiscardUnknown() { + xxx_messageInfo_Label.DiscardUnknown(m) +} + +var xxx_messageInfo_Label proto.InternalMessageInfo func (m *Label) GetName() []byte { if m != nil { @@ -250,13 +357,41 @@ func (m *Label) GetValue() []byte { } type Labels struct { - Labels []Label `protobuf:"bytes,1,rep,name=labels" json:"labels"` + Labels []Label `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels"` +} + +func (m *Labels) Reset() { *m = Labels{} } +func (m *Labels) String() string { return proto.CompactTextString(m) } +func (*Labels) ProtoMessage() {} +func (*Labels) Descriptor() ([]byte, []int) { + return fileDescriptor_5e74ebaec020bf72, []int{3} +} +func (m *Labels) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Labels) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Labels.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 *Labels) XXX_Merge(src proto.Message) { + xxx_messageInfo_Labels.Merge(m, src) +} +func (m *Labels) XXX_Size() int { + return m.Size() +} +func (m *Labels) XXX_DiscardUnknown() { + xxx_messageInfo_Labels.DiscardUnknown(m) } -func (m *Labels) Reset() { *m = Labels{} } -func (m *Labels) String() string { return proto.CompactTextString(m) } -func (*Labels) ProtoMessage() {} -func (*Labels) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{3} } +var xxx_messageInfo_Labels proto.InternalMessageInfo func (m *Labels) GetLabels() []Label { if m != nil { @@ -272,10 +407,38 @@ type LabelMatcher struct { Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` } -func (m *LabelMatcher) Reset() { *m = LabelMatcher{} } -func (m *LabelMatcher) String() string { return proto.CompactTextString(m) } -func (*LabelMatcher) ProtoMessage() {} -func (*LabelMatcher) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{4} } +func (m *LabelMatcher) Reset() { *m = LabelMatcher{} } +func (m *LabelMatcher) String() string { return proto.CompactTextString(m) } +func (*LabelMatcher) ProtoMessage() {} +func (*LabelMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_5e74ebaec020bf72, []int{4} +} +func (m *LabelMatcher) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LabelMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LabelMatcher.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 *LabelMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_LabelMatcher.Merge(m, src) +} +func (m *LabelMatcher) XXX_Size() int { + return m.Size() +} +func (m *LabelMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_LabelMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_LabelMatcher proto.InternalMessageInfo func (m *LabelMatcher) GetType() LabelMatcher_Type { if m != nil { @@ -299,20 +462,66 @@ func (m *LabelMatcher) GetValue() []byte { } func init() { + proto.RegisterEnum("m3prometheus.MetricType", MetricType_name, MetricType_value) + proto.RegisterEnum("m3prometheus.M3Type", M3Type_name, M3Type_value) + proto.RegisterEnum("m3prometheus.Source", Source_name, Source_value) + proto.RegisterEnum("m3prometheus.LabelMatcher_Type", LabelMatcher_Type_name, LabelMatcher_Type_value) proto.RegisterType((*Sample)(nil), "m3prometheus.Sample") proto.RegisterType((*TimeSeries)(nil), "m3prometheus.TimeSeries") proto.RegisterType((*Label)(nil), "m3prometheus.Label") proto.RegisterType((*Labels)(nil), "m3prometheus.Labels") proto.RegisterType((*LabelMatcher)(nil), "m3prometheus.LabelMatcher") - proto.RegisterEnum("m3prometheus.MetricType", MetricType_name, MetricType_value) - proto.RegisterEnum("m3prometheus.M3Type", M3Type_name, M3Type_value) - proto.RegisterEnum("m3prometheus.Source", Source_name, Source_value) - proto.RegisterEnum("m3prometheus.LabelMatcher_Type", LabelMatcher_Type_name, LabelMatcher_Type_value) } + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/prompb/types.proto", fileDescriptor_5e74ebaec020bf72) +} + +var fileDescriptor_5e74ebaec020bf72 = []byte{ + // 591 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcf, 0x6f, 0xd3, 0x30, + 0x18, 0x8d, 0xd3, 0x36, 0xdd, 0xbe, 0x95, 0x61, 0x79, 0x3b, 0x44, 0x08, 0x75, 0x55, 0x4f, 0xd5, + 0xc4, 0x1a, 0x8d, 0xec, 0x80, 0x04, 0x12, 0xea, 0x26, 0xd3, 0x55, 0x2c, 0xe9, 0xe6, 0x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c8, 0x7f, 0xeb, 0x0f, 0xdf, 0xf9, + 0xd8, 0x90, 0xc5, 0xc1, 0x70, 0xe4, 0x87, 0x94, 0x61, 0x44, 0x56, 0xa1, 0xd6, 0xef, 0x8d, 0xfa, + 0x52, 0xfb, 0x08, 0x56, 0x0f, 0x07, 0x41, 0x38, 0xec, 0xb3, 0x9e, 0x87, 0x2b, 0x64, 0x03, 0x1e, + 0xab, 0xce, 0xb8, 0x04, 0xab, 0x52, 0x1b, 0x8c, 0x3c, 0xaf, 0xc7, 0xde, 0xe3, 0x1a, 0x59, 0x81, + 0xea, 0xc0, 0x7f, 0x33, 0xc4, 0x16, 0x69, 0xc0, 0x4a, 0x10, 0xf6, 0x42, 0x1a, 0xd0, 0x10, 0xd7, + 0xb7, 0xf7, 0xc0, 0xd2, 0x97, 0x2e, 0x71, 0xcf, 0x1d, 0xeb, 0x0d, 0x0c, 0xb2, 0x0e, 0xe0, 0xb9, + 0xe3, 0x72, 0x6f, 0xdd, 0x0d, 0x07, 0x1e, 0x65, 0xd8, 0xdc, 0x7e, 0x01, 0x96, 0xbe, 0x7c, 0xc9, + 0x3b, 0x66, 0x43, 0x8f, 0x86, 0x87, 0x74, 0x14, 0x60, 0x43, 0xf2, 0xfa, 0xac, 0x77, 0x7c, 0x38, + 0x08, 0x29, 0x46, 0x04, 0x43, 0x63, 0x78, 0x4c, 0xfd, 0xb1, 0x47, 0x43, 0x36, 0x38, 0x08, 0xb0, + 0xb9, 0xdf, 0xba, 0xba, 0x69, 0xa2, 0xeb, 0x9b, 0x26, 0xfa, 0x79, 0xd3, 0x44, 0x5f, 0x6f, 0x9b, + 0xc6, 0xf5, 0x6d, 0xd3, 0xf8, 0x7e, 0xdb, 0x34, 0x3e, 0x58, 0xfa, 0x89, 0x4e, 0x2c, 0xf5, 0xc0, + 0xdc, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xca, 0x0a, 0x18, 0xae, 0xe0, 0x03, 0x00, 0x00, +} + func (m *Sample) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -320,28 +529,33 @@ func (m *Sample) Marshal() (dAtA []byte, err error) { } func (m *Sample) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Value != 0 { - dAtA[i] = 0x9 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i += 8 - } if m.Timestamp != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x10 } - return i, nil + if m.Value != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil } func (m *TimeSeries) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -349,62 +563,71 @@ func (m *TimeSeries) Marshal() (dAtA []byte, err error) { } func (m *TimeSeries) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TimeSeries) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Labels) > 0 { - for _, msg := range m.Labels { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.Type != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x3e + i-- + dAtA[i] = 0xc8 } - if len(m.Samples) > 0 { - for _, msg := range m.Samples { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.Source != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Source)) + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0xb0 } if m.M3Type != 0 { - dAtA[i] = 0xa8 - i++ - dAtA[i] = 0x6 - i++ i = encodeVarintTypes(dAtA, i, uint64(m.M3Type)) - } - if m.Source != 0 { - dAtA[i] = 0xb0 - i++ + i-- dAtA[i] = 0x6 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Source)) + i-- + dAtA[i] = 0xa8 } - if m.Type != 0 { - dAtA[i] = 0xc8 - i++ - dAtA[i] = 0x3e - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Type)) + if len(m.Samples) > 0 { + for iNdEx := len(m.Samples) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Samples[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - return i, nil + if len(m.Labels) > 0 { + for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Labels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } func (m *Label) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -412,29 +635,36 @@ func (m *Label) Marshal() (dAtA []byte, err error) { } func (m *Label) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Label) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Value) + copy(dAtA[i:], m.Value) i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Labels) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -442,29 +672,36 @@ func (m *Labels) Marshal() (dAtA []byte, err error) { } func (m *Labels) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Labels) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Labels) > 0 { - for _, msg := range m.Labels { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Labels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *LabelMatcher) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -472,40 +709,52 @@ func (m *LabelMatcher) Marshal() (dAtA []byte, err error) { } func (m *LabelMatcher) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LabelMatcher) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Type)) + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x1a } if len(m.Name) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Name) + copy(dAtA[i:], m.Name) i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + i-- + dAtA[i] = 0x12 } - if len(m.Value) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) + if m.Type != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Sample) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Value != 0 { @@ -518,6 +767,9 @@ func (m *Sample) Size() (n int) { } func (m *TimeSeries) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Labels) > 0 { @@ -545,6 +797,9 @@ func (m *TimeSeries) Size() (n int) { } func (m *Label) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -559,6 +814,9 @@ func (m *Label) Size() (n int) { } func (m *Labels) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Labels) > 0 { @@ -571,6 +829,9 @@ func (m *Labels) Size() (n int) { } func (m *LabelMatcher) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -588,14 +849,7 @@ func (m *LabelMatcher) Size() (n int) { } func sovTypes(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTypes(x uint64) (n int) { return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -615,7 +869,7 @@ func (m *Sample) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -637,7 +891,7 @@ func (m *Sample) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.Value = float64(math.Float64frombits(v)) case 2: @@ -654,7 +908,7 @@ func (m *Sample) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Timestamp |= (int64(b) & 0x7F) << shift + m.Timestamp |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -665,7 +919,7 @@ func (m *Sample) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -695,7 +949,7 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -723,7 +977,7 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -732,6 +986,9 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -754,7 +1011,7 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -763,6 +1020,9 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -785,7 +1045,7 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.M3Type |= (M3Type(b) & 0x7F) << shift + m.M3Type |= M3Type(b&0x7F) << shift if b < 0x80 { break } @@ -804,7 +1064,7 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Source |= (Source(b) & 0x7F) << shift + m.Source |= Source(b&0x7F) << shift if b < 0x80 { break } @@ -823,7 +1083,7 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (MetricType(b) & 0x7F) << shift + m.Type |= MetricType(b&0x7F) << shift if b < 0x80 { break } @@ -834,7 +1094,7 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -864,7 +1124,7 @@ func (m *Label) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -892,7 +1152,7 @@ func (m *Label) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -901,6 +1161,9 @@ func (m *Label) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -923,7 +1186,7 @@ func (m *Label) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -932,6 +1195,9 @@ func (m *Label) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -946,7 +1212,7 @@ func (m *Label) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -976,7 +1242,7 @@ func (m *Labels) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1004,7 +1270,7 @@ func (m *Labels) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1013,6 +1279,9 @@ func (m *Labels) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1027,7 +1296,7 @@ func (m *Labels) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -1057,7 +1326,7 @@ func (m *LabelMatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1085,7 +1354,7 @@ func (m *LabelMatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (LabelMatcher_Type(b) & 0x7F) << shift + m.Type |= LabelMatcher_Type(b&0x7F) << shift if b < 0x80 { break } @@ -1104,7 +1373,7 @@ func (m *LabelMatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1113,6 +1382,9 @@ func (m *LabelMatcher) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1135,7 +1407,7 @@ func (m *LabelMatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1144,6 +1416,9 @@ func (m *LabelMatcher) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1158,7 +1433,7 @@ func (m *LabelMatcher) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -1176,6 +1451,7 @@ func (m *LabelMatcher) Unmarshal(dAtA []byte) error { func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1207,10 +1483,8 @@ func skipTypes(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1227,98 +1501,34 @@ func skipTypes(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthTypes } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - 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 := skipTypes(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/prompb/types.proto", fileDescriptorTypes) -} - -var fileDescriptorTypes = []byte{ - // 584 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94,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x7d, 0xfe, 0xd1, - 0xa9, 0xbd, 0x33, 0xf5, 0xd3, 0x8c, 0x4d, 0xf5, 0xb0, 0x9c, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x08, 0xf9, 0x5a, 0x0c, 0xd8, 0x03, 0x00, 0x00, -} diff --git a/src/query/generated/proto/rpcpb/query.pb.go b/src/query/generated/proto/rpcpb/query.pb.go index 6b9805963a..a070439119 100644 --- a/src/query/generated/proto/rpcpb/query.pb.go +++ b/src/query/generated/proto/rpcpb/query.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/query/generated/proto/rpcpb/query.proto -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,60 +21,21 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package rpcpb is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/query/generated/proto/rpcpb/query.proto - - It has these top-level messages: - HealthRequest - HealthResponse - FetchRequest - TagMatchers - TagMatcher - FetchOptions - RestrictQueryOptions - RestrictQueryType - RestrictQueryTags - FetchResponse - Series - SeriesMetadata - DecompressedSeries - Datapoint - Tag - M3CompressedSeries - M3CompressedValuesReplica - M3Segments - M3Segment - SearchRequest - M3TagProperty - M3TagProperties - TagProperty - TagProperties - SearchResponse - CompleteTagsRequestOptions - CompleteTagsRequest - TagNames - TagValue - TagValues - CompleteTagsResponse - ResultMetadata - Warning -*/ package rpcpb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import policypb "github.com/m3db/m3/src/metrics/generated/proto/policypb" - -import context "golang.org/x/net/context" -import grpc "google.golang.org/grpc" - -import binary "encoding/binary" - -import io "io" +import ( + context "context" + encoding_binary "encoding/binary" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + policypb "github.com/m3db/m3/src/metrics/generated/proto/policypb" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -85,7 +46,7 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MatcherType int32 @@ -112,6 +73,7 @@ var MatcherType_name = map[int32]string{ 5: "NOTEXISTS", 6: "ALL", } + var MatcherType_value = map[string]int32{ "EQUAL": 0, "NOTEQUAL": 1, @@ -125,7 +87,10 @@ var MatcherType_value = map[string]int32{ func (x MatcherType) String() string { return proto.EnumName(MatcherType_name, int32(x)) } -func (MatcherType) EnumDescriptor() ([]byte, []int) { return fileDescriptorQuery, []int{0} } + +func (MatcherType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{0} +} type MetricsType int32 @@ -140,6 +105,7 @@ var MetricsType_name = map[int32]string{ 1: "UNAGGREGATED_METRICS_TYPE", 2: "AGGREGATED_METRICS_TYPE", } + var MetricsType_value = map[string]int32{ "UNKNOWN_METRICS_TYPE": 0, "UNAGGREGATED_METRICS_TYPE": 1, @@ -149,7 +115,10 @@ var MetricsType_value = map[string]int32{ func (x MetricsType) String() string { return proto.EnumName(MetricsType_name, int32(x)) } -func (MetricsType) EnumDescriptor() ([]byte, []int) { return fileDescriptorQuery, []int{1} } + +func (MetricsType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{1} +} type FanoutOption int32 @@ -164,6 +133,7 @@ var FanoutOption_name = map[int32]string{ 1: "FORCE_ENABLED", 2: "FORCE_DISABLED", } + var FanoutOption_value = map[string]int32{ "DEFAULT_OPTION": 0, "FORCE_ENABLED": 1, @@ -173,7 +143,10 @@ var FanoutOption_value = map[string]int32{ func (x FanoutOption) String() string { return proto.EnumName(FanoutOption_name, int32(x)) } -func (FanoutOption) EnumDescriptor() ([]byte, []int) { return fileDescriptorQuery, []int{2} } + +func (FanoutOption) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{2} +} type CompleteTagsType int32 @@ -188,6 +161,7 @@ var CompleteTagsType_name = map[int32]string{ 0: "DEFAULT", 1: "TAGNAME", } + var CompleteTagsType_value = map[string]int32{ "DEFAULT": 0, "TAGNAME": 1, @@ -196,25 +170,84 @@ var CompleteTagsType_value = map[string]int32{ func (x CompleteTagsType) String() string { return proto.EnumName(CompleteTagsType_name, int32(x)) } -func (CompleteTagsType) EnumDescriptor() ([]byte, []int) { return fileDescriptorQuery, []int{3} } + +func (CompleteTagsType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{3} +} type HealthRequest struct { } -func (m *HealthRequest) Reset() { *m = HealthRequest{} } -func (m *HealthRequest) String() string { return proto.CompactTextString(m) } -func (*HealthRequest) ProtoMessage() {} -func (*HealthRequest) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{0} } +func (m *HealthRequest) Reset() { *m = HealthRequest{} } +func (m *HealthRequest) String() string { return proto.CompactTextString(m) } +func (*HealthRequest) ProtoMessage() {} +func (*HealthRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{0} +} +func (m *HealthRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HealthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HealthRequest.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 *HealthRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealthRequest.Merge(m, src) +} +func (m *HealthRequest) XXX_Size() int { + return m.Size() +} +func (m *HealthRequest) XXX_DiscardUnknown() { + xxx_messageInfo_HealthRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_HealthRequest proto.InternalMessageInfo type HealthResponse struct { UptimeDuration string `protobuf:"bytes,1,opt,name=uptimeDuration,proto3" json:"uptimeDuration,omitempty"` UptimeNanoseconds int64 `protobuf:"varint,2,opt,name=uptimeNanoseconds,proto3" json:"uptimeNanoseconds,omitempty"` } -func (m *HealthResponse) Reset() { *m = HealthResponse{} } -func (m *HealthResponse) String() string { return proto.CompactTextString(m) } -func (*HealthResponse) ProtoMessage() {} -func (*HealthResponse) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{1} } +func (m *HealthResponse) Reset() { *m = HealthResponse{} } +func (m *HealthResponse) String() string { return proto.CompactTextString(m) } +func (*HealthResponse) ProtoMessage() {} +func (*HealthResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{1} +} +func (m *HealthResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HealthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HealthResponse.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 *HealthResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealthResponse.Merge(m, src) +} +func (m *HealthResponse) XXX_Size() int { + return m.Size() +} +func (m *HealthResponse) XXX_DiscardUnknown() { + xxx_messageInfo_HealthResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_HealthResponse proto.InternalMessageInfo func (m *HealthResponse) GetUptimeDuration() string { if m != nil { @@ -236,13 +269,41 @@ type FetchRequest struct { // Types that are valid to be assigned to Matchers: // *FetchRequest_TagMatchers Matchers isFetchRequest_Matchers `protobuf_oneof:"matchers"` - Options *FetchOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"` + Options *FetchOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"` +} + +func (m *FetchRequest) Reset() { *m = FetchRequest{} } +func (m *FetchRequest) String() string { return proto.CompactTextString(m) } +func (*FetchRequest) ProtoMessage() {} +func (*FetchRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{2} +} +func (m *FetchRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FetchRequest.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 *FetchRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FetchRequest.Merge(m, src) +} +func (m *FetchRequest) XXX_Size() int { + return m.Size() +} +func (m *FetchRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FetchRequest.DiscardUnknown(m) } -func (m *FetchRequest) Reset() { *m = FetchRequest{} } -func (m *FetchRequest) String() string { return proto.CompactTextString(m) } -func (*FetchRequest) ProtoMessage() {} -func (*FetchRequest) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{2} } +var xxx_messageInfo_FetchRequest proto.InternalMessageInfo type isFetchRequest_Matchers interface { isFetchRequest_Matchers() @@ -251,7 +312,7 @@ type isFetchRequest_Matchers interface { } type FetchRequest_TagMatchers struct { - TagMatchers *TagMatchers `protobuf:"bytes,3,opt,name=tagMatchers,oneof"` + TagMatchers *TagMatchers `protobuf:"bytes,3,opt,name=tagMatchers,proto3,oneof" json:"tagMatchers,omitempty"` } func (*FetchRequest_TagMatchers) isFetchRequest_Matchers() {} @@ -291,69 +352,49 @@ func (m *FetchRequest) GetOptions() *FetchOptions { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*FetchRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _FetchRequest_OneofMarshaler, _FetchRequest_OneofUnmarshaler, _FetchRequest_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*FetchRequest) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*FetchRequest_TagMatchers)(nil), } } -func _FetchRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*FetchRequest) - // matchers - switch x := m.Matchers.(type) { - case *FetchRequest_TagMatchers: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TagMatchers); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("FetchRequest.Matchers has unexpected type %T", x) - } - return nil +type TagMatchers struct { + TagMatchers []*TagMatcher `protobuf:"bytes,1,rep,name=tagMatchers,proto3" json:"tagMatchers,omitempty"` } -func _FetchRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*FetchRequest) - switch tag { - case 3: // matchers.tagMatchers - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType +func (m *TagMatchers) Reset() { *m = TagMatchers{} } +func (m *TagMatchers) String() string { return proto.CompactTextString(m) } +func (*TagMatchers) ProtoMessage() {} +func (*TagMatchers) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{3} +} +func (m *TagMatchers) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TagMatchers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TagMatchers.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } - msg := new(TagMatchers) - err := b.DecodeMessage(msg) - m.Matchers = &FetchRequest_TagMatchers{msg} - return true, err - default: - return false, nil + return b[:n], nil } } - -func _FetchRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*FetchRequest) - // matchers - switch x := m.Matchers.(type) { - case *FetchRequest_TagMatchers: - s := proto.Size(x.TagMatchers) - n += proto.SizeVarint(3<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n +func (m *TagMatchers) XXX_Merge(src proto.Message) { + xxx_messageInfo_TagMatchers.Merge(m, src) } - -type TagMatchers struct { - TagMatchers []*TagMatcher `protobuf:"bytes,1,rep,name=tagMatchers" json:"tagMatchers,omitempty"` +func (m *TagMatchers) XXX_Size() int { + return m.Size() +} +func (m *TagMatchers) XXX_DiscardUnknown() { + xxx_messageInfo_TagMatchers.DiscardUnknown(m) } -func (m *TagMatchers) Reset() { *m = TagMatchers{} } -func (m *TagMatchers) String() string { return proto.CompactTextString(m) } -func (*TagMatchers) ProtoMessage() {} -func (*TagMatchers) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{3} } +var xxx_messageInfo_TagMatchers proto.InternalMessageInfo func (m *TagMatchers) GetTagMatchers() []*TagMatcher { if m != nil { @@ -368,10 +409,38 @@ type TagMatcher struct { Type MatcherType `protobuf:"varint,3,opt,name=type,proto3,enum=rpc.MatcherType" json:"type,omitempty"` } -func (m *TagMatcher) Reset() { *m = TagMatcher{} } -func (m *TagMatcher) String() string { return proto.CompactTextString(m) } -func (*TagMatcher) ProtoMessage() {} -func (*TagMatcher) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{4} } +func (m *TagMatcher) Reset() { *m = TagMatcher{} } +func (m *TagMatcher) String() string { return proto.CompactTextString(m) } +func (*TagMatcher) ProtoMessage() {} +func (*TagMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{4} +} +func (m *TagMatcher) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TagMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TagMatcher.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 *TagMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_TagMatcher.Merge(m, src) +} +func (m *TagMatcher) XXX_Size() int { + return m.Size() +} +func (m *TagMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_TagMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_TagMatcher proto.InternalMessageInfo func (m *TagMatcher) GetName() []byte { if m != nil { @@ -396,20 +465,48 @@ func (m *TagMatcher) GetType() MatcherType { type FetchOptions struct { Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` - Restrict *RestrictQueryOptions `protobuf:"bytes,2,opt,name=restrict" json:"restrict,omitempty"` + Restrict *RestrictQueryOptions `protobuf:"bytes,2,opt,name=restrict,proto3" json:"restrict,omitempty"` LookbackDuration int64 `protobuf:"varint,3,opt,name=lookbackDuration,proto3" json:"lookbackDuration,omitempty"` Unaggregated FanoutOption `protobuf:"varint,4,opt,name=unaggregated,proto3,enum=rpc.FanoutOption" json:"unaggregated,omitempty"` Aggregated FanoutOption `protobuf:"varint,5,opt,name=aggregated,proto3,enum=rpc.FanoutOption" json:"aggregated,omitempty"` AggregatedOptimized FanoutOption `protobuf:"varint,6,opt,name=aggregatedOptimized,proto3,enum=rpc.FanoutOption" json:"aggregatedOptimized,omitempty"` // Deprecated: all requests will include resolution. - IncludeResolution bool `protobuf:"varint,7,opt,name=includeResolution,proto3" json:"includeResolution,omitempty"` + IncludeResolution bool `protobuf:"varint,7,opt,name=includeResolution,proto3" json:"includeResolution,omitempty"` // Deprecated: Do not use. Source []byte `protobuf:"bytes,8,opt,name=source,proto3" json:"source,omitempty"` } -func (m *FetchOptions) Reset() { *m = FetchOptions{} } -func (m *FetchOptions) String() string { return proto.CompactTextString(m) } -func (*FetchOptions) ProtoMessage() {} -func (*FetchOptions) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{5} } +func (m *FetchOptions) Reset() { *m = FetchOptions{} } +func (m *FetchOptions) String() string { return proto.CompactTextString(m) } +func (*FetchOptions) ProtoMessage() {} +func (*FetchOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{5} +} +func (m *FetchOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FetchOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FetchOptions.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 *FetchOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_FetchOptions.Merge(m, src) +} +func (m *FetchOptions) XXX_Size() int { + return m.Size() +} +func (m *FetchOptions) XXX_DiscardUnknown() { + xxx_messageInfo_FetchOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_FetchOptions proto.InternalMessageInfo func (m *FetchOptions) GetLimit() int64 { if m != nil { @@ -453,6 +550,7 @@ func (m *FetchOptions) GetAggregatedOptimized() FanoutOption { return FanoutOption_DEFAULT_OPTION } +// Deprecated: Do not use. func (m *FetchOptions) GetIncludeResolution() bool { if m != nil { return m.IncludeResolution @@ -468,14 +566,42 @@ func (m *FetchOptions) GetSource() []byte { } type RestrictQueryOptions struct { - RestrictQueryType *RestrictQueryType `protobuf:"bytes,3,opt,name=restrictQueryType" json:"restrictQueryType,omitempty"` - RestrictQueryTags *RestrictQueryTags `protobuf:"bytes,4,opt,name=restrictQueryTags" json:"restrictQueryTags,omitempty"` + RestrictQueryType *RestrictQueryType `protobuf:"bytes,3,opt,name=restrictQueryType,proto3" json:"restrictQueryType,omitempty"` + RestrictQueryTags *RestrictQueryTags `protobuf:"bytes,4,opt,name=restrictQueryTags,proto3" json:"restrictQueryTags,omitempty"` +} + +func (m *RestrictQueryOptions) Reset() { *m = RestrictQueryOptions{} } +func (m *RestrictQueryOptions) String() string { return proto.CompactTextString(m) } +func (*RestrictQueryOptions) ProtoMessage() {} +func (*RestrictQueryOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{6} +} +func (m *RestrictQueryOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RestrictQueryOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RestrictQueryOptions.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 *RestrictQueryOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_RestrictQueryOptions.Merge(m, src) +} +func (m *RestrictQueryOptions) XXX_Size() int { + return m.Size() +} +func (m *RestrictQueryOptions) XXX_DiscardUnknown() { + xxx_messageInfo_RestrictQueryOptions.DiscardUnknown(m) } -func (m *RestrictQueryOptions) Reset() { *m = RestrictQueryOptions{} } -func (m *RestrictQueryOptions) String() string { return proto.CompactTextString(m) } -func (*RestrictQueryOptions) ProtoMessage() {} -func (*RestrictQueryOptions) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{6} } +var xxx_messageInfo_RestrictQueryOptions proto.InternalMessageInfo func (m *RestrictQueryOptions) GetRestrictQueryType() *RestrictQueryType { if m != nil { @@ -493,13 +619,41 @@ func (m *RestrictQueryOptions) GetRestrictQueryTags() *RestrictQueryTags { type RestrictQueryType struct { MetricsType MetricsType `protobuf:"varint,1,opt,name=metricsType,proto3,enum=rpc.MetricsType" json:"metricsType,omitempty"` - MetricsStoragePolicy *policypb.StoragePolicy `protobuf:"bytes,2,opt,name=metricsStoragePolicy" json:"metricsStoragePolicy,omitempty"` + MetricsStoragePolicy *policypb.StoragePolicy `protobuf:"bytes,2,opt,name=metricsStoragePolicy,proto3" json:"metricsStoragePolicy,omitempty"` +} + +func (m *RestrictQueryType) Reset() { *m = RestrictQueryType{} } +func (m *RestrictQueryType) String() string { return proto.CompactTextString(m) } +func (*RestrictQueryType) ProtoMessage() {} +func (*RestrictQueryType) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{7} +} +func (m *RestrictQueryType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RestrictQueryType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RestrictQueryType.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 *RestrictQueryType) XXX_Merge(src proto.Message) { + xxx_messageInfo_RestrictQueryType.Merge(m, src) +} +func (m *RestrictQueryType) XXX_Size() int { + return m.Size() +} +func (m *RestrictQueryType) XXX_DiscardUnknown() { + xxx_messageInfo_RestrictQueryType.DiscardUnknown(m) } -func (m *RestrictQueryType) Reset() { *m = RestrictQueryType{} } -func (m *RestrictQueryType) String() string { return proto.CompactTextString(m) } -func (*RestrictQueryType) ProtoMessage() {} -func (*RestrictQueryType) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{7} } +var xxx_messageInfo_RestrictQueryType proto.InternalMessageInfo func (m *RestrictQueryType) GetMetricsType() MetricsType { if m != nil { @@ -516,14 +670,42 @@ func (m *RestrictQueryType) GetMetricsStoragePolicy() *policypb.StoragePolicy { } type RestrictQueryTags struct { - Restrict *TagMatchers `protobuf:"bytes,1,opt,name=restrict" json:"restrict,omitempty"` - Strip [][]byte `protobuf:"bytes,2,rep,name=strip" json:"strip,omitempty"` + Restrict *TagMatchers `protobuf:"bytes,1,opt,name=restrict,proto3" json:"restrict,omitempty"` + Strip [][]byte `protobuf:"bytes,2,rep,name=strip,proto3" json:"strip,omitempty"` +} + +func (m *RestrictQueryTags) Reset() { *m = RestrictQueryTags{} } +func (m *RestrictQueryTags) String() string { return proto.CompactTextString(m) } +func (*RestrictQueryTags) ProtoMessage() {} +func (*RestrictQueryTags) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{8} +} +func (m *RestrictQueryTags) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RestrictQueryTags) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RestrictQueryTags.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 *RestrictQueryTags) XXX_Merge(src proto.Message) { + xxx_messageInfo_RestrictQueryTags.Merge(m, src) +} +func (m *RestrictQueryTags) XXX_Size() int { + return m.Size() +} +func (m *RestrictQueryTags) XXX_DiscardUnknown() { + xxx_messageInfo_RestrictQueryTags.DiscardUnknown(m) } -func (m *RestrictQueryTags) Reset() { *m = RestrictQueryTags{} } -func (m *RestrictQueryTags) String() string { return proto.CompactTextString(m) } -func (*RestrictQueryTags) ProtoMessage() {} -func (*RestrictQueryTags) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{8} } +var xxx_messageInfo_RestrictQueryTags proto.InternalMessageInfo func (m *RestrictQueryTags) GetRestrict() *TagMatchers { if m != nil { @@ -540,14 +722,42 @@ func (m *RestrictQueryTags) GetStrip() [][]byte { } type FetchResponse struct { - Series []*Series `protobuf:"bytes,1,rep,name=series" json:"series,omitempty"` - Meta *ResultMetadata `protobuf:"bytes,2,opt,name=meta" json:"meta,omitempty"` + Series []*Series `protobuf:"bytes,1,rep,name=series,proto3" json:"series,omitempty"` + Meta *ResultMetadata `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` +} + +func (m *FetchResponse) Reset() { *m = FetchResponse{} } +func (m *FetchResponse) String() string { return proto.CompactTextString(m) } +func (*FetchResponse) ProtoMessage() {} +func (*FetchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{9} +} +func (m *FetchResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FetchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FetchResponse.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 *FetchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_FetchResponse.Merge(m, src) +} +func (m *FetchResponse) XXX_Size() int { + return m.Size() +} +func (m *FetchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_FetchResponse.DiscardUnknown(m) } -func (m *FetchResponse) Reset() { *m = FetchResponse{} } -func (m *FetchResponse) String() string { return proto.CompactTextString(m) } -func (*FetchResponse) ProtoMessage() {} -func (*FetchResponse) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{9} } +var xxx_messageInfo_FetchResponse proto.InternalMessageInfo func (m *FetchResponse) GetSeries() []*Series { if m != nil { @@ -564,17 +774,46 @@ func (m *FetchResponse) GetMeta() *ResultMetadata { } type Series struct { - Meta *SeriesMetadata `protobuf:"bytes,1,opt,name=meta" json:"meta,omitempty"` + Meta *SeriesMetadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` // Types that are valid to be assigned to Value: + // // *Series_Decompressed // *Series_Compressed Value isSeries_Value `protobuf_oneof:"value"` } -func (m *Series) Reset() { *m = Series{} } -func (m *Series) String() string { return proto.CompactTextString(m) } -func (*Series) ProtoMessage() {} -func (*Series) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{10} } +func (m *Series) Reset() { *m = Series{} } +func (m *Series) String() string { return proto.CompactTextString(m) } +func (*Series) ProtoMessage() {} +func (*Series) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{10} +} +func (m *Series) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Series) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Series.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 *Series) XXX_Merge(src proto.Message) { + xxx_messageInfo_Series.Merge(m, src) +} +func (m *Series) XXX_Size() int { + return m.Size() +} +func (m *Series) XXX_DiscardUnknown() { + xxx_messageInfo_Series.DiscardUnknown(m) +} + +var xxx_messageInfo_Series proto.InternalMessageInfo type isSeries_Value interface { isSeries_Value() @@ -583,10 +822,10 @@ type isSeries_Value interface { } type Series_Decompressed struct { - Decompressed *DecompressedSeries `protobuf:"bytes,2,opt,name=decompressed,oneof"` + Decompressed *DecompressedSeries `protobuf:"bytes,2,opt,name=decompressed,proto3,oneof" json:"decompressed,omitempty"` } type Series_Compressed struct { - Compressed *M3CompressedSeries `protobuf:"bytes,3,opt,name=compressed,oneof"` + Compressed *M3CompressedSeries `protobuf:"bytes,3,opt,name=compressed,proto3,oneof" json:"compressed,omitempty"` } func (*Series_Decompressed) isSeries_Value() {} @@ -620,90 +859,52 @@ func (m *Series) GetCompressed() *M3CompressedSeries { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Series) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Series_OneofMarshaler, _Series_OneofUnmarshaler, _Series_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Series) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*Series_Decompressed)(nil), (*Series_Compressed)(nil), } } -func _Series_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Series) - // value - switch x := m.Value.(type) { - case *Series_Decompressed: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Decompressed); err != nil { - return err - } - case *Series_Compressed: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Compressed); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Series.Value has unexpected type %T", x) - } - return nil -} - -func _Series_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Series) - switch tag { - case 2: // value.decompressed - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(DecompressedSeries) - err := b.DecodeMessage(msg) - m.Value = &Series_Decompressed{msg} - return true, err - case 3: // value.compressed - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(M3CompressedSeries) - err := b.DecodeMessage(msg) - m.Value = &Series_Compressed{msg} - return true, err - default: - return false, nil - } -} - -func _Series_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Series) - // value - switch x := m.Value.(type) { - case *Series_Decompressed: - s := proto.Size(x.Decompressed) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Series_Compressed: - s := proto.Size(x.Compressed) - n += proto.SizeVarint(3<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type SeriesMetadata struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` StartTime int64 `protobuf:"varint,2,opt,name=startTime,proto3" json:"startTime,omitempty"` EndTime int64 `protobuf:"varint,3,opt,name=endTime,proto3" json:"endTime,omitempty"` } -func (m *SeriesMetadata) Reset() { *m = SeriesMetadata{} } -func (m *SeriesMetadata) String() string { return proto.CompactTextString(m) } -func (*SeriesMetadata) ProtoMessage() {} -func (*SeriesMetadata) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{11} } +func (m *SeriesMetadata) Reset() { *m = SeriesMetadata{} } +func (m *SeriesMetadata) String() string { return proto.CompactTextString(m) } +func (*SeriesMetadata) ProtoMessage() {} +func (*SeriesMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{11} +} +func (m *SeriesMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SeriesMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SeriesMetadata.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 *SeriesMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_SeriesMetadata.Merge(m, src) +} +func (m *SeriesMetadata) XXX_Size() int { + return m.Size() +} +func (m *SeriesMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_SeriesMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_SeriesMetadata proto.InternalMessageInfo func (m *SeriesMetadata) GetId() []byte { if m != nil { @@ -727,14 +928,42 @@ func (m *SeriesMetadata) GetEndTime() int64 { } type DecompressedSeries struct { - Datapoints []*Datapoint `protobuf:"bytes,1,rep,name=datapoints" json:"datapoints,omitempty"` - Tags []*Tag `protobuf:"bytes,2,rep,name=tags" json:"tags,omitempty"` + Datapoints []*Datapoint `protobuf:"bytes,1,rep,name=datapoints,proto3" json:"datapoints,omitempty"` + Tags []*Tag `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"` +} + +func (m *DecompressedSeries) Reset() { *m = DecompressedSeries{} } +func (m *DecompressedSeries) String() string { return proto.CompactTextString(m) } +func (*DecompressedSeries) ProtoMessage() {} +func (*DecompressedSeries) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{12} +} +func (m *DecompressedSeries) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DecompressedSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DecompressedSeries.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 *DecompressedSeries) XXX_Merge(src proto.Message) { + xxx_messageInfo_DecompressedSeries.Merge(m, src) +} +func (m *DecompressedSeries) XXX_Size() int { + return m.Size() +} +func (m *DecompressedSeries) XXX_DiscardUnknown() { + xxx_messageInfo_DecompressedSeries.DiscardUnknown(m) } -func (m *DecompressedSeries) Reset() { *m = DecompressedSeries{} } -func (m *DecompressedSeries) String() string { return proto.CompactTextString(m) } -func (*DecompressedSeries) ProtoMessage() {} -func (*DecompressedSeries) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{12} } +var xxx_messageInfo_DecompressedSeries proto.InternalMessageInfo func (m *DecompressedSeries) GetDatapoints() []*Datapoint { if m != nil { @@ -755,10 +984,38 @@ type Datapoint struct { Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *Datapoint) Reset() { *m = Datapoint{} } -func (m *Datapoint) String() string { return proto.CompactTextString(m) } -func (*Datapoint) ProtoMessage() {} -func (*Datapoint) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{13} } +func (m *Datapoint) Reset() { *m = Datapoint{} } +func (m *Datapoint) String() string { return proto.CompactTextString(m) } +func (*Datapoint) ProtoMessage() {} +func (*Datapoint) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{13} +} +func (m *Datapoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Datapoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Datapoint.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 *Datapoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_Datapoint.Merge(m, src) +} +func (m *Datapoint) XXX_Size() int { + return m.Size() +} +func (m *Datapoint) XXX_DiscardUnknown() { + xxx_messageInfo_Datapoint.DiscardUnknown(m) +} + +var xxx_messageInfo_Datapoint proto.InternalMessageInfo func (m *Datapoint) GetTimestamp() int64 { if m != nil { @@ -779,10 +1036,38 @@ type Tag struct { Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *Tag) Reset() { *m = Tag{} } -func (m *Tag) String() string { return proto.CompactTextString(m) } -func (*Tag) ProtoMessage() {} -func (*Tag) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{14} } +func (m *Tag) Reset() { *m = Tag{} } +func (m *Tag) String() string { return proto.CompactTextString(m) } +func (*Tag) ProtoMessage() {} +func (*Tag) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{14} +} +func (m *Tag) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Tag.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 *Tag) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tag.Merge(m, src) +} +func (m *Tag) XXX_Size() int { + return m.Size() +} +func (m *Tag) XXX_DiscardUnknown() { + xxx_messageInfo_Tag.DiscardUnknown(m) +} + +var xxx_messageInfo_Tag proto.InternalMessageInfo func (m *Tag) GetName() []byte { if m != nil { @@ -800,13 +1085,41 @@ func (m *Tag) GetValue() []byte { type M3CompressedSeries struct { CompressedTags []byte `protobuf:"bytes,1,opt,name=compressedTags,proto3" json:"compressedTags,omitempty"` - Replicas []*M3CompressedValuesReplica `protobuf:"bytes,2,rep,name=replicas" json:"replicas,omitempty"` + Replicas []*M3CompressedValuesReplica `protobuf:"bytes,2,rep,name=replicas,proto3" json:"replicas,omitempty"` +} + +func (m *M3CompressedSeries) Reset() { *m = M3CompressedSeries{} } +func (m *M3CompressedSeries) String() string { return proto.CompactTextString(m) } +func (*M3CompressedSeries) ProtoMessage() {} +func (*M3CompressedSeries) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{15} +} +func (m *M3CompressedSeries) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *M3CompressedSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_M3CompressedSeries.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 *M3CompressedSeries) XXX_Merge(src proto.Message) { + xxx_messageInfo_M3CompressedSeries.Merge(m, src) +} +func (m *M3CompressedSeries) XXX_Size() int { + return m.Size() +} +func (m *M3CompressedSeries) XXX_DiscardUnknown() { + xxx_messageInfo_M3CompressedSeries.DiscardUnknown(m) } -func (m *M3CompressedSeries) Reset() { *m = M3CompressedSeries{} } -func (m *M3CompressedSeries) String() string { return proto.CompactTextString(m) } -func (*M3CompressedSeries) ProtoMessage() {} -func (*M3CompressedSeries) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{15} } +var xxx_messageInfo_M3CompressedSeries proto.InternalMessageInfo func (m *M3CompressedSeries) GetCompressedTags() []byte { if m != nil { @@ -823,13 +1136,41 @@ func (m *M3CompressedSeries) GetReplicas() []*M3CompressedValuesReplica { } type M3CompressedValuesReplica struct { - Segments []*M3Segments `protobuf:"bytes,1,rep,name=segments" json:"segments,omitempty"` + Segments []*M3Segments `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` +} + +func (m *M3CompressedValuesReplica) Reset() { *m = M3CompressedValuesReplica{} } +func (m *M3CompressedValuesReplica) String() string { return proto.CompactTextString(m) } +func (*M3CompressedValuesReplica) ProtoMessage() {} +func (*M3CompressedValuesReplica) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{16} +} +func (m *M3CompressedValuesReplica) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *M3CompressedValuesReplica) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_M3CompressedValuesReplica.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 *M3CompressedValuesReplica) XXX_Merge(src proto.Message) { + xxx_messageInfo_M3CompressedValuesReplica.Merge(m, src) +} +func (m *M3CompressedValuesReplica) XXX_Size() int { + return m.Size() +} +func (m *M3CompressedValuesReplica) XXX_DiscardUnknown() { + xxx_messageInfo_M3CompressedValuesReplica.DiscardUnknown(m) } -func (m *M3CompressedValuesReplica) Reset() { *m = M3CompressedValuesReplica{} } -func (m *M3CompressedValuesReplica) String() string { return proto.CompactTextString(m) } -func (*M3CompressedValuesReplica) ProtoMessage() {} -func (*M3CompressedValuesReplica) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{16} } +var xxx_messageInfo_M3CompressedValuesReplica proto.InternalMessageInfo func (m *M3CompressedValuesReplica) GetSegments() []*M3Segments { if m != nil { @@ -839,14 +1180,42 @@ func (m *M3CompressedValuesReplica) GetSegments() []*M3Segments { } type M3Segments struct { - Merged *M3Segment `protobuf:"bytes,1,opt,name=merged" json:"merged,omitempty"` - Unmerged []*M3Segment `protobuf:"bytes,2,rep,name=unmerged" json:"unmerged,omitempty"` + Merged *M3Segment `protobuf:"bytes,1,opt,name=merged,proto3" json:"merged,omitempty"` + Unmerged []*M3Segment `protobuf:"bytes,2,rep,name=unmerged,proto3" json:"unmerged,omitempty"` +} + +func (m *M3Segments) Reset() { *m = M3Segments{} } +func (m *M3Segments) String() string { return proto.CompactTextString(m) } +func (*M3Segments) ProtoMessage() {} +func (*M3Segments) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{17} +} +func (m *M3Segments) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *M3Segments) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_M3Segments.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 *M3Segments) XXX_Merge(src proto.Message) { + xxx_messageInfo_M3Segments.Merge(m, src) +} +func (m *M3Segments) XXX_Size() int { + return m.Size() +} +func (m *M3Segments) XXX_DiscardUnknown() { + xxx_messageInfo_M3Segments.DiscardUnknown(m) } -func (m *M3Segments) Reset() { *m = M3Segments{} } -func (m *M3Segments) String() string { return proto.CompactTextString(m) } -func (*M3Segments) ProtoMessage() {} -func (*M3Segments) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{17} } +var xxx_messageInfo_M3Segments proto.InternalMessageInfo func (m *M3Segments) GetMerged() *M3Segment { if m != nil { @@ -870,10 +1239,38 @@ type M3Segment struct { Checksum uint32 `protobuf:"varint,5,opt,name=checksum,proto3" json:"checksum,omitempty"` } -func (m *M3Segment) Reset() { *m = M3Segment{} } -func (m *M3Segment) String() string { return proto.CompactTextString(m) } -func (*M3Segment) ProtoMessage() {} -func (*M3Segment) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{18} } +func (m *M3Segment) Reset() { *m = M3Segment{} } +func (m *M3Segment) String() string { return proto.CompactTextString(m) } +func (*M3Segment) ProtoMessage() {} +func (*M3Segment) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{18} +} +func (m *M3Segment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *M3Segment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_M3Segment.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 *M3Segment) XXX_Merge(src proto.Message) { + xxx_messageInfo_M3Segment.Merge(m, src) +} +func (m *M3Segment) XXX_Size() int { + return m.Size() +} +func (m *M3Segment) XXX_DiscardUnknown() { + xxx_messageInfo_M3Segment.DiscardUnknown(m) +} + +var xxx_messageInfo_M3Segment proto.InternalMessageInfo func (m *M3Segment) GetHead() []byte { if m != nil { @@ -912,17 +1309,46 @@ func (m *M3Segment) GetChecksum() uint32 { type SearchRequest struct { // Types that are valid to be assigned to Matchers: + // // *SearchRequest_TagMatchers Matchers isSearchRequest_Matchers `protobuf_oneof:"matchers"` Start int64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` - Options *FetchOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"` + Options *FetchOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"` +} + +func (m *SearchRequest) Reset() { *m = SearchRequest{} } +func (m *SearchRequest) String() string { return proto.CompactTextString(m) } +func (*SearchRequest) ProtoMessage() {} +func (*SearchRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{19} +} +func (m *SearchRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SearchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SearchRequest.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 *SearchRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchRequest.Merge(m, src) +} +func (m *SearchRequest) XXX_Size() int { + return m.Size() +} +func (m *SearchRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SearchRequest.DiscardUnknown(m) } -func (m *SearchRequest) Reset() { *m = SearchRequest{} } -func (m *SearchRequest) String() string { return proto.CompactTextString(m) } -func (*SearchRequest) ProtoMessage() {} -func (*SearchRequest) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{19} } +var xxx_messageInfo_SearchRequest proto.InternalMessageInfo type isSearchRequest_Matchers interface { isSearchRequest_Matchers() @@ -931,7 +1357,7 @@ type isSearchRequest_Matchers interface { } type SearchRequest_TagMatchers struct { - TagMatchers *TagMatchers `protobuf:"bytes,1,opt,name=tagMatchers,oneof"` + TagMatchers *TagMatchers `protobuf:"bytes,1,opt,name=tagMatchers,proto3,oneof" json:"tagMatchers,omitempty"` } func (*SearchRequest_TagMatchers) isSearchRequest_Matchers() {} @@ -971,70 +1397,50 @@ func (m *SearchRequest) GetOptions() *FetchOptions { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*SearchRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _SearchRequest_OneofMarshaler, _SearchRequest_OneofUnmarshaler, _SearchRequest_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*SearchRequest) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*SearchRequest_TagMatchers)(nil), } } -func _SearchRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*SearchRequest) - // matchers - switch x := m.Matchers.(type) { - case *SearchRequest_TagMatchers: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TagMatchers); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("SearchRequest.Matchers has unexpected type %T", x) - } - return nil +type M3TagProperty struct { + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CompressedTags []byte `protobuf:"bytes,2,opt,name=compressedTags,proto3" json:"compressedTags,omitempty"` } -func _SearchRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*SearchRequest) - switch tag { - case 1: // matchers.tagMatchers - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType +func (m *M3TagProperty) Reset() { *m = M3TagProperty{} } +func (m *M3TagProperty) String() string { return proto.CompactTextString(m) } +func (*M3TagProperty) ProtoMessage() {} +func (*M3TagProperty) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{20} +} +func (m *M3TagProperty) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *M3TagProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_M3TagProperty.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } - msg := new(TagMatchers) - err := b.DecodeMessage(msg) - m.Matchers = &SearchRequest_TagMatchers{msg} - return true, err - default: - return false, nil + return b[:n], nil } } - -func _SearchRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*SearchRequest) - // matchers - switch x := m.Matchers.(type) { - case *SearchRequest_TagMatchers: - s := proto.Size(x.TagMatchers) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n +func (m *M3TagProperty) XXX_Merge(src proto.Message) { + xxx_messageInfo_M3TagProperty.Merge(m, src) } - -type M3TagProperty struct { - Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - CompressedTags []byte `protobuf:"bytes,2,opt,name=compressedTags,proto3" json:"compressedTags,omitempty"` +func (m *M3TagProperty) XXX_Size() int { + return m.Size() +} +func (m *M3TagProperty) XXX_DiscardUnknown() { + xxx_messageInfo_M3TagProperty.DiscardUnknown(m) } -func (m *M3TagProperty) Reset() { *m = M3TagProperty{} } -func (m *M3TagProperty) String() string { return proto.CompactTextString(m) } -func (*M3TagProperty) ProtoMessage() {} -func (*M3TagProperty) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{20} } +var xxx_messageInfo_M3TagProperty proto.InternalMessageInfo func (m *M3TagProperty) GetId() []byte { if m != nil { @@ -1051,13 +1457,41 @@ func (m *M3TagProperty) GetCompressedTags() []byte { } type M3TagProperties struct { - Properties []*M3TagProperty `protobuf:"bytes,1,rep,name=properties" json:"properties,omitempty"` + Properties []*M3TagProperty `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"` +} + +func (m *M3TagProperties) Reset() { *m = M3TagProperties{} } +func (m *M3TagProperties) String() string { return proto.CompactTextString(m) } +func (*M3TagProperties) ProtoMessage() {} +func (*M3TagProperties) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{21} +} +func (m *M3TagProperties) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *M3TagProperties) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_M3TagProperties.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 *M3TagProperties) XXX_Merge(src proto.Message) { + xxx_messageInfo_M3TagProperties.Merge(m, src) +} +func (m *M3TagProperties) XXX_Size() int { + return m.Size() +} +func (m *M3TagProperties) XXX_DiscardUnknown() { + xxx_messageInfo_M3TagProperties.DiscardUnknown(m) } -func (m *M3TagProperties) Reset() { *m = M3TagProperties{} } -func (m *M3TagProperties) String() string { return proto.CompactTextString(m) } -func (*M3TagProperties) ProtoMessage() {} -func (*M3TagProperties) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{21} } +var xxx_messageInfo_M3TagProperties proto.InternalMessageInfo func (m *M3TagProperties) GetProperties() []*M3TagProperty { if m != nil { @@ -1071,10 +1505,38 @@ type TagProperty struct { Values []byte `protobuf:"bytes,2,opt,name=values,proto3" json:"values,omitempty"` } -func (m *TagProperty) Reset() { *m = TagProperty{} } -func (m *TagProperty) String() string { return proto.CompactTextString(m) } -func (*TagProperty) ProtoMessage() {} -func (*TagProperty) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{22} } +func (m *TagProperty) Reset() { *m = TagProperty{} } +func (m *TagProperty) String() string { return proto.CompactTextString(m) } +func (*TagProperty) ProtoMessage() {} +func (*TagProperty) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{22} +} +func (m *TagProperty) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TagProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TagProperty.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 *TagProperty) XXX_Merge(src proto.Message) { + xxx_messageInfo_TagProperty.Merge(m, src) +} +func (m *TagProperty) XXX_Size() int { + return m.Size() +} +func (m *TagProperty) XXX_DiscardUnknown() { + xxx_messageInfo_TagProperty.DiscardUnknown(m) +} + +var xxx_messageInfo_TagProperty proto.InternalMessageInfo func (m *TagProperty) GetKey() []byte { if m != nil { @@ -1091,13 +1553,41 @@ func (m *TagProperty) GetValues() []byte { } type TagProperties struct { - Properties []*TagProperty `protobuf:"bytes,1,rep,name=properties" json:"properties,omitempty"` + Properties []*TagProperty `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"` +} + +func (m *TagProperties) Reset() { *m = TagProperties{} } +func (m *TagProperties) String() string { return proto.CompactTextString(m) } +func (*TagProperties) ProtoMessage() {} +func (*TagProperties) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{23} +} +func (m *TagProperties) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TagProperties) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TagProperties.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 *TagProperties) XXX_Merge(src proto.Message) { + xxx_messageInfo_TagProperties.Merge(m, src) +} +func (m *TagProperties) XXX_Size() int { + return m.Size() +} +func (m *TagProperties) XXX_DiscardUnknown() { + xxx_messageInfo_TagProperties.DiscardUnknown(m) } -func (m *TagProperties) Reset() { *m = TagProperties{} } -func (m *TagProperties) String() string { return proto.CompactTextString(m) } -func (*TagProperties) ProtoMessage() {} -func (*TagProperties) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{23} } +var xxx_messageInfo_TagProperties proto.InternalMessageInfo func (m *TagProperties) GetProperties() []*TagProperty { if m != nil { @@ -1108,16 +1598,45 @@ func (m *TagProperties) GetProperties() []*TagProperty { type SearchResponse struct { // Types that are valid to be assigned to Value: + // // *SearchResponse_Decompressed // *SearchResponse_Compressed Value isSearchResponse_Value `protobuf_oneof:"value"` - Meta *ResultMetadata `protobuf:"bytes,3,opt,name=meta" json:"meta,omitempty"` + Meta *ResultMetadata `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta,omitempty"` +} + +func (m *SearchResponse) Reset() { *m = SearchResponse{} } +func (m *SearchResponse) String() string { return proto.CompactTextString(m) } +func (*SearchResponse) ProtoMessage() {} +func (*SearchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{24} +} +func (m *SearchResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SearchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SearchResponse.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 *SearchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchResponse.Merge(m, src) +} +func (m *SearchResponse) XXX_Size() int { + return m.Size() +} +func (m *SearchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SearchResponse.DiscardUnknown(m) } -func (m *SearchResponse) Reset() { *m = SearchResponse{} } -func (m *SearchResponse) String() string { return proto.CompactTextString(m) } -func (*SearchResponse) ProtoMessage() {} -func (*SearchResponse) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{24} } +var xxx_messageInfo_SearchResponse proto.InternalMessageInfo type isSearchResponse_Value interface { isSearchResponse_Value() @@ -1126,10 +1645,10 @@ type isSearchResponse_Value interface { } type SearchResponse_Decompressed struct { - Decompressed *TagProperties `protobuf:"bytes,1,opt,name=decompressed,oneof"` + Decompressed *TagProperties `protobuf:"bytes,1,opt,name=decompressed,proto3,oneof" json:"decompressed,omitempty"` } type SearchResponse_Compressed struct { - Compressed *M3TagProperties `protobuf:"bytes,2,opt,name=compressed,oneof"` + Compressed *M3TagProperties `protobuf:"bytes,2,opt,name=compressed,proto3,oneof" json:"compressed,omitempty"` } func (*SearchResponse_Decompressed) isSearchResponse_Value() {} @@ -1163,92 +1682,54 @@ func (m *SearchResponse) GetMeta() *ResultMetadata { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*SearchResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _SearchResponse_OneofMarshaler, _SearchResponse_OneofUnmarshaler, _SearchResponse_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*SearchResponse) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*SearchResponse_Decompressed)(nil), (*SearchResponse_Compressed)(nil), } } -func _SearchResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*SearchResponse) - // value - switch x := m.Value.(type) { - case *SearchResponse_Decompressed: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Decompressed); err != nil { - return err - } - case *SearchResponse_Compressed: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Compressed); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("SearchResponse.Value has unexpected type %T", x) - } - return nil -} - -func _SearchResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*SearchResponse) - switch tag { - case 1: // value.decompressed - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TagProperties) - err := b.DecodeMessage(msg) - m.Value = &SearchResponse_Decompressed{msg} - return true, err - case 2: // value.compressed - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(M3TagProperties) - err := b.DecodeMessage(msg) - m.Value = &SearchResponse_Compressed{msg} - return true, err - default: - return false, nil - } -} - -func _SearchResponse_OneofSizer(msg proto.Message) (n int) { - m := msg.(*SearchResponse) - // value - switch x := m.Value.(type) { - case *SearchResponse_Decompressed: - s := proto.Size(x.Decompressed) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *SearchResponse_Compressed: - s := proto.Size(x.Compressed) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type CompleteTagsRequestOptions struct { Type CompleteTagsType `protobuf:"varint,1,opt,name=type,proto3,enum=rpc.CompleteTagsType" json:"type,omitempty"` - FilterNameTags [][]byte `protobuf:"bytes,2,rep,name=filterNameTags" json:"filterNameTags,omitempty"` + FilterNameTags [][]byte `protobuf:"bytes,2,rep,name=filterNameTags,proto3" json:"filterNameTags,omitempty"` Start int64 `protobuf:"varint,3,opt,name=start,proto3" json:"start,omitempty"` End int64 `protobuf:"varint,4,opt,name=end,proto3" json:"end,omitempty"` - Options *FetchOptions `protobuf:"bytes,5,opt,name=options" json:"options,omitempty"` + Options *FetchOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"` +} + +func (m *CompleteTagsRequestOptions) Reset() { *m = CompleteTagsRequestOptions{} } +func (m *CompleteTagsRequestOptions) String() string { return proto.CompactTextString(m) } +func (*CompleteTagsRequestOptions) ProtoMessage() {} +func (*CompleteTagsRequestOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{25} +} +func (m *CompleteTagsRequestOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CompleteTagsRequestOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CompleteTagsRequestOptions.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 *CompleteTagsRequestOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompleteTagsRequestOptions.Merge(m, src) +} +func (m *CompleteTagsRequestOptions) XXX_Size() int { + return m.Size() +} +func (m *CompleteTagsRequestOptions) XXX_DiscardUnknown() { + xxx_messageInfo_CompleteTagsRequestOptions.DiscardUnknown(m) } -func (m *CompleteTagsRequestOptions) Reset() { *m = CompleteTagsRequestOptions{} } -func (m *CompleteTagsRequestOptions) String() string { return proto.CompactTextString(m) } -func (*CompleteTagsRequestOptions) ProtoMessage() {} -func (*CompleteTagsRequestOptions) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{25} } +var xxx_messageInfo_CompleteTagsRequestOptions proto.InternalMessageInfo func (m *CompleteTagsRequestOptions) GetType() CompleteTagsType { if m != nil { @@ -1287,15 +1768,44 @@ func (m *CompleteTagsRequestOptions) GetOptions() *FetchOptions { type CompleteTagsRequest struct { // Types that are valid to be assigned to Matchers: + // // *CompleteTagsRequest_TagMatchers Matchers isCompleteTagsRequest_Matchers `protobuf_oneof:"matchers"` - Options *CompleteTagsRequestOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` + Options *CompleteTagsRequestOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` +} + +func (m *CompleteTagsRequest) Reset() { *m = CompleteTagsRequest{} } +func (m *CompleteTagsRequest) String() string { return proto.CompactTextString(m) } +func (*CompleteTagsRequest) ProtoMessage() {} +func (*CompleteTagsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{26} +} +func (m *CompleteTagsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CompleteTagsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CompleteTagsRequest.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 *CompleteTagsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompleteTagsRequest.Merge(m, src) +} +func (m *CompleteTagsRequest) XXX_Size() int { + return m.Size() +} +func (m *CompleteTagsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CompleteTagsRequest.DiscardUnknown(m) } -func (m *CompleteTagsRequest) Reset() { *m = CompleteTagsRequest{} } -func (m *CompleteTagsRequest) String() string { return proto.CompactTextString(m) } -func (*CompleteTagsRequest) ProtoMessage() {} -func (*CompleteTagsRequest) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{26} } +var xxx_messageInfo_CompleteTagsRequest proto.InternalMessageInfo type isCompleteTagsRequest_Matchers interface { isCompleteTagsRequest_Matchers() @@ -1304,7 +1814,7 @@ type isCompleteTagsRequest_Matchers interface { } type CompleteTagsRequest_TagMatchers struct { - TagMatchers *TagMatchers `protobuf:"bytes,1,opt,name=tagMatchers,oneof"` + TagMatchers *TagMatchers `protobuf:"bytes,1,opt,name=tagMatchers,proto3,oneof" json:"tagMatchers,omitempty"` } func (*CompleteTagsRequest_TagMatchers) isCompleteTagsRequest_Matchers() {} @@ -1330,69 +1840,49 @@ func (m *CompleteTagsRequest) GetOptions() *CompleteTagsRequestOptions { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*CompleteTagsRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _CompleteTagsRequest_OneofMarshaler, _CompleteTagsRequest_OneofUnmarshaler, _CompleteTagsRequest_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*CompleteTagsRequest) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*CompleteTagsRequest_TagMatchers)(nil), } } -func _CompleteTagsRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*CompleteTagsRequest) - // matchers - switch x := m.Matchers.(type) { - case *CompleteTagsRequest_TagMatchers: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TagMatchers); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("CompleteTagsRequest.Matchers has unexpected type %T", x) - } - return nil +type TagNames struct { + Names [][]byte `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` } -func _CompleteTagsRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*CompleteTagsRequest) - switch tag { - case 1: // matchers.tagMatchers - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType +func (m *TagNames) Reset() { *m = TagNames{} } +func (m *TagNames) String() string { return proto.CompactTextString(m) } +func (*TagNames) ProtoMessage() {} +func (*TagNames) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{27} +} +func (m *TagNames) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TagNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TagNames.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } - msg := new(TagMatchers) - err := b.DecodeMessage(msg) - m.Matchers = &CompleteTagsRequest_TagMatchers{msg} - return true, err - default: - return false, nil + return b[:n], nil } } - -func _CompleteTagsRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*CompleteTagsRequest) - // matchers - switch x := m.Matchers.(type) { - case *CompleteTagsRequest_TagMatchers: - s := proto.Size(x.TagMatchers) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n +func (m *TagNames) XXX_Merge(src proto.Message) { + xxx_messageInfo_TagNames.Merge(m, src) } - -type TagNames struct { - Names [][]byte `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"` +func (m *TagNames) XXX_Size() int { + return m.Size() +} +func (m *TagNames) XXX_DiscardUnknown() { + xxx_messageInfo_TagNames.DiscardUnknown(m) } -func (m *TagNames) Reset() { *m = TagNames{} } -func (m *TagNames) String() string { return proto.CompactTextString(m) } -func (*TagNames) ProtoMessage() {} -func (*TagNames) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{27} } +var xxx_messageInfo_TagNames proto.InternalMessageInfo func (m *TagNames) GetNames() [][]byte { if m != nil { @@ -1403,13 +1893,41 @@ func (m *TagNames) GetNames() [][]byte { type TagValue struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Values [][]byte `protobuf:"bytes,2,rep,name=values" json:"values,omitempty"` + Values [][]byte `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` +} + +func (m *TagValue) Reset() { *m = TagValue{} } +func (m *TagValue) String() string { return proto.CompactTextString(m) } +func (*TagValue) ProtoMessage() {} +func (*TagValue) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{28} +} +func (m *TagValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TagValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TagValue.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 *TagValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_TagValue.Merge(m, src) +} +func (m *TagValue) XXX_Size() int { + return m.Size() +} +func (m *TagValue) XXX_DiscardUnknown() { + xxx_messageInfo_TagValue.DiscardUnknown(m) } -func (m *TagValue) Reset() { *m = TagValue{} } -func (m *TagValue) String() string { return proto.CompactTextString(m) } -func (*TagValue) ProtoMessage() {} -func (*TagValue) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{28} } +var xxx_messageInfo_TagValue proto.InternalMessageInfo func (m *TagValue) GetKey() []byte { if m != nil { @@ -1426,13 +1944,41 @@ func (m *TagValue) GetValues() [][]byte { } type TagValues struct { - Values []*TagValue `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"` + Values []*TagValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (m *TagValues) Reset() { *m = TagValues{} } +func (m *TagValues) String() string { return proto.CompactTextString(m) } +func (*TagValues) ProtoMessage() {} +func (*TagValues) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{29} +} +func (m *TagValues) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TagValues) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TagValues.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 *TagValues) XXX_Merge(src proto.Message) { + xxx_messageInfo_TagValues.Merge(m, src) +} +func (m *TagValues) XXX_Size() int { + return m.Size() +} +func (m *TagValues) XXX_DiscardUnknown() { + xxx_messageInfo_TagValues.DiscardUnknown(m) } -func (m *TagValues) Reset() { *m = TagValues{} } -func (m *TagValues) String() string { return proto.CompactTextString(m) } -func (*TagValues) ProtoMessage() {} -func (*TagValues) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{29} } +var xxx_messageInfo_TagValues proto.InternalMessageInfo func (m *TagValues) GetValues() []*TagValue { if m != nil { @@ -1443,16 +1989,45 @@ func (m *TagValues) GetValues() []*TagValue { type CompleteTagsResponse struct { // Types that are valid to be assigned to Value: + // // *CompleteTagsResponse_Default // *CompleteTagsResponse_NamesOnly Value isCompleteTagsResponse_Value `protobuf_oneof:"value"` - Meta *ResultMetadata `protobuf:"bytes,3,opt,name=meta" json:"meta,omitempty"` + Meta *ResultMetadata `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta,omitempty"` +} + +func (m *CompleteTagsResponse) Reset() { *m = CompleteTagsResponse{} } +func (m *CompleteTagsResponse) String() string { return proto.CompactTextString(m) } +func (*CompleteTagsResponse) ProtoMessage() {} +func (*CompleteTagsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{30} +} +func (m *CompleteTagsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CompleteTagsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CompleteTagsResponse.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 *CompleteTagsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompleteTagsResponse.Merge(m, src) +} +func (m *CompleteTagsResponse) XXX_Size() int { + return m.Size() +} +func (m *CompleteTagsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CompleteTagsResponse.DiscardUnknown(m) } -func (m *CompleteTagsResponse) Reset() { *m = CompleteTagsResponse{} } -func (m *CompleteTagsResponse) String() string { return proto.CompactTextString(m) } -func (*CompleteTagsResponse) ProtoMessage() {} -func (*CompleteTagsResponse) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{30} } +var xxx_messageInfo_CompleteTagsResponse proto.InternalMessageInfo type isCompleteTagsResponse_Value interface { isCompleteTagsResponse_Value() @@ -1461,10 +2036,10 @@ type isCompleteTagsResponse_Value interface { } type CompleteTagsResponse_Default struct { - Default *TagValues `protobuf:"bytes,1,opt,name=default,oneof"` + Default *TagValues `protobuf:"bytes,1,opt,name=default,proto3,oneof" json:"default,omitempty"` } type CompleteTagsResponse_NamesOnly struct { - NamesOnly *TagNames `protobuf:"bytes,2,opt,name=namesOnly,oneof"` + NamesOnly *TagNames `protobuf:"bytes,2,opt,name=namesOnly,proto3,oneof" json:"namesOnly,omitempty"` } func (*CompleteTagsResponse_Default) isCompleteTagsResponse_Value() {} @@ -1498,90 +2073,52 @@ func (m *CompleteTagsResponse) GetMeta() *ResultMetadata { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*CompleteTagsResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _CompleteTagsResponse_OneofMarshaler, _CompleteTagsResponse_OneofUnmarshaler, _CompleteTagsResponse_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*CompleteTagsResponse) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*CompleteTagsResponse_Default)(nil), (*CompleteTagsResponse_NamesOnly)(nil), } } -func _CompleteTagsResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*CompleteTagsResponse) - // value - switch x := m.Value.(type) { - case *CompleteTagsResponse_Default: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Default); err != nil { - return err - } - case *CompleteTagsResponse_NamesOnly: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.NamesOnly); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("CompleteTagsResponse.Value has unexpected type %T", x) - } - return nil +type ResultMetadata struct { + Exhaustive bool `protobuf:"varint,1,opt,name=exhaustive,proto3" json:"exhaustive,omitempty"` + Warnings []*Warning `protobuf:"bytes,2,rep,name=warnings,proto3" json:"warnings,omitempty"` + Resolutions []int64 `protobuf:"varint,3,rep,packed,name=resolutions,proto3" json:"resolutions,omitempty"` } -func _CompleteTagsResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*CompleteTagsResponse) - switch tag { - case 1: // value.default - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TagValues) - err := b.DecodeMessage(msg) - m.Value = &CompleteTagsResponse_Default{msg} - return true, err - case 2: // value.namesOnly - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TagNames) - err := b.DecodeMessage(msg) - m.Value = &CompleteTagsResponse_NamesOnly{msg} - return true, err - default: - return false, nil - } -} - -func _CompleteTagsResponse_OneofSizer(msg proto.Message) (n int) { - m := msg.(*CompleteTagsResponse) - // value - switch x := m.Value.(type) { - case *CompleteTagsResponse_Default: - s := proto.Size(x.Default) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *CompleteTagsResponse_NamesOnly: - s := proto.Size(x.NamesOnly) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) +func (m *ResultMetadata) Reset() { *m = ResultMetadata{} } +func (m *ResultMetadata) String() string { return proto.CompactTextString(m) } +func (*ResultMetadata) ProtoMessage() {} +func (*ResultMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{31} +} +func (m *ResultMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResultMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResultMetadata.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return n } - -type ResultMetadata struct { - Exhaustive bool `protobuf:"varint,1,opt,name=exhaustive,proto3" json:"exhaustive,omitempty"` - Warnings []*Warning `protobuf:"bytes,2,rep,name=warnings" json:"warnings,omitempty"` - Resolutions []int64 `protobuf:"varint,3,rep,packed,name=resolutions" json:"resolutions,omitempty"` +func (m *ResultMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResultMetadata.Merge(m, src) +} +func (m *ResultMetadata) XXX_Size() int { + return m.Size() +} +func (m *ResultMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_ResultMetadata.DiscardUnknown(m) } -func (m *ResultMetadata) Reset() { *m = ResultMetadata{} } -func (m *ResultMetadata) String() string { return proto.CompactTextString(m) } -func (*ResultMetadata) ProtoMessage() {} -func (*ResultMetadata) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{31} } +var xxx_messageInfo_ResultMetadata proto.InternalMessageInfo func (m *ResultMetadata) GetExhaustive() bool { if m != nil { @@ -1609,10 +2146,38 @@ type Warning struct { Message []byte `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` } -func (m *Warning) Reset() { *m = Warning{} } -func (m *Warning) String() string { return proto.CompactTextString(m) } -func (*Warning) ProtoMessage() {} -func (*Warning) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{32} } +func (m *Warning) Reset() { *m = Warning{} } +func (m *Warning) String() string { return proto.CompactTextString(m) } +func (*Warning) ProtoMessage() {} +func (*Warning) Descriptor() ([]byte, []int) { + return fileDescriptor_f2049b1712004706, []int{32} +} +func (m *Warning) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Warning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Warning.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 *Warning) XXX_Merge(src proto.Message) { + xxx_messageInfo_Warning.Merge(m, src) +} +func (m *Warning) XXX_Size() int { + return m.Size() +} +func (m *Warning) XXX_DiscardUnknown() { + xxx_messageInfo_Warning.DiscardUnknown(m) +} + +var xxx_messageInfo_Warning proto.InternalMessageInfo func (m *Warning) GetName() []byte { if m != nil { @@ -1629,6 +2194,10 @@ func (m *Warning) GetMessage() []byte { } func init() { + proto.RegisterEnum("rpc.MatcherType", MatcherType_name, MatcherType_value) + proto.RegisterEnum("rpc.MetricsType", MetricsType_name, MetricsType_value) + proto.RegisterEnum("rpc.FanoutOption", FanoutOption_name, FanoutOption_value) + proto.RegisterEnum("rpc.CompleteTagsType", CompleteTagsType_name, CompleteTagsType_value) proto.RegisterType((*HealthRequest)(nil), "rpc.HealthRequest") proto.RegisterType((*HealthResponse)(nil), "rpc.HealthResponse") proto.RegisterType((*FetchRequest)(nil), "rpc.FetchRequest") @@ -1662,10 +2231,120 @@ func init() { proto.RegisterType((*CompleteTagsResponse)(nil), "rpc.CompleteTagsResponse") proto.RegisterType((*ResultMetadata)(nil), "rpc.ResultMetadata") proto.RegisterType((*Warning)(nil), "rpc.Warning") - proto.RegisterEnum("rpc.MatcherType", MatcherType_name, MatcherType_value) - proto.RegisterEnum("rpc.MetricsType", MetricsType_name, MetricsType_value) - proto.RegisterEnum("rpc.FanoutOption", FanoutOption_name, FanoutOption_value) - proto.RegisterEnum("rpc.CompleteTagsType", CompleteTagsType_name, CompleteTagsType_value) +} + +func init() { + proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/rpcpb/query.proto", fileDescriptor_f2049b1712004706) +} + +var fileDescriptor_f2049b1712004706 = []byte{ + // 1690 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdb, 0x72, 0x1b, 0x49, + 0x19, 0xd6, 0x68, 0x6c, 0x1d, 0x7e, 0x1d, 0x22, 0xb7, 0xcd, 0xae, 0x62, 0x82, 0x56, 0x35, 0xc0, + 0x62, 0xbc, 0xc1, 0x4a, 0xe4, 0x2c, 0xcb, 0x52, 0xc5, 0x41, 0x8e, 0x14, 0xdb, 0xb5, 0xb6, 0xe4, + 0x6d, 0x4d, 0x48, 0xa0, 0xa0, 0x4c, 0x6b, 0xd4, 0x19, 0x4f, 0x59, 0x73, 0xd8, 0x39, 0x2c, 0xeb, + 0x2d, 0x2e, 0xb8, 0xe7, 0x86, 0xa2, 0x78, 0x02, 0x28, 0x78, 0x82, 0x7d, 0x04, 0x2e, 0xb8, 0xdc, + 0x4b, 0x2e, 0xa9, 0xe4, 0x86, 0xc7, 0xd8, 0xea, 0x9e, 0x9e, 0x93, 0x66, 0x5c, 0x49, 0xe5, 0x6e, + 0xfe, 0x73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 0x7a, 0x11, 0x34, 0xf6, 0x5d, 0xa8, 0x78, 0xd4, 0x35, 0x68, 0x74, + 0x68, 0x1b, 0x3c, 0xe5, 0x9c, 0xab, 0xb0, 0x30, 0xa1, 0x1f, 0xc0, 0x86, 0x49, 0x7d, 0x22, 0x7a, + 0xd9, 0x8e, 0xc6, 0x1b, 0xac, 0xfc, 0x73, 0xea, 0x93, 0x25, 0xf1, 0x09, 0xe6, 0x0e, 0xca, 0x57, + 0x12, 0x54, 0xe6, 0xd9, 0x18, 0x29, 0x15, 0x13, 0x9a, 0xb2, 0x31, 0xe8, 0x67, 0xd0, 0x5c, 0x52, + 0xcd, 0x36, 0x1d, 0x97, 0x7a, 0x1e, 0x5d, 0xc6, 0x03, 0x63, 0x01, 0xe3, 0x94, 0x21, 0x0c, 0x3e, + 0x29, 0xe1, 0x8c, 0x3b, 0xfa, 0x18, 0x20, 0x15, 0x2c, 0xa7, 0x82, 0xcf, 0x0f, 0x1f, 0xe7, 0x83, + 0x53, 0xce, 0x47, 0x55, 0x41, 0x30, 0xca, 0x73, 0x68, 0x67, 0x97, 0x86, 0xda, 0x50, 0x36, 0x96, + 0x82, 0x8d, 0xca, 0xc6, 0x12, 0xdd, 0x83, 0x3a, 0x67, 0x5e, 0xd5, 0x30, 0xa9, 0xa0, 0xdd, 0x44, + 0x81, 0xba, 0x50, 0xa5, 0xd6, 0x92, 0xdb, 0x42, 0x1a, 0x88, 0x44, 0x65, 0x01, 0x28, 0xdf, 0x03, + 0x3a, 0x00, 0x60, 0x55, 0x1c, 0xdb, 0xb0, 0xfc, 0x68, 0xf0, 0xed, 0xb0, 0xe1, 0x48, 0x8d, 0x53, + 0x1e, 0xe8, 0x1e, 0x6c, 0xf8, 0x0c, 0xde, 0x65, 0xee, 0x59, 0x8b, 0x76, 0x1d, 0x73, 0xad, 0xf2, + 0x0b, 0xa8, 0xc7, 0x61, 0x6c, 0xa1, 0xec, 0x4e, 0xf1, 0x7c, 0x62, 0x3a, 0x82, 0x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83, 0xa4, 0x5c, 0xf0, 0x20, 0x91, 0x93, 0x07, 0xc9, 0x5b, 0x3f, 0x2d, + 0x8e, 0xa1, 0x75, 0x7e, 0xa8, 0x12, 0xfd, 0xc2, 0xb5, 0x1d, 0xea, 0xfa, 0x37, 0xb9, 0xb3, 0x98, + 0xc7, 0x59, 0xb9, 0x08, 0x67, 0xca, 0x04, 0xee, 0xa4, 0x13, 0x31, 0x88, 0x0e, 0x01, 0x9c, 0x58, + 0x12, 0x18, 0x41, 0x62, 0x03, 0x53, 0x25, 0x71, 0xca, 0x4b, 0xf9, 0x88, 0x3f, 0x75, 0xe2, 0xd5, + 0x74, 0x40, 0xbe, 0xa6, 0x37, 0x62, 0x39, 0xec, 0x93, 0x5d, 0x80, 0xfc, 0x58, 0x44, 0xeb, 0x10, + 0x92, 0x32, 0x82, 0x56, 0xb6, 0xfa, 0x83, 0x82, 0xea, 0xf1, 0xbc, 0x0b, 0x6b, 0x7f, 0x25, 0x31, + 0x66, 0x0a, 0x37, 0x4d, 0x10, 0xf6, 0x4f, 0xd6, 0xe8, 0x32, 0xdc, 0x36, 0xb4, 0x96, 0xa6, 0x88, + 0x29, 0x7f, 0x9c, 0x61, 0xca, 0x90, 0x66, 0x77, 0x72, 0xcd, 0xe7, 0x68, 0x32, 0x66, 0x72, 0xf9, + 0x35, 0xec, 0x9f, 0xf0, 0xe9, 0xbf, 0x25, 0xd8, 0x65, 0x87, 0x74, 0x45, 0x7d, 0xca, 0x6f, 0xde, + 0x10, 0x71, 0xd1, 0x03, 0xe0, 0x87, 0xe2, 0x09, 0x17, 0xde, 0xab, 0xdf, 0xe2, 0x09, 0xd3, 0xee, + 0xc9, 0x3b, 0x8e, 0xed, 0xf5, 0x0b, 0x63, 0xe5, 0x53, 0x77, 0x4a, 0x4c, 0xaa, 0x46, 0x1c, 0xd8, + 0xc4, 0x6b, 0xda, 0x04, 0x95, 0x72, 0x01, 0x2a, 0x37, 0x0a, 0x51, 0xb9, 0xf9, 0x3a, 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, 0xa8, 0xa3, 0xe3, 0xe9, 0xe8, 0x7c, 0xd2, 0x91, 0x86, + 0xff, 0x97, 0x60, 0x93, 0xbf, 0xa0, 0xd1, 0x43, 0xa8, 0x84, 0xbf, 0xe0, 0x51, 0xc8, 0x95, 0x99, + 0xdf, 0xf7, 0xbb, 0xdb, 0x19, 0x9d, 0x40, 0xf1, 0x03, 0xd8, 0xe4, 0xc4, 0x80, 0x52, 0x24, 0x11, + 0x05, 0xa0, 0xb4, 0x2a, 0xf4, 0x7f, 0x20, 0xa1, 0x43, 0xf6, 0xfc, 0x65, 0x74, 0x2d, 0x8a, 0x64, + 0x2e, 0xdc, 0xdd, 0xed, 0x8c, 0x2e, 0x0e, 0x9a, 0x40, 0x33, 0xdd, 0x11, 0xea, 0xde, 0xc6, 0x0b, + 0xbb, 0x77, 0x0b, 0x2c, 0x51, 0x9a, 0xa3, 0xf7, 0xfe, 0xf3, 0xb2, 0x27, 0x7d, 0xfd, 0xb2, 0x27, + 0xfd, 0xef, 0x65, 0x4f, 0xfa, 0xcb, 0xab, 0x5e, 0xe9, 0xeb, 0x57, 0xbd, 0xd2, 0x7f, 0x5f, 0xf5, + 0x4a, 0xbf, 0xd9, 0xe4, 0xff, 0x95, 0x2c, 0x2a, 0xfc, 0xbf, 0x8d, 0xc3, 0x6f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xb1, 0x56, 0xa9, 0xa4, 0x68, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1676,8 +2355,9 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for Query service - +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (Query_FetchClient, error) @@ -1695,7 +2375,7 @@ func NewQueryClient(cc *grpc.ClientConn) QueryClient { func (c *queryClient) Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error) { out := new(HealthResponse) - err := grpc.Invoke(ctx, "/rpc.Query/Health", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpc.Query/Health", in, out, opts...) if err != nil { return nil, err } @@ -1703,7 +2383,7 @@ func (c *queryClient) Health(ctx context.Context, in *HealthRequest, opts ...grp } func (c *queryClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (Query_FetchClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Query_serviceDesc.Streams[0], c.cc, "/rpc.Query/Fetch", opts...) + stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[0], "/rpc.Query/Fetch", opts...) if err != nil { return nil, err } @@ -1735,7 +2415,7 @@ func (x *queryFetchClient) Recv() (*FetchResponse, error) { } func (c *queryClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (Query_SearchClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Query_serviceDesc.Streams[1], c.cc, "/rpc.Query/Search", opts...) + stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[1], "/rpc.Query/Search", opts...) if err != nil { return nil, err } @@ -1767,7 +2447,7 @@ func (x *querySearchClient) Recv() (*SearchResponse, error) { } func (c *queryClient) CompleteTags(ctx context.Context, in *CompleteTagsRequest, opts ...grpc.CallOption) (Query_CompleteTagsClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Query_serviceDesc.Streams[2], c.cc, "/rpc.Query/CompleteTags", opts...) + stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[2], "/rpc.Query/CompleteTags", opts...) if err != nil { return nil, err } @@ -1798,8 +2478,7 @@ func (x *queryCompleteTagsClient) Recv() (*CompleteTagsResponse, error) { return m, nil } -// Server API for Query service - +// QueryServer is the server API for Query service. type QueryServer interface { Health(context.Context, *HealthRequest) (*HealthResponse, error) Fetch(*FetchRequest, Query_FetchServer) error @@ -1807,6 +2486,23 @@ type QueryServer interface { CompleteTags(*CompleteTagsRequest, Query_CompleteTagsServer) error } +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Health(ctx context.Context, req *HealthRequest) (*HealthResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Health not implemented") +} +func (*UnimplementedQueryServer) Fetch(req *FetchRequest, srv Query_FetchServer) error { + return status.Errorf(codes.Unimplemented, "method Fetch not implemented") +} +func (*UnimplementedQueryServer) Search(req *SearchRequest, srv Query_SearchServer) error { + return status.Errorf(codes.Unimplemented, "method Search not implemented") +} +func (*UnimplementedQueryServer) CompleteTags(req *CompleteTagsRequest, srv Query_CompleteTagsServer) error { + return status.Errorf(codes.Unimplemented, "method CompleteTags not implemented") +} + func RegisterQueryServer(s *grpc.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } @@ -1924,7 +2620,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ func (m *HealthRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1932,17 +2628,22 @@ func (m *HealthRequest) Marshal() (dAtA []byte, err error) { } func (m *HealthRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HealthRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - return i, nil + return len(dAtA) - i, nil } func (m *HealthResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1950,28 +2651,34 @@ func (m *HealthResponse) Marshal() (dAtA []byte, err error) { } func (m *HealthResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HealthResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.UptimeDuration) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.UptimeDuration))) - i += copy(dAtA[i:], m.UptimeDuration) - } if m.UptimeNanoseconds != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintQuery(dAtA, i, uint64(m.UptimeNanoseconds)) + i-- + dAtA[i] = 0x10 + } + if len(m.UptimeDuration) > 0 { + i -= len(m.UptimeDuration) + copy(dAtA[i:], m.UptimeDuration) + i = encodeVarintQuery(dAtA, i, uint64(len(m.UptimeDuration))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *FetchRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1979,58 +2686,74 @@ func (m *FetchRequest) Marshal() (dAtA []byte, err error) { } func (m *FetchRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FetchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Start != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Start)) - } - if m.End != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.End)) + if m.Options != nil { + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } if m.Matchers != nil { - nn1, err := m.Matchers.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.Matchers.Size() + i -= size + if _, err := m.Matchers.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i += nn1 } - if m.Options != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Options.Size())) - n2, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 + if m.End != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.End)) + i-- + dAtA[i] = 0x10 + } + if m.Start != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Start)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *FetchRequest_TagMatchers) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FetchRequest_TagMatchers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.TagMatchers != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.TagMatchers.Size())) - n3, err := m.TagMatchers.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.TagMatchers.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x1a } - return i, nil + return len(dAtA) - i, nil } func (m *TagMatchers) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2038,29 +2761,36 @@ func (m *TagMatchers) Marshal() (dAtA []byte, err error) { } func (m *TagMatchers) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TagMatchers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.TagMatchers) > 0 { - for _, msg := range m.TagMatchers { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.TagMatchers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TagMatchers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *TagMatcher) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2068,34 +2798,41 @@ func (m *TagMatcher) Marshal() (dAtA []byte, err error) { } func (m *TagMatcher) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TagMatcher) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.Type != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x18 } if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Value) + copy(dAtA[i:], m.Value) i = encodeVarintQuery(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) + i-- + dAtA[i] = 0x12 } - if m.Type != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Type)) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *FetchOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2103,68 +2840,76 @@ func (m *FetchOptions) Marshal() (dAtA []byte, err error) { } func (m *FetchOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FetchOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Limit != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Limit)) + if len(m.Source) > 0 { + i -= len(m.Source) + copy(dAtA[i:], m.Source) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Source))) + i-- + dAtA[i] = 0x42 } - if m.Restrict != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Restrict.Size())) - n4, err := m.Restrict.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.IncludeResolution { + i-- + if m.IncludeResolution { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i += n4 + i-- + dAtA[i] = 0x38 } - if m.LookbackDuration != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.LookbackDuration)) - } - if m.Unaggregated != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Unaggregated)) + if m.AggregatedOptimized != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.AggregatedOptimized)) + i-- + dAtA[i] = 0x30 } if m.Aggregated != 0 { - dAtA[i] = 0x28 - i++ i = encodeVarintQuery(dAtA, i, uint64(m.Aggregated)) + i-- + dAtA[i] = 0x28 } - if m.AggregatedOptimized != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.AggregatedOptimized)) + if m.Unaggregated != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Unaggregated)) + i-- + dAtA[i] = 0x20 } - if m.IncludeResolution { - dAtA[i] = 0x38 - i++ - if m.IncludeResolution { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.LookbackDuration != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.LookbackDuration)) + i-- + dAtA[i] = 0x18 + } + if m.Restrict != nil { + { + size, err := m.Restrict.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i++ + i-- + dAtA[i] = 0x12 } - if len(m.Source) > 0 { - dAtA[i] = 0x42 - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.Source))) - i += copy(dAtA[i:], m.Source) + if m.Limit != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *RestrictQueryOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2172,37 +2917,46 @@ func (m *RestrictQueryOptions) Marshal() (dAtA []byte, err error) { } func (m *RestrictQueryOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RestrictQueryOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.RestrictQueryType != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.RestrictQueryType.Size())) - n5, err := m.RestrictQueryType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } if m.RestrictQueryTags != nil { + { + size, err := m.RestrictQueryTags.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x22 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.RestrictQueryTags.Size())) - n6, err := m.RestrictQueryTags.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if m.RestrictQueryType != nil { + { + size, err := m.RestrictQueryType.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n6 + i-- + dAtA[i] = 0x1a } - return i, nil + return len(dAtA) - i, nil } func (m *RestrictQueryType) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2210,32 +2964,39 @@ func (m *RestrictQueryType) Marshal() (dAtA []byte, err error) { } func (m *RestrictQueryType) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RestrictQueryType) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.MetricsType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.MetricsType)) - } if m.MetricsStoragePolicy != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.MetricsStoragePolicy.Size())) - n7, err := m.MetricsStoragePolicy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.MetricsStoragePolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n7 + i-- + dAtA[i] = 0x12 } - return i, nil + if m.MetricsType != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.MetricsType)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *RestrictQueryTags) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2243,35 +3004,43 @@ func (m *RestrictQueryTags) Marshal() (dAtA []byte, err error) { } func (m *RestrictQueryTags) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RestrictQueryTags) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Restrict != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Restrict.Size())) - n8, err := m.Restrict.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } if len(m.Strip) > 0 { - for _, b := range m.Strip { + for iNdEx := len(m.Strip) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Strip[iNdEx]) + copy(dAtA[i:], m.Strip[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Strip[iNdEx]))) + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) } } - return i, nil + if m.Restrict != nil { + { + size, err := m.Restrict.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *FetchResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2279,39 +3048,48 @@ func (m *FetchResponse) Marshal() (dAtA []byte, err error) { } func (m *FetchResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FetchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Series) > 0 { - for _, msg := range m.Series { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.Meta != nil { + { + size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - } - if m.Meta != nil { + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Meta.Size())) - n9, err := m.Meta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if len(m.Series) > 0 { + for iNdEx := len(m.Series) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Series[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - i += n9 } - return i, nil + return len(dAtA) - i, nil } func (m *Series) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2319,62 +3097,85 @@ func (m *Series) Marshal() (dAtA []byte, err error) { } func (m *Series) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Series) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Meta != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Meta.Size())) - n10, err := m.Meta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i += n10 } - if m.Value != nil { - nn11, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Meta != nil { + { + size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += nn11 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Series_Decompressed) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Series_Decompressed) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Decompressed != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Decompressed.Size())) - n12, err := m.Decompressed.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Decompressed.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n12 + i-- + dAtA[i] = 0x12 } - return i, nil + return len(dAtA) - i, nil } func (m *Series_Compressed) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Series_Compressed) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Compressed != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Compressed.Size())) - n13, err := m.Compressed.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Compressed.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n13 + i-- + dAtA[i] = 0x1a } - return i, nil + return len(dAtA) - i, nil } func (m *SeriesMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2382,33 +3183,39 @@ func (m *SeriesMetadata) Marshal() (dAtA []byte, err error) { } func (m *SeriesMetadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SeriesMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) + if m.EndTime != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EndTime)) + i-- + dAtA[i] = 0x18 } if m.StartTime != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintQuery(dAtA, i, uint64(m.StartTime)) + i-- + dAtA[i] = 0x10 } - if m.EndTime != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.EndTime)) + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *DecompressedSeries) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2416,41 +3223,50 @@ func (m *DecompressedSeries) Marshal() (dAtA []byte, err error) { } func (m *DecompressedSeries) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DecompressedSeries) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Datapoints) > 0 { - for _, msg := range m.Datapoints { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Tags) > 0 { + for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Tags[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if len(m.Tags) > 0 { - for _, msg := range m.Tags { - dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Datapoints) > 0 { + for iNdEx := len(m.Datapoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Datapoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *Datapoint) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2458,28 +3274,33 @@ func (m *Datapoint) Marshal() (dAtA []byte, err error) { } func (m *Datapoint) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Datapoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Timestamp != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Timestamp)) - } if m.Value != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) + i-- dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i += 8 } - return i, nil + if m.Timestamp != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *Tag) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2487,29 +3308,36 @@ func (m *Tag) Marshal() (dAtA []byte, err error) { } func (m *Tag) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Tag) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Value) + copy(dAtA[i:], m.Value) i = encodeVarintQuery(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *M3CompressedSeries) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2517,35 +3345,43 @@ func (m *M3CompressedSeries) Marshal() (dAtA []byte, err error) { } func (m *M3CompressedSeries) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *M3CompressedSeries) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.CompressedTags) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.CompressedTags))) - i += copy(dAtA[i:], m.CompressedTags) - } if len(m.Replicas) > 0 { - for _, msg := range m.Replicas { - dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Replicas) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Replicas[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - return i, nil + if len(m.CompressedTags) > 0 { + i -= len(m.CompressedTags) + copy(dAtA[i:], m.CompressedTags) + i = encodeVarintQuery(dAtA, i, uint64(len(m.CompressedTags))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *M3CompressedValuesReplica) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2553,29 +3389,36 @@ func (m *M3CompressedValuesReplica) Marshal() (dAtA []byte, err error) { } func (m *M3CompressedValuesReplica) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *M3CompressedValuesReplica) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Segments) > 0 { - for _, msg := range m.Segments { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Segments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Segments[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *M3Segments) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2583,39 +3426,48 @@ func (m *M3Segments) Marshal() (dAtA []byte, err error) { } func (m *M3Segments) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *M3Segments) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Merged != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Merged.Size())) - n14, err := m.Merged.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 - } if len(m.Unmerged) > 0 { - for _, msg := range m.Unmerged { + for iNdEx := len(m.Unmerged) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Unmerged[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + } + } + if m.Merged != nil { + { + size, err := m.Merged.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *M3Segment) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2623,44 +3475,51 @@ func (m *M3Segment) Marshal() (dAtA []byte, err error) { } func (m *M3Segment) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *M3Segment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Head) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.Head))) - i += copy(dAtA[i:], m.Head) + if m.Checksum != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Checksum)) + i-- + dAtA[i] = 0x28 } - if len(m.Tail) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.Tail))) - i += copy(dAtA[i:], m.Tail) + if m.BlockSize != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockSize)) + i-- + dAtA[i] = 0x20 } if m.StartTime != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintQuery(dAtA, i, uint64(m.StartTime)) + i-- + dAtA[i] = 0x18 } - if m.BlockSize != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.BlockSize)) + if len(m.Tail) > 0 { + i -= len(m.Tail) + copy(dAtA[i:], m.Tail) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Tail))) + i-- + dAtA[i] = 0x12 } - if m.Checksum != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Checksum)) + if len(m.Head) > 0 { + i -= len(m.Head) + copy(dAtA[i:], m.Head) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Head))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *SearchRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2668,58 +3527,74 @@ func (m *SearchRequest) Marshal() (dAtA []byte, err error) { } func (m *SearchRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Matchers != nil { - nn15, err := m.Matchers.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Options != nil { + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += nn15 - } - if m.Start != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Start)) + i-- + dAtA[i] = 0x22 } if m.End != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintQuery(dAtA, i, uint64(m.End)) + i-- + dAtA[i] = 0x18 } - if m.Options != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Options.Size())) - n16, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Start != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Start)) + i-- + dAtA[i] = 0x10 + } + if m.Matchers != nil { + { + size := m.Matchers.Size() + i -= size + if _, err := m.Matchers.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i += n16 } - return i, nil + return len(dAtA) - i, nil } func (m *SearchRequest_TagMatchers) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchRequest_TagMatchers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.TagMatchers != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.TagMatchers.Size())) - n17, err := m.TagMatchers.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.TagMatchers.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n17 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *M3TagProperty) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2727,29 +3602,36 @@ func (m *M3TagProperty) Marshal() (dAtA []byte, err error) { } func (m *M3TagProperty) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *M3TagProperty) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } if len(m.CompressedTags) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.CompressedTags) + copy(dAtA[i:], m.CompressedTags) i = encodeVarintQuery(dAtA, i, uint64(len(m.CompressedTags))) - i += copy(dAtA[i:], m.CompressedTags) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *M3TagProperties) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2757,29 +3639,36 @@ func (m *M3TagProperties) Marshal() (dAtA []byte, err error) { } func (m *M3TagProperties) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *M3TagProperties) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Properties) > 0 { - for _, msg := range m.Properties { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Properties) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Properties[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *TagProperty) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2787,29 +3676,36 @@ func (m *TagProperty) Marshal() (dAtA []byte, err error) { } func (m *TagProperty) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TagProperty) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } if len(m.Values) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Values) + copy(dAtA[i:], m.Values) i = encodeVarintQuery(dAtA, i, uint64(len(m.Values))) - i += copy(dAtA[i:], m.Values) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TagProperties) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2817,29 +3713,36 @@ func (m *TagProperties) Marshal() (dAtA []byte, err error) { } func (m *TagProperties) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TagProperties) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Properties) > 0 { - for _, msg := range m.Properties { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Properties) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Properties[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *SearchResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2847,62 +3750,85 @@ func (m *SearchResponse) Marshal() (dAtA []byte, err error) { } func (m *SearchResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Value != nil { - nn18, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn18 - } if m.Meta != nil { + { + size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x1a - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Meta.Size())) - n19, err := m.Meta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i += n19 } - return i, nil + return len(dAtA) - i, nil } func (m *SearchResponse_Decompressed) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchResponse_Decompressed) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Decompressed != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Decompressed.Size())) - n20, err := m.Decompressed.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Decompressed.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n20 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *SearchResponse_Compressed) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchResponse_Compressed) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Compressed != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Compressed.Size())) - n21, err := m.Compressed.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Compressed.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n21 + i-- + dAtA[i] = 0x12 } - return i, nil + return len(dAtA) - i, nil } func (m *CompleteTagsRequestOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2910,50 +3836,58 @@ func (m *CompleteTagsRequestOptions) Marshal() (dAtA []byte, err error) { } func (m *CompleteTagsRequestOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompleteTagsRequestOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Type)) - } - if len(m.FilterNameTags) > 0 { - for _, b := range m.FilterNameTags { - dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) + if m.Options != nil { + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - } - if m.Start != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Start)) + i-- + dAtA[i] = 0x2a } if m.End != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintQuery(dAtA, i, uint64(m.End)) + i-- + dAtA[i] = 0x20 } - if m.Options != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Options.Size())) - n22, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.Start != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Start)) + i-- + dAtA[i] = 0x18 + } + if len(m.FilterNameTags) > 0 { + for iNdEx := len(m.FilterNameTags) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FilterNameTags[iNdEx]) + copy(dAtA[i:], m.FilterNameTags[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.FilterNameTags[iNdEx]))) + i-- + dAtA[i] = 0x12 } - i += n22 } - return i, nil + if m.Type != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *CompleteTagsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2961,48 +3895,64 @@ func (m *CompleteTagsRequest) Marshal() (dAtA []byte, err error) { } func (m *CompleteTagsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompleteTagsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Matchers != nil { - nn23, err := m.Matchers.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn23 - } if m.Options != nil { + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Options.Size())) - n24, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if m.Matchers != nil { + { + size := m.Matchers.Size() + i -= size + if _, err := m.Matchers.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i += n24 } - return i, nil + return len(dAtA) - i, nil } func (m *CompleteTagsRequest_TagMatchers) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompleteTagsRequest_TagMatchers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.TagMatchers != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.TagMatchers.Size())) - n25, err := m.TagMatchers.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.TagMatchers.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n25 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *TagNames) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3010,25 +3960,31 @@ func (m *TagNames) Marshal() (dAtA []byte, err error) { } func (m *TagNames) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TagNames) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Names) > 0 { - for _, b := range m.Names { + for iNdEx := len(m.Names) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Names[iNdEx]) + copy(dAtA[i:], m.Names[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Names[iNdEx]))) + i-- dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) } } - return i, nil + return len(dAtA) - i, nil } func (m *TagValue) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3036,31 +3992,38 @@ func (m *TagValue) Marshal() (dAtA []byte, err error) { } func (m *TagValue) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TagValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } if len(m.Values) > 0 { - for _, b := range m.Values { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Values[iNdEx]) + copy(dAtA[i:], m.Values[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Values[iNdEx]))) + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) } } - return i, nil + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TagValues) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3068,29 +4031,36 @@ func (m *TagValues) Marshal() (dAtA []byte, err error) { } func (m *TagValues) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TagValues) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Values) > 0 { - for _, msg := range m.Values { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *CompleteTagsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3098,62 +4068,85 @@ func (m *CompleteTagsResponse) Marshal() (dAtA []byte, err error) { } func (m *CompleteTagsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompleteTagsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Value != nil { - nn26, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn26 - } if m.Meta != nil { + { + size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x1a - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Meta.Size())) - n27, err := m.Meta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i += n27 } - return i, nil + return len(dAtA) - i, nil } func (m *CompleteTagsResponse_Default) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompleteTagsResponse_Default) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Default != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.Default.Size())) - n28, err := m.Default.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Default.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n28 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *CompleteTagsResponse_NamesOnly) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompleteTagsResponse_NamesOnly) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.NamesOnly != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(m.NamesOnly.Size())) - n29, err := m.NamesOnly.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.NamesOnly.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n29 + i-- + dAtA[i] = 0x12 } - return i, nil + return len(dAtA) - i, nil } func (m *ResultMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3161,57 +4154,65 @@ func (m *ResultMetadata) Marshal() (dAtA []byte, err error) { } func (m *ResultMetadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResultMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Exhaustive { - dAtA[i] = 0x8 - i++ - if m.Exhaustive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Resolutions) > 0 { + dAtA25 := make([]byte, len(m.Resolutions)*10) + var j24 int + for _, num1 := range m.Resolutions { + num := uint64(num1) + for num >= 1<<7 { + dAtA25[j24] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j24++ + } + dAtA25[j24] = uint8(num) + j24++ } - i++ + i -= j24 + copy(dAtA[i:], dAtA25[:j24]) + i = encodeVarintQuery(dAtA, i, uint64(j24)) + i-- + dAtA[i] = 0x1a } if len(m.Warnings) > 0 { - for _, msg := range m.Warnings { - dAtA[i] = 0x12 - i++ - i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Warnings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if len(m.Resolutions) > 0 { - dAtA31 := make([]byte, len(m.Resolutions)*10) - var j30 int - for _, num1 := range m.Resolutions { - num := uint64(num1) - for num >= 1<<7 { - dAtA31[j30] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j30++ - } - dAtA31[j30] = uint8(num) - j30++ + if m.Exhaustive { + i-- + if m.Exhaustive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - dAtA[i] = 0x1a - i++ - i = encodeVarintQuery(dAtA, i, uint64(j30)) - i += copy(dAtA[i:], dAtA31[:j30]) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Warning) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -3219,41 +4220,56 @@ func (m *Warning) Marshal() (dAtA []byte, err error) { } func (m *Warning) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Warning) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if len(m.Message) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Message) + copy(dAtA[i:], m.Message) i = encodeVarintQuery(dAtA, i, uint64(len(m.Message))) - i += copy(dAtA[i:], m.Message) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *HealthRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l return n } func (m *HealthResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.UptimeDuration) @@ -3267,6 +4283,9 @@ func (m *HealthResponse) Size() (n int) { } func (m *FetchRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Start != 0 { @@ -3286,6 +4305,9 @@ func (m *FetchRequest) Size() (n int) { } func (m *FetchRequest_TagMatchers) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.TagMatchers != nil { @@ -3295,6 +4317,9 @@ func (m *FetchRequest_TagMatchers) Size() (n int) { return n } func (m *TagMatchers) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.TagMatchers) > 0 { @@ -3307,6 +4332,9 @@ func (m *TagMatchers) Size() (n int) { } func (m *TagMatcher) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -3324,6 +4352,9 @@ func (m *TagMatcher) Size() (n int) { } func (m *FetchOptions) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Limit != 0 { @@ -3356,6 +4387,9 @@ func (m *FetchOptions) Size() (n int) { } func (m *RestrictQueryOptions) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.RestrictQueryType != nil { @@ -3370,6 +4404,9 @@ func (m *RestrictQueryOptions) Size() (n int) { } func (m *RestrictQueryType) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.MetricsType != 0 { @@ -3383,6 +4420,9 @@ func (m *RestrictQueryType) Size() (n int) { } func (m *RestrictQueryTags) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Restrict != nil { @@ -3399,6 +4439,9 @@ func (m *RestrictQueryTags) Size() (n int) { } func (m *FetchResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Series) > 0 { @@ -3415,6 +4458,9 @@ func (m *FetchResponse) Size() (n int) { } func (m *Series) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Meta != nil { @@ -3428,6 +4474,9 @@ func (m *Series) Size() (n int) { } func (m *Series_Decompressed) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Decompressed != nil { @@ -3437,6 +4486,9 @@ func (m *Series_Decompressed) Size() (n int) { return n } func (m *Series_Compressed) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Compressed != nil { @@ -3446,6 +4498,9 @@ func (m *Series_Compressed) Size() (n int) { return n } func (m *SeriesMetadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Id) @@ -3462,6 +4517,9 @@ func (m *SeriesMetadata) Size() (n int) { } func (m *DecompressedSeries) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Datapoints) > 0 { @@ -3480,6 +4538,9 @@ func (m *DecompressedSeries) Size() (n int) { } func (m *Datapoint) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Timestamp != 0 { @@ -3492,6 +4553,9 @@ func (m *Datapoint) Size() (n int) { } func (m *Tag) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -3506,6 +4570,9 @@ func (m *Tag) Size() (n int) { } func (m *M3CompressedSeries) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.CompressedTags) @@ -3522,6 +4589,9 @@ func (m *M3CompressedSeries) Size() (n int) { } func (m *M3CompressedValuesReplica) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Segments) > 0 { @@ -3534,6 +4604,9 @@ func (m *M3CompressedValuesReplica) Size() (n int) { } func (m *M3Segments) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Merged != nil { @@ -3550,6 +4623,9 @@ func (m *M3Segments) Size() (n int) { } func (m *M3Segment) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Head) @@ -3573,6 +4649,9 @@ func (m *M3Segment) Size() (n int) { } func (m *SearchRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Matchers != nil { @@ -3592,6 +4671,9 @@ func (m *SearchRequest) Size() (n int) { } func (m *SearchRequest_TagMatchers) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.TagMatchers != nil { @@ -3601,6 +4683,9 @@ func (m *SearchRequest_TagMatchers) Size() (n int) { return n } func (m *M3TagProperty) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Id) @@ -3615,6 +4700,9 @@ func (m *M3TagProperty) Size() (n int) { } func (m *M3TagProperties) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Properties) > 0 { @@ -3627,6 +4715,9 @@ func (m *M3TagProperties) Size() (n int) { } func (m *TagProperty) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Key) @@ -3641,6 +4732,9 @@ func (m *TagProperty) Size() (n int) { } func (m *TagProperties) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Properties) > 0 { @@ -3653,6 +4747,9 @@ func (m *TagProperties) Size() (n int) { } func (m *SearchResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Value != nil { @@ -3666,6 +4763,9 @@ func (m *SearchResponse) Size() (n int) { } func (m *SearchResponse_Decompressed) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Decompressed != nil { @@ -3675,6 +4775,9 @@ func (m *SearchResponse_Decompressed) Size() (n int) { return n } func (m *SearchResponse_Compressed) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Compressed != nil { @@ -3684,6 +4787,9 @@ func (m *SearchResponse_Compressed) Size() (n int) { return n } func (m *CompleteTagsRequestOptions) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -3709,6 +4815,9 @@ func (m *CompleteTagsRequestOptions) Size() (n int) { } func (m *CompleteTagsRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Matchers != nil { @@ -3722,6 +4831,9 @@ func (m *CompleteTagsRequest) Size() (n int) { } func (m *CompleteTagsRequest_TagMatchers) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.TagMatchers != nil { @@ -3731,6 +4843,9 @@ func (m *CompleteTagsRequest_TagMatchers) Size() (n int) { return n } func (m *TagNames) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Names) > 0 { @@ -3743,6 +4858,9 @@ func (m *TagNames) Size() (n int) { } func (m *TagValue) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Key) @@ -3759,6 +4877,9 @@ func (m *TagValue) Size() (n int) { } func (m *TagValues) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Values) > 0 { @@ -3771,6 +4892,9 @@ func (m *TagValues) Size() (n int) { } func (m *CompleteTagsResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Value != nil { @@ -3784,6 +4908,9 @@ func (m *CompleteTagsResponse) Size() (n int) { } func (m *CompleteTagsResponse_Default) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Default != nil { @@ -3793,6 +4920,9 @@ func (m *CompleteTagsResponse_Default) Size() (n int) { return n } func (m *CompleteTagsResponse_NamesOnly) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.NamesOnly != nil { @@ -3802,6 +4932,9 @@ func (m *CompleteTagsResponse_NamesOnly) Size() (n int) { return n } func (m *ResultMetadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Exhaustive { @@ -3824,6 +4957,9 @@ func (m *ResultMetadata) Size() (n int) { } func (m *Warning) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -3838,14 +4974,7 @@ func (m *Warning) Size() (n int) { } func sovQuery(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -3865,7 +4994,7 @@ func (m *HealthRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3885,7 +5014,7 @@ func (m *HealthRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -3915,7 +5044,7 @@ func (m *HealthResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3943,7 +5072,7 @@ func (m *HealthResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3953,6 +5082,9 @@ func (m *HealthResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3972,7 +5104,7 @@ func (m *HealthResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.UptimeNanoseconds |= (int64(b) & 0x7F) << shift + m.UptimeNanoseconds |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -3983,7 +5115,7 @@ func (m *HealthResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -4013,7 +5145,7 @@ func (m *FetchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4041,7 +5173,7 @@ func (m *FetchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= (int64(b) & 0x7F) << shift + m.Start |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4060,7 +5192,7 @@ func (m *FetchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= (int64(b) & 0x7F) << shift + m.End |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4079,7 +5211,7 @@ func (m *FetchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4088,6 +5220,9 @@ func (m *FetchRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4111,7 +5246,7 @@ func (m *FetchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4120,6 +5255,9 @@ func (m *FetchRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4136,7 +5274,7 @@ func (m *FetchRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -4166,7 +5304,7 @@ func (m *TagMatchers) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4194,7 +5332,7 @@ func (m *TagMatchers) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4203,6 +5341,9 @@ func (m *TagMatchers) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4217,7 +5358,7 @@ func (m *TagMatchers) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -4247,7 +5388,7 @@ func (m *TagMatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4275,7 +5416,7 @@ func (m *TagMatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4284,6 +5425,9 @@ func (m *TagMatcher) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4306,7 +5450,7 @@ func (m *TagMatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4315,6 +5459,9 @@ func (m *TagMatcher) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4337,7 +5484,7 @@ func (m *TagMatcher) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (MatcherType(b) & 0x7F) << shift + m.Type |= MatcherType(b&0x7F) << shift if b < 0x80 { break } @@ -4348,7 +5495,7 @@ func (m *TagMatcher) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -4378,7 +5525,7 @@ func (m *FetchOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4406,7 +5553,7 @@ func (m *FetchOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Limit |= (int64(b) & 0x7F) << shift + m.Limit |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4425,7 +5572,7 @@ func (m *FetchOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4434,6 +5581,9 @@ func (m *FetchOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4458,7 +5608,7 @@ func (m *FetchOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LookbackDuration |= (int64(b) & 0x7F) << shift + m.LookbackDuration |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -4477,7 +5627,7 @@ func (m *FetchOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Unaggregated |= (FanoutOption(b) & 0x7F) << shift + m.Unaggregated |= FanoutOption(b&0x7F) << shift if b < 0x80 { break } @@ -4496,7 +5646,7 @@ func (m *FetchOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Aggregated |= (FanoutOption(b) & 0x7F) << shift + m.Aggregated |= FanoutOption(b&0x7F) << shift if b < 0x80 { break } @@ -4515,7 +5665,7 @@ func (m *FetchOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.AggregatedOptimized |= (FanoutOption(b) & 0x7F) << shift + m.AggregatedOptimized |= FanoutOption(b&0x7F) << shift if b < 0x80 { break } @@ -4534,7 +5684,7 @@ func (m *FetchOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4554,7 +5704,7 @@ func (m *FetchOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4563,6 +5713,9 @@ func (m *FetchOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4577,7 +5730,7 @@ func (m *FetchOptions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -4607,7 +5760,7 @@ func (m *RestrictQueryOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4635,7 +5788,7 @@ func (m *RestrictQueryOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4644,6 +5797,9 @@ func (m *RestrictQueryOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4668,7 +5824,7 @@ func (m *RestrictQueryOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4677,6 +5833,9 @@ func (m *RestrictQueryOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4693,7 +5852,7 @@ func (m *RestrictQueryOptions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -4723,7 +5882,7 @@ func (m *RestrictQueryType) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4751,7 +5910,7 @@ func (m *RestrictQueryType) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MetricsType |= (MetricsType(b) & 0x7F) << shift + m.MetricsType |= MetricsType(b&0x7F) << shift if b < 0x80 { break } @@ -4770,7 +5929,7 @@ func (m *RestrictQueryType) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4779,6 +5938,9 @@ func (m *RestrictQueryType) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4795,7 +5957,7 @@ func (m *RestrictQueryType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -4825,7 +5987,7 @@ func (m *RestrictQueryTags) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4853,7 +6015,7 @@ func (m *RestrictQueryTags) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4862,6 +6024,9 @@ func (m *RestrictQueryTags) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4886,7 +6051,7 @@ func (m *RestrictQueryTags) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4895,6 +6060,9 @@ func (m *RestrictQueryTags) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4907,7 +6075,7 @@ func (m *RestrictQueryTags) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -4937,7 +6105,7 @@ func (m *FetchResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4965,7 +6133,7 @@ func (m *FetchResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4974,6 +6142,9 @@ func (m *FetchResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4996,7 +6167,7 @@ func (m *FetchResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5005,6 +6176,9 @@ func (m *FetchResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5021,7 +6195,7 @@ func (m *FetchResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -5051,7 +6225,7 @@ func (m *Series) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5079,7 +6253,7 @@ func (m *Series) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5088,6 +6262,9 @@ func (m *Series) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5112,7 +6289,7 @@ func (m *Series) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5121,6 +6298,9 @@ func (m *Series) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5144,7 +6324,7 @@ func (m *Series) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5153,6 +6333,9 @@ func (m *Series) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5168,7 +6351,7 @@ func (m *Series) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -5198,7 +6381,7 @@ func (m *SeriesMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5226,7 +6409,7 @@ func (m *SeriesMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5235,6 +6418,9 @@ func (m *SeriesMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5257,7 +6443,7 @@ func (m *SeriesMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StartTime |= (int64(b) & 0x7F) << shift + m.StartTime |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -5276,7 +6462,7 @@ func (m *SeriesMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EndTime |= (int64(b) & 0x7F) << shift + m.EndTime |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -5287,7 +6473,7 @@ func (m *SeriesMetadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -5317,7 +6503,7 @@ func (m *DecompressedSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5345,7 +6531,7 @@ func (m *DecompressedSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5354,6 +6540,9 @@ func (m *DecompressedSeries) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5376,7 +6565,7 @@ func (m *DecompressedSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5385,6 +6574,9 @@ func (m *DecompressedSeries) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5399,7 +6591,7 @@ func (m *DecompressedSeries) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -5429,7 +6621,7 @@ func (m *Datapoint) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5457,7 +6649,7 @@ func (m *Datapoint) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Timestamp |= (int64(b) & 0x7F) << shift + m.Timestamp |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -5470,7 +6662,7 @@ func (m *Datapoint) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.Value = float64(math.Float64frombits(v)) default: @@ -5479,7 +6671,7 @@ func (m *Datapoint) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -5509,7 +6701,7 @@ func (m *Tag) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5537,7 +6729,7 @@ func (m *Tag) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5546,6 +6738,9 @@ func (m *Tag) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5568,7 +6763,7 @@ func (m *Tag) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5577,6 +6772,9 @@ func (m *Tag) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5591,7 +6789,7 @@ func (m *Tag) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -5621,7 +6819,7 @@ func (m *M3CompressedSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5649,7 +6847,7 @@ func (m *M3CompressedSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5658,6 +6856,9 @@ func (m *M3CompressedSeries) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5680,7 +6881,7 @@ func (m *M3CompressedSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5689,6 +6890,9 @@ func (m *M3CompressedSeries) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5703,7 +6907,7 @@ func (m *M3CompressedSeries) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -5733,7 +6937,7 @@ func (m *M3CompressedValuesReplica) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5761,7 +6965,7 @@ func (m *M3CompressedValuesReplica) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5770,6 +6974,9 @@ func (m *M3CompressedValuesReplica) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5784,7 +6991,7 @@ func (m *M3CompressedValuesReplica) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -5814,7 +7021,7 @@ func (m *M3Segments) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5842,7 +7049,7 @@ func (m *M3Segments) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5851,6 +7058,9 @@ func (m *M3Segments) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5875,7 +7085,7 @@ func (m *M3Segments) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5884,6 +7094,9 @@ func (m *M3Segments) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5898,7 +7111,7 @@ func (m *M3Segments) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -5928,7 +7141,7 @@ func (m *M3Segment) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -5956,7 +7169,7 @@ func (m *M3Segment) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5965,6 +7178,9 @@ func (m *M3Segment) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -5987,7 +7203,7 @@ func (m *M3Segment) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -5996,6 +7212,9 @@ func (m *M3Segment) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6018,7 +7237,7 @@ func (m *M3Segment) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StartTime |= (int64(b) & 0x7F) << shift + m.StartTime |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -6037,7 +7256,7 @@ func (m *M3Segment) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockSize |= (int64(b) & 0x7F) << shift + m.BlockSize |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -6056,7 +7275,7 @@ func (m *M3Segment) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Checksum |= (uint32(b) & 0x7F) << shift + m.Checksum |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -6067,7 +7286,7 @@ func (m *M3Segment) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -6097,7 +7316,7 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6125,7 +7344,7 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6134,6 +7353,9 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6157,7 +7379,7 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= (int64(b) & 0x7F) << shift + m.Start |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -6176,7 +7398,7 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= (int64(b) & 0x7F) << shift + m.End |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -6195,7 +7417,7 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6204,6 +7426,9 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6220,7 +7445,7 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -6250,7 +7475,7 @@ func (m *M3TagProperty) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6278,7 +7503,7 @@ func (m *M3TagProperty) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6287,6 +7512,9 @@ func (m *M3TagProperty) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6309,7 +7537,7 @@ func (m *M3TagProperty) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6318,6 +7546,9 @@ func (m *M3TagProperty) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6332,7 +7563,7 @@ func (m *M3TagProperty) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -6362,7 +7593,7 @@ func (m *M3TagProperties) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6390,7 +7621,7 @@ func (m *M3TagProperties) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6399,6 +7630,9 @@ func (m *M3TagProperties) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6413,7 +7647,7 @@ func (m *M3TagProperties) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -6443,7 +7677,7 @@ func (m *TagProperty) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6471,7 +7705,7 @@ func (m *TagProperty) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6480,6 +7714,9 @@ func (m *TagProperty) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6502,7 +7739,7 @@ func (m *TagProperty) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6511,6 +7748,9 @@ func (m *TagProperty) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6525,7 +7765,7 @@ func (m *TagProperty) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -6555,7 +7795,7 @@ func (m *TagProperties) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6583,7 +7823,7 @@ func (m *TagProperties) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6592,6 +7832,9 @@ func (m *TagProperties) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6606,7 +7849,7 @@ func (m *TagProperties) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -6636,7 +7879,7 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6664,7 +7907,7 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6673,6 +7916,9 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6696,7 +7942,7 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6705,6 +7951,9 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6728,7 +7977,7 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6737,6 +7986,9 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6753,7 +8005,7 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -6783,7 +8035,7 @@ func (m *CompleteTagsRequestOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6811,7 +8063,7 @@ func (m *CompleteTagsRequestOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (CompleteTagsType(b) & 0x7F) << shift + m.Type |= CompleteTagsType(b&0x7F) << shift if b < 0x80 { break } @@ -6830,7 +8082,7 @@ func (m *CompleteTagsRequestOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6839,6 +8091,9 @@ func (m *CompleteTagsRequestOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6859,7 +8114,7 @@ func (m *CompleteTagsRequestOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= (int64(b) & 0x7F) << shift + m.Start |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -6878,7 +8133,7 @@ func (m *CompleteTagsRequestOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= (int64(b) & 0x7F) << shift + m.End |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -6897,7 +8152,7 @@ func (m *CompleteTagsRequestOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6906,6 +8161,9 @@ func (m *CompleteTagsRequestOptions) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -6922,7 +8180,7 @@ func (m *CompleteTagsRequestOptions) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -6952,7 +8210,7 @@ func (m *CompleteTagsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6980,7 +8238,7 @@ func (m *CompleteTagsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -6989,6 +8247,9 @@ func (m *CompleteTagsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7012,7 +8273,7 @@ func (m *CompleteTagsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7021,6 +8282,9 @@ func (m *CompleteTagsRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7037,7 +8301,7 @@ func (m *CompleteTagsRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -7067,7 +8331,7 @@ func (m *TagNames) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7095,7 +8359,7 @@ func (m *TagNames) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7104,6 +8368,9 @@ func (m *TagNames) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7116,7 +8383,7 @@ func (m *TagNames) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -7146,7 +8413,7 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7174,7 +8441,7 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7183,6 +8450,9 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7205,7 +8475,7 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7214,6 +8484,9 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7226,7 +8499,7 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -7256,7 +8529,7 @@ func (m *TagValues) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7284,7 +8557,7 @@ func (m *TagValues) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7293,6 +8566,9 @@ func (m *TagValues) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7307,7 +8583,7 @@ func (m *TagValues) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -7337,7 +8613,7 @@ func (m *CompleteTagsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7365,7 +8641,7 @@ func (m *CompleteTagsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7374,6 +8650,9 @@ func (m *CompleteTagsResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7397,7 +8676,7 @@ func (m *CompleteTagsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7406,6 +8685,9 @@ func (m *CompleteTagsResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7429,7 +8711,7 @@ func (m *CompleteTagsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7438,6 +8720,9 @@ func (m *CompleteTagsResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7454,7 +8739,7 @@ func (m *CompleteTagsResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -7484,7 +8769,7 @@ func (m *ResultMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7512,7 +8797,7 @@ func (m *ResultMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7532,7 +8817,7 @@ func (m *ResultMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7541,6 +8826,9 @@ func (m *ResultMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7561,7 +8849,7 @@ func (m *ResultMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int64(b) & 0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -7578,7 +8866,7 @@ func (m *ResultMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7587,9 +8875,23 @@ func (m *ResultMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Resolutions) == 0 { + m.Resolutions = make([]int64, 0, elementCount) + } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { @@ -7601,7 +8903,7 @@ func (m *ResultMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int64(b) & 0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -7617,7 +8919,7 @@ func (m *ResultMetadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -7647,7 +8949,7 @@ func (m *Warning) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -7675,7 +8977,7 @@ func (m *Warning) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7684,6 +8986,9 @@ func (m *Warning) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7706,7 +9011,7 @@ func (m *Warning) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -7715,6 +9020,9 @@ func (m *Warning) Unmarshal(dAtA []byte) error { return ErrInvalidLengthQuery } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -7729,7 +9037,7 @@ func (m *Warning) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } if (iNdEx + skippy) > l { @@ -7747,6 +9055,7 @@ func (m *Warning) Unmarshal(dAtA []byte) error { func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -7778,10 +9087,8 @@ func skipQuery(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -7798,166 +9105,34 @@ func skipQuery(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthQuery } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - 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 := skipQuery(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/rpcpb/query.proto", fileDescriptorQuery) -} - -var fileDescriptorQuery = []byte{ - // 1679 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdb, 0x72, 0x1b, 0x49, - 0x19, 0xd6, 0x68, 0xac, 0xd3, 0xaf, 0x43, 0xe4, 0xb6, 0xd9, 0x28, 0x26, 0x18, 0xd5, 0x00, 0x8b, - 0xf1, 0x06, 0x2b, 0x91, 0xb3, 0x2c, 0x4b, 0x15, 0x07, 0x39, 0x52, 0x6c, 0xd7, 0xda, 0x92, 0xb7, - 0x35, 0x26, 0x81, 0x82, 0x32, 0xad, 0x51, 0x67, 0x3c, 0x65, 0xcd, 0x61, 0xe7, 0xb0, 0xac, 0xb7, - 0xb8, 0xe0, 0x9e, 0x1b, 0x8a, 0xe2, 0x09, 0xa0, 0xe0, 0x09, 0xf6, 0x11, 0xb8, 0xe0, 0x92, 0x47, - 0xa0, 0xc2, 0x0d, 0x8f, 0xb1, 0xd5, 0x3d, 0x3d, 0x27, 0xcd, 0xb8, 0x92, 0xca, 0xdd, 0xfc, 0xe7, - 0xfe, 0xff, 0xfe, 0xfa, 0xeb, 0x96, 0xe0, 0x67, 0xba, 0xe1, 0x5f, 0x07, 0x8b, 0x03, 0xcd, 0x36, - 0x07, 0xe6, 0xe1, 0x72, 0x31, 0x30, 0x0f, 0x07, 0x9e, 0xab, 0x0d, 0x3e, 0x0b, 0xa8, 0x7b, 0x3b, - 0xd0, 0xa9, 0x45, 0x5d, 0xe2, 0xd3, 0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f1, 0x63, 0xa8, 0x70, 0x62, 0x40, 0x29, 0x92, 0x88, 0x02, 0x50, 0x5a, - 0x15, 0xfa, 0x3f, 0x96, 0xd0, 0x21, 0x7b, 0xfe, 0x32, 0xba, 0x16, 0x45, 0x32, 0x17, 0xee, 0xce, - 0x56, 0x46, 0x17, 0x07, 0x4d, 0xa0, 0x95, 0xee, 0x08, 0xf5, 0xee, 0xe2, 0x85, 0x9d, 0x07, 0x05, - 0x96, 0x28, 0xcd, 0xd1, 0xfd, 0x7f, 0xbf, 0xde, 0x95, 0xfe, 0xf3, 0x7a, 0x57, 0xfa, 0xef, 0xeb, - 0x5d, 0xe9, 0xcf, 0xff, 0xdb, 0x2d, 0xfd, 0xba, 0xc2, 0xff, 0x23, 0x59, 0x54, 0xf9, 0x7f, 0x1a, - 0x87, 0x5f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x47, 0xd8, 0x5c, 0x60, 0x11, 0x00, 0x00, -} diff --git a/src/query/graphite/storage/series_metadata_map_new.go b/src/query/graphite/storage/series_metadata_map_new.go index 4a7cb3cee6..4445037154 100644 --- a/src/query/graphite/storage/series_metadata_map_new.go +++ b/src/query/graphite/storage/series_metadata_map_new.go @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -27,9 +27,9 @@ package storage import ( "bytes" - "github.com/m3db/m3/src/x/pool" - "github.com/cespare/xxhash/v2" + + "github.com/m3db/m3/src/x/pool" ) // Copyright (c) 2018 Uber Technologies, Inc. diff --git a/src/x/generated/proto/test/test.pb.go b/src/x/generated/proto/test/test.pb.go index 0801f51722..126d93ba1b 100644 --- a/src/x/generated/proto/test/test.pb.go +++ b/src/x/generated/proto/test/test.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/m3db/m3/src/x/generated/proto/test/test.proto -// Copyright (c) 2023 Uber Technologies, Inc. +// Copyright (c) 2024 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,27 +21,19 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* - Package m3_test is a generated protocol buffer package. - - It is generated from these files: - github.com/m3db/m3/src/x/generated/proto/test/test.proto - - It has these top-level messages: - Empty - PingRequest - PingResponse -*/ package m3_test -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import context "golang.org/x/net/context" -import grpc "google.golang.org/grpc" - -import io "io" +import ( + context "context" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -52,15 +44,43 @@ var _ = math.Inf // 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 +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Empty struct { } -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} } +func (m *Empty) Reset() { *m = Empty{} } +func (m *Empty) String() string { return proto.CompactTextString(m) } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { + return fileDescriptor_5e69330c79d6cb03, []int{0} +} +func (m *Empty) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Empty.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 *Empty) XXX_Merge(src proto.Message) { + xxx_messageInfo_Empty.Merge(m, src) +} +func (m *Empty) XXX_Size() int { + return m.Size() +} +func (m *Empty) XXX_DiscardUnknown() { + xxx_messageInfo_Empty.DiscardUnknown(m) +} + +var xxx_messageInfo_Empty proto.InternalMessageInfo type PingRequest struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` @@ -68,10 +88,38 @@ type PingRequest struct { ErrorCodeReturned uint32 `protobuf:"varint,3,opt,name=error_code_returned,json=errorCodeReturned,proto3" json:"error_code_returned,omitempty"` } -func (m *PingRequest) Reset() { *m = PingRequest{} } -func (m *PingRequest) String() string { return proto.CompactTextString(m) } -func (*PingRequest) ProtoMessage() {} -func (*PingRequest) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{1} } +func (m *PingRequest) Reset() { *m = PingRequest{} } +func (m *PingRequest) String() string { return proto.CompactTextString(m) } +func (*PingRequest) ProtoMessage() {} +func (*PingRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e69330c79d6cb03, []int{1} +} +func (m *PingRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PingRequest.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 *PingRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PingRequest.Merge(m, src) +} +func (m *PingRequest) XXX_Size() int { + return m.Size() +} +func (m *PingRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PingRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PingRequest proto.InternalMessageInfo func (m *PingRequest) GetValue() string { if m != nil { @@ -99,10 +147,38 @@ type PingResponse struct { Counter int32 `protobuf:"varint,2,opt,name=counter,proto3" json:"counter,omitempty"` } -func (m *PingResponse) Reset() { *m = PingResponse{} } -func (m *PingResponse) String() string { return proto.CompactTextString(m) } -func (*PingResponse) ProtoMessage() {} -func (*PingResponse) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{2} } +func (m *PingResponse) Reset() { *m = PingResponse{} } +func (m *PingResponse) String() string { return proto.CompactTextString(m) } +func (*PingResponse) ProtoMessage() {} +func (*PingResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e69330c79d6cb03, []int{2} +} +func (m *PingResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PingResponse.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 *PingResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PingResponse.Merge(m, src) +} +func (m *PingResponse) XXX_Size() int { + return m.Size() +} +func (m *PingResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PingResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PingResponse proto.InternalMessageInfo func (m *PingResponse) GetValue() string { if m != nil { @@ -124,6 +200,35 @@ func init() { proto.RegisterType((*PingResponse)(nil), "m3.test.PingResponse") } +func init() { + proto.RegisterFile("github.com/m3db/m3/src/x/generated/proto/test/test.proto", fileDescriptor_5e69330c79d6cb03) +} + +var fileDescriptor_5e69330c79d6cb03 = []byte{ + // 331 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x4f, 0x4b, 0xc3, 0x30, + 0x14, 0xc0, 0x1b, 0x75, 0xce, 0xbd, 0x39, 0xc1, 0x38, 0xa1, 0x78, 0x28, 0xa3, 0xa7, 0x9d, 0x1a, + 0xb1, 0x0a, 0x82, 0xe0, 0x41, 0xf1, 0xa6, 0x20, 0x75, 0x78, 0x2d, 0x5b, 0xfb, 0x98, 0x85, 0xa5, + 0xa9, 0x49, 0x3a, 0xf5, 0x5b, 0xf8, 0xb1, 0x3c, 0xee, 0xe8, 0x51, 0xd6, 0xab, 0x1f, 0x42, 0x92, + 0x55, 0x19, 0x83, 0x1d, 0xbc, 0x04, 0x7e, 0xef, 0x4f, 0x7e, 0x79, 0x2f, 0x70, 0x3e, 0xce, 0xf4, + 0x53, 0x39, 0x0a, 0x12, 0xc1, 0x19, 0x0f, 0xd3, 0x11, 0xe3, 0x21, 0x53, 0x32, 0x61, 0xaf, 0x6c, + 0x8c, 0x39, 0xca, 0xa1, 0xc6, 0x94, 0x15, 0x52, 0x68, 0xc1, 0x34, 0x2a, 0x6d, 0x8f, 0xc0, 0x32, + 0x6d, 0xf2, 0x30, 0x30, 0xe8, 0x37, 0xa1, 0x71, 0xc3, 0x0b, 0xfd, 0xe6, 0xbf, 0x40, 0xfb, 0x3e, + 0xcb, 0xc7, 0x11, 0x3e, 0x97, 0xa8, 0x34, 0xed, 0x42, 0x63, 0x3a, 0x9c, 0x94, 0xe8, 0x92, 0x1e, + 0xe9, 0xb7, 0xa2, 0x05, 0x50, 0x1f, 0x3a, 0x6a, 0x82, 0x58, 0xc4, 0x3a, 0xe3, 0x18, 0x73, 0xe5, + 0x6e, 0xf4, 0x48, 0xbf, 0x11, 0xb5, 0x6d, 0x70, 0x90, 0x71, 0xbc, 0x53, 0x34, 0x80, 0x03, 0x94, + 0x52, 0xc8, 0x38, 0x11, 0x29, 0xc6, 0x12, 0x75, 0x29, 0x73, 0x4c, 0xdd, 0xcd, 0x1e, 0xe9, 0x77, + 0xa2, 0x7d, 0x9b, 0xba, 0x16, 0x29, 0x46, 0x75, 0xc2, 0xbf, 0x84, 0xdd, 0x85, 0x58, 0x15, 0x22, + 0x57, 0x68, 0xcc, 0x8f, 0xcb, 0x66, 0x0b, 0xd4, 0x85, 0x66, 0x22, 0xca, 0x5c, 0xa3, 0xac, 0x9d, + 0xbf, 0x78, 0xf2, 0x4d, 0xa0, 0x3d, 0x40, 0xa5, 0x1f, 0x50, 0x4e, 0xb3, 0x04, 0xe9, 0x29, 0xb4, + 0xcc, 0x7d, 0x76, 0x2a, 0xba, 0x17, 0xd4, 0x83, 0x06, 0x96, 0x8f, 0x0e, 0xff, 0x78, 0xd9, 0xe9, + 0x3b, 0xf4, 0x0c, 0xb6, 0x4c, 0x84, 0x76, 0x57, 0x0a, 0xec, 0x36, 0xd6, 0xb7, 0x85, 0xb5, 0xcc, + 0x4c, 0xb5, 0xa6, 0x77, 0xe5, 0x09, 0xbe, 0x43, 0x2f, 0x60, 0xc7, 0x14, 0xdc, 0x66, 0x66, 0xcf, + 0xff, 0xf2, 0x1d, 0x93, 0x2b, 0xf7, 0x63, 0xee, 0x91, 0xd9, 0xdc, 0x23, 0x5f, 0x73, 0x8f, 0xbc, + 0x57, 0x9e, 0x33, 0xab, 0x3c, 0xe7, 0xb3, 0xf2, 0x9c, 0xd1, 0xb6, 0xfd, 0xda, 0xf0, 0x27, 0x00, + 0x00, 0xff, 0xff, 0x14, 0xdc, 0x2e, 0x4e, 0x16, 0x02, 0x00, 0x00, +} + // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn @@ -132,8 +237,9 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for TestService service - +// TestServiceClient is the client API for TestService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type TestServiceClient interface { PingEmpty(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PingResponse, error) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) @@ -151,7 +257,7 @@ func NewTestServiceClient(cc *grpc.ClientConn) TestServiceClient { func (c *testServiceClient) PingEmpty(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PingResponse, error) { out := new(PingResponse) - err := grpc.Invoke(ctx, "/m3.test.TestService/PingEmpty", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/m3.test.TestService/PingEmpty", in, out, opts...) if err != nil { return nil, err } @@ -160,7 +266,7 @@ func (c *testServiceClient) PingEmpty(ctx context.Context, in *Empty, opts ...gr func (c *testServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { out := new(PingResponse) - err := grpc.Invoke(ctx, "/m3.test.TestService/Ping", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/m3.test.TestService/Ping", in, out, opts...) if err != nil { return nil, err } @@ -169,7 +275,7 @@ func (c *testServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...g func (c *testServiceClient) PingError(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) - err := grpc.Invoke(ctx, "/m3.test.TestService/PingError", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/m3.test.TestService/PingError", in, out, opts...) if err != nil { return nil, err } @@ -177,7 +283,7 @@ func (c *testServiceClient) PingError(ctx context.Context, in *PingRequest, opts } func (c *testServiceClient) PingList(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (TestService_PingListClient, error) { - stream, err := grpc.NewClientStream(ctx, &_TestService_serviceDesc.Streams[0], c.cc, "/m3.test.TestService/PingList", opts...) + stream, err := c.cc.NewStream(ctx, &_TestService_serviceDesc.Streams[0], "/m3.test.TestService/PingList", opts...) if err != nil { return nil, err } @@ -208,8 +314,7 @@ func (x *testServicePingListClient) Recv() (*PingResponse, error) { return m, nil } -// Server API for TestService service - +// TestServiceServer is the server API for TestService service. type TestServiceServer interface { PingEmpty(context.Context, *Empty) (*PingResponse, error) Ping(context.Context, *PingRequest) (*PingResponse, error) @@ -217,6 +322,23 @@ type TestServiceServer interface { PingList(*PingRequest, TestService_PingListServer) error } +// UnimplementedTestServiceServer can be embedded to have forward compatible implementations. +type UnimplementedTestServiceServer struct { +} + +func (*UnimplementedTestServiceServer) PingEmpty(ctx context.Context, req *Empty) (*PingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PingEmpty not implemented") +} +func (*UnimplementedTestServiceServer) Ping(ctx context.Context, req *PingRequest) (*PingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} +func (*UnimplementedTestServiceServer) PingError(ctx context.Context, req *PingRequest) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method PingError not implemented") +} +func (*UnimplementedTestServiceServer) PingList(req *PingRequest, srv TestService_PingListServer) error { + return status.Errorf(codes.Unimplemented, "method PingList not implemented") +} + func RegisterTestServiceServer(s *grpc.Server, srv TestServiceServer) { s.RegisterService(&_TestService_serviceDesc, srv) } @@ -326,7 +448,7 @@ var _TestService_serviceDesc = grpc.ServiceDesc{ func (m *Empty) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -334,17 +456,22 @@ func (m *Empty) Marshal() (dAtA []byte, err error) { } func (m *Empty) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - return i, nil + return len(dAtA) - i, nil } func (m *PingRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -352,33 +479,39 @@ func (m *PingRequest) Marshal() (dAtA []byte, err error) { } func (m *PingRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Value) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTest(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) + if m.ErrorCodeReturned != 0 { + i = encodeVarintTest(dAtA, i, uint64(m.ErrorCodeReturned)) + i-- + dAtA[i] = 0x18 } if m.SleepTimeMs != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintTest(dAtA, i, uint64(m.SleepTimeMs)) + i-- + dAtA[i] = 0x10 } - if m.ErrorCodeReturned != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintTest(dAtA, i, uint64(m.ErrorCodeReturned)) + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintTest(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *PingResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -386,40 +519,54 @@ func (m *PingResponse) Marshal() (dAtA []byte, err error) { } func (m *PingResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Value) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTest(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) - } if m.Counter != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintTest(dAtA, i, uint64(m.Counter)) + i-- + dAtA[i] = 0x10 + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintTest(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintTest(dAtA []byte, offset int, v uint64) int { + offset -= sovTest(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Empty) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l return n } func (m *PingRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Value) @@ -436,6 +583,9 @@ func (m *PingRequest) Size() (n int) { } func (m *PingResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Value) @@ -449,14 +599,7 @@ func (m *PingResponse) Size() (n int) { } func sovTest(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTest(x uint64) (n int) { return sovTest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -476,7 +619,7 @@ func (m *Empty) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -496,7 +639,7 @@ func (m *Empty) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTest } if (iNdEx + skippy) > l { @@ -526,7 +669,7 @@ func (m *PingRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -554,7 +697,7 @@ func (m *PingRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -564,6 +707,9 @@ func (m *PingRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTest } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTest + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -583,7 +729,7 @@ func (m *PingRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SleepTimeMs |= (int32(b) & 0x7F) << shift + m.SleepTimeMs |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -602,7 +748,7 @@ func (m *PingRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ErrorCodeReturned |= (uint32(b) & 0x7F) << shift + m.ErrorCodeReturned |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -613,7 +759,7 @@ func (m *PingRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTest } if (iNdEx + skippy) > l { @@ -643,7 +789,7 @@ func (m *PingResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -671,7 +817,7 @@ func (m *PingResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -681,6 +827,9 @@ func (m *PingResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTest } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTest + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -700,7 +849,7 @@ func (m *PingResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Counter |= (int32(b) & 0x7F) << shift + m.Counter |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -711,7 +860,7 @@ func (m *PingResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTest } if (iNdEx + skippy) > l { @@ -729,6 +878,7 @@ func (m *PingResponse) Unmarshal(dAtA []byte) error { func skipTest(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -760,10 +910,8 @@ func skipTest(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -780,82 +928,34 @@ func skipTest(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthTest } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTest - } - 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 := skipTest(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTest + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthTest + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthTest = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTest = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthTest = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTest = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTest = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("github.com/m3db/m3/src/x/generated/proto/test/test.proto", fileDescriptorTest) -} - -var fileDescriptorTest = []byte{ - // 324 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x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 0xc9, 0x0c, 0xe3, 0x3a, 0x11, 0x5c, 0xc0, 0xf6, 0x5c, 0xac, 0x0b, 0x99, 0x6b, - 0xb4, 0xe6, 0x87, 0x45, 0xb3, 0x03, 0xea, 0x41, 0x2b, 0x95, 0x65, 0x6e, 0x50, 0xd5, 0xce, 0x5f, - 0x3c, 0xfe, 0x26, 0xd0, 0x19, 0xa2, 0x36, 0xf7, 0xa8, 0x66, 0x3c, 0x45, 0x7a, 0x02, 0x6d, 0x7b, - 0x9f, 0x9b, 0x8a, 0xee, 0x84, 0xf5, 0xa0, 0xa1, 0xe3, 0xc3, 0x83, 0x3f, 0x5e, 0x74, 0x06, 0x0d, - 0x7a, 0x0a, 0x1b, 0x36, 0x42, 0x7b, 0x4b, 0x05, 0x6e, 0x1b, 0xab, 0xdb, 0xa2, 0x5a, 0x66, 0xa7, - 0x5a, 0xd1, 0xbb, 0xf4, 0x84, 0xa0, 0x41, 0xcf, 0x61, 0xcb, 0x16, 0xdc, 0x70, 0xbb, 0xe7, 0x7f, - 0xf9, 0x8e, 0xc8, 0xe5, 0xee, 0x7b, 0xe5, 0x93, 0x8f, 0xca, 0x27, 0x9f, 0x95, 0x4f, 0xde, 0xbe, - 0xfc, 0xc6, 0x78, 0xd3, 0x7d, 0x69, 0xf4, 0x13, 0x00, 0x00, 0xff, 0xff, 0x6e, 0xfc, 0x96, 0xad, - 0x0e, 0x02, 0x00, 0x00, -} diff --git a/src/x/tls/servermode_enumer.go b/src/x/tls/servermode_enumer.go index 64ac5918b5..49da63c038 100644 --- a/src/x/tls/servermode_enumer.go +++ b/src/x/tls/servermode_enumer.go @@ -1,5 +1,25 @@ // Code generated by "enumer -type ServerMode -text"; DO NOT EDIT. +// Copyright (c) 2024 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + package tls import (