From 0bf1635ed99646d0e1fd3f70016a085cefd79fd9 Mon Sep 17 00:00:00 2001 From: Yang Song Date: Wed, 27 Sep 2023 16:03:01 -0400 Subject: [PATCH] Upgrade gogo/protobuf to v1.3.2 --- Rakefile | 10 +- go.mod | 2 +- go.sum | 34 +- gogen/agent_payload.pb.go | 2030 +++++++++++++++++++++++------------ pb/agent_logs_payload.pb.go | 321 +++--- 5 files changed, 1558 insertions(+), 839 deletions(-) diff --git a/Rakefile b/Rakefile index 34b757ca..a95e38a4 100644 --- a/Rakefile +++ b/Rakefile @@ -64,18 +64,18 @@ BASH mkdir -p #{gogo_dir}/src/github.com/gogo git clone https://github.com/gogo/protobuf.git #{gogo_dir}/src/github.com/gogo/protobuf - # Install v1.0.0 + # Install v1.3.2 pushd #{gogo_dir}/src/github.com/gogo/protobuf - git checkout v1.0.0 - GOBIN=/tmp/gogo-bin-v1.0.0 GOPATH=#{gogo_dir} make clean install + git checkout v1.3.2 + GOBIN=/tmp/gogo-bin-v1.3.2 GOPATH=#{gogo_dir} make clean install popd echo "Generating logs proto" - PATH=/tmp/gogo-bin-v1.0.0 #{protoc_binary} --proto_path=$GOPATH/src:#{gogo_dir}/src:. --gogofast_out=$GOPATH/src --java_out=java proto/logs/agent_logs_payload.proto + PATH=/tmp/gogo-bin-v1.3.2 #{protoc_binary} --proto_path=$GOPATH/src:#{gogo_dir}/src:. --gogofast_out=$GOPATH/src --java_out=java proto/logs/agent_logs_payload.proto echo "Generating metrics proto (go)" - PATH=/tmp/gogo-bin-v1.0.0 #{protoc_binary} --proto_path=$GOPATH/src:#{gogo_dir}/src:. --gogofast_out=$GOPATH/src proto/metrics/agent_payload.proto + PATH=/tmp/gogo-bin-v1.3.2 #{protoc_binary} --proto_path=$GOPATH/src:#{gogo_dir}/src:. --gogofast_out=$GOPATH/src proto/metrics/agent_payload.proto echo "Generating metrics proto (python)" #{protoc_binary} --proto_path=#{gogo_dir}/src:$GOPATH/src:./proto/metrics --python_out=python agent_payload.proto diff --git a/go.mod b/go.mod index 1e8ca98d..26e4d474 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/DataDog/mmh3 v0.0.0-20200805151601-30884ca2197a github.com/DataDog/zstd v1.4.8 github.com/DataDog/zstd_0 v0.0.0-20210310093942-586c1286621f - github.com/gogo/protobuf v1.0.0 + github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.0 github.com/stretchr/testify v1.3.0 google.golang.org/protobuf v1.28.1 diff --git a/go.sum b/go.sum index 90df693f..987fb54c 100644 --- a/go.sum +++ b/go.sum @@ -7,19 +7,47 @@ github.com/DataDog/zstd_0 v0.0.0-20210310093942-586c1286621f/go.mod h1:oXfOhM/Kr github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gogo/protobuf v1.0.0 h1:2jyBKDKU/8v3v2xVR2PtiWQviFUyiaGk2rpfyFT8rTM= -github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/gogen/agent_payload.pb.go b/gogen/agent_payload.pb.go index 741ad579..e9735bbd 100644 --- a/gogen/agent_payload.pb.go +++ b/gogen/agent_payload.pb.go @@ -1,28 +1,17 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/metrics/agent_payload.proto -/* - Package gogen is a generated protocol buffer package. - - It is generated from these files: - proto/metrics/agent_payload.proto - - It has these top-level messages: - CommonMetadata - MetricPayload - EventsPayload - SketchPayload -*/ package gogen -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 @@ -33,7 +22,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 MetricPayload_MetricType int32 @@ -50,6 +39,7 @@ var MetricPayload_MetricType_name = map[int32]string{ 2: "RATE", 3: "GAUGE", } + var MetricPayload_MetricType_value = map[string]int32{ "UNSPECIFIED": 0, "COUNT": 1, @@ -60,23 +50,55 @@ var MetricPayload_MetricType_value = map[string]int32{ func (x MetricPayload_MetricType) String() string { return proto.EnumName(MetricPayload_MetricType_name, int32(x)) } + func (MetricPayload_MetricType) EnumDescriptor() ([]byte, []int) { - return fileDescriptorAgentPayload, []int{1, 0} + return fileDescriptor_0063f25d3d575515, []int{1, 0} } type CommonMetadata struct { - AgentVersion string `protobuf:"bytes,1,opt,name=agent_version,json=agentVersion,proto3" json:"agent_version,omitempty"` - Timezone string `protobuf:"bytes,2,opt,name=timezone,proto3" json:"timezone,omitempty"` - CurrentEpoch float64 `protobuf:"fixed64,3,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"` - InternalIp string `protobuf:"bytes,4,opt,name=internal_ip,json=internalIp,proto3" json:"internal_ip,omitempty"` - PublicIp string `protobuf:"bytes,5,opt,name=public_ip,json=publicIp,proto3" json:"public_ip,omitempty"` - ApiKey string `protobuf:"bytes,6,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` + AgentVersion string `protobuf:"bytes,1,opt,name=agent_version,json=agentVersion,proto3" json:"agent_version,omitempty"` + Timezone string `protobuf:"bytes,2,opt,name=timezone,proto3" json:"timezone,omitempty"` + CurrentEpoch float64 `protobuf:"fixed64,3,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"` + InternalIp string `protobuf:"bytes,4,opt,name=internal_ip,json=internalIp,proto3" json:"internal_ip,omitempty"` + PublicIp string `protobuf:"bytes,5,opt,name=public_ip,json=publicIp,proto3" json:"public_ip,omitempty"` + ApiKey string `protobuf:"bytes,6,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CommonMetadata) Reset() { *m = CommonMetadata{} } +func (m *CommonMetadata) String() string { return proto.CompactTextString(m) } +func (*CommonMetadata) ProtoMessage() {} +func (*CommonMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_0063f25d3d575515, []int{0} +} +func (m *CommonMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommonMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommonMetadata.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 *CommonMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommonMetadata.Merge(m, src) +} +func (m *CommonMetadata) XXX_Size() int { + return m.Size() +} +func (m *CommonMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_CommonMetadata.DiscardUnknown(m) } -func (m *CommonMetadata) Reset() { *m = CommonMetadata{} } -func (m *CommonMetadata) String() string { return proto.CompactTextString(m) } -func (*CommonMetadata) ProtoMessage() {} -func (*CommonMetadata) Descriptor() ([]byte, []int) { return fileDescriptorAgentPayload, []int{0} } +var xxx_messageInfo_CommonMetadata proto.InternalMessageInfo func (m *CommonMetadata) GetAgentVersion() string { if m != nil { @@ -121,13 +143,44 @@ func (m *CommonMetadata) GetApiKey() string { } type MetricPayload struct { - Series []*MetricPayload_MetricSeries `protobuf:"bytes,1,rep,name=series" json:"series,omitempty"` + Series []*MetricPayload_MetricSeries `protobuf:"bytes,1,rep,name=series,proto3" json:"series,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetricPayload) Reset() { *m = MetricPayload{} } +func (m *MetricPayload) String() string { return proto.CompactTextString(m) } +func (*MetricPayload) ProtoMessage() {} +func (*MetricPayload) Descriptor() ([]byte, []int) { + return fileDescriptor_0063f25d3d575515, []int{1} +} +func (m *MetricPayload) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MetricPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MetricPayload.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 *MetricPayload) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetricPayload.Merge(m, src) +} +func (m *MetricPayload) XXX_Size() int { + return m.Size() +} +func (m *MetricPayload) XXX_DiscardUnknown() { + xxx_messageInfo_MetricPayload.DiscardUnknown(m) } -func (m *MetricPayload) Reset() { *m = MetricPayload{} } -func (m *MetricPayload) String() string { return proto.CompactTextString(m) } -func (*MetricPayload) ProtoMessage() {} -func (*MetricPayload) Descriptor() ([]byte, []int) { return fileDescriptorAgentPayload, []int{1} } +var xxx_messageInfo_MetricPayload proto.InternalMessageInfo func (m *MetricPayload) GetSeries() []*MetricPayload_MetricSeries { if m != nil { @@ -140,15 +193,44 @@ type MetricPayload_MetricPoint struct { // metric value Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` // timestamp for this value in seconds since the UNIX epoch - Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MetricPayload_MetricPoint) Reset() { *m = MetricPayload_MetricPoint{} } func (m *MetricPayload_MetricPoint) String() string { return proto.CompactTextString(m) } func (*MetricPayload_MetricPoint) ProtoMessage() {} func (*MetricPayload_MetricPoint) Descriptor() ([]byte, []int) { - return fileDescriptorAgentPayload, []int{1, 0} + return fileDescriptor_0063f25d3d575515, []int{1, 0} +} +func (m *MetricPayload_MetricPoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MetricPayload_MetricPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MetricPayload_MetricPoint.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 *MetricPayload_MetricPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetricPayload_MetricPoint.Merge(m, src) +} +func (m *MetricPayload_MetricPoint) XXX_Size() int { + return m.Size() } +func (m *MetricPayload_MetricPoint) XXX_DiscardUnknown() { + xxx_messageInfo_MetricPayload_MetricPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_MetricPayload_MetricPoint proto.InternalMessageInfo func (m *MetricPayload_MetricPoint) GetValue() float64 { if m != nil { @@ -165,17 +247,46 @@ func (m *MetricPayload_MetricPoint) GetTimestamp() int64 { } type MetricPayload_Resource struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MetricPayload_Resource) Reset() { *m = MetricPayload_Resource{} } func (m *MetricPayload_Resource) String() string { return proto.CompactTextString(m) } func (*MetricPayload_Resource) ProtoMessage() {} func (*MetricPayload_Resource) Descriptor() ([]byte, []int) { - return fileDescriptorAgentPayload, []int{1, 1} + return fileDescriptor_0063f25d3d575515, []int{1, 1} +} +func (m *MetricPayload_Resource) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MetricPayload_Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MetricPayload_Resource.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 *MetricPayload_Resource) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetricPayload_Resource.Merge(m, src) +} +func (m *MetricPayload_Resource) XXX_Size() int { + return m.Size() +} +func (m *MetricPayload_Resource) XXX_DiscardUnknown() { + xxx_messageInfo_MetricPayload_Resource.DiscardUnknown(m) } +var xxx_messageInfo_MetricPayload_Resource proto.InternalMessageInfo + func (m *MetricPayload_Resource) GetType() string { if m != nil { return m.Type @@ -193,13 +304,13 @@ func (m *MetricPayload_Resource) GetName() string { type MetricPayload_MetricSeries struct { // Resources this series applies to; include at least // { type="host", name= } - Resources []*MetricPayload_Resource `protobuf:"bytes,1,rep,name=resources" json:"resources,omitempty"` + Resources []*MetricPayload_Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` // metric name Metric string `protobuf:"bytes,2,opt,name=metric,proto3" json:"metric,omitempty"` // tags for this metric - Tags []string `protobuf:"bytes,3,rep,name=tags" json:"tags,omitempty"` + Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` // data points for this metric - Points []*MetricPayload_MetricPoint `protobuf:"bytes,4,rep,name=points" json:"points,omitempty"` + Points []*MetricPayload_MetricPoint `protobuf:"bytes,4,rep,name=points,proto3" json:"points,omitempty"` // type of metric Type MetricPayload_MetricType `protobuf:"varint,5,opt,name=type,proto3,enum=datadog.agentpayload.MetricPayload_MetricType" json:"type,omitempty"` // metric unit name @@ -207,15 +318,44 @@ type MetricPayload_MetricSeries struct { // source of this metric (check name, etc.) SourceTypeName string `protobuf:"bytes,7,opt,name=source_type_name,json=sourceTypeName,proto3" json:"source_type_name,omitempty"` // interval, in seconds, between samples of this metric - Interval int64 `protobuf:"varint,8,opt,name=interval,proto3" json:"interval,omitempty"` + Interval int64 `protobuf:"varint,8,opt,name=interval,proto3" json:"interval,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MetricPayload_MetricSeries) Reset() { *m = MetricPayload_MetricSeries{} } func (m *MetricPayload_MetricSeries) String() string { return proto.CompactTextString(m) } func (*MetricPayload_MetricSeries) ProtoMessage() {} func (*MetricPayload_MetricSeries) Descriptor() ([]byte, []int) { - return fileDescriptorAgentPayload, []int{1, 2} + return fileDescriptor_0063f25d3d575515, []int{1, 2} +} +func (m *MetricPayload_MetricSeries) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MetricPayload_MetricSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MetricPayload_MetricSeries.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 *MetricPayload_MetricSeries) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetricPayload_MetricSeries.Merge(m, src) +} +func (m *MetricPayload_MetricSeries) XXX_Size() int { + return m.Size() +} +func (m *MetricPayload_MetricSeries) XXX_DiscardUnknown() { + xxx_messageInfo_MetricPayload_MetricSeries.DiscardUnknown(m) +} + +var xxx_messageInfo_MetricPayload_MetricSeries proto.InternalMessageInfo func (m *MetricPayload_MetricSeries) GetResources() []*MetricPayload_Resource { if m != nil { @@ -274,14 +414,45 @@ func (m *MetricPayload_MetricSeries) GetInterval() int64 { } type EventsPayload struct { - Events []*EventsPayload_Event `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"` - Metadata *CommonMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` + Events []*EventsPayload_Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + Metadata *CommonMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EventsPayload) Reset() { *m = EventsPayload{} } +func (m *EventsPayload) String() string { return proto.CompactTextString(m) } +func (*EventsPayload) ProtoMessage() {} +func (*EventsPayload) Descriptor() ([]byte, []int) { + return fileDescriptor_0063f25d3d575515, []int{2} +} +func (m *EventsPayload) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventsPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventsPayload.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 *EventsPayload) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventsPayload.Merge(m, src) +} +func (m *EventsPayload) XXX_Size() int { + return m.Size() +} +func (m *EventsPayload) XXX_DiscardUnknown() { + xxx_messageInfo_EventsPayload.DiscardUnknown(m) } -func (m *EventsPayload) Reset() { *m = EventsPayload{} } -func (m *EventsPayload) String() string { return proto.CompactTextString(m) } -func (*EventsPayload) ProtoMessage() {} -func (*EventsPayload) Descriptor() ([]byte, []int) { return fileDescriptorAgentPayload, []int{2} } +var xxx_messageInfo_EventsPayload proto.InternalMessageInfo func (m *EventsPayload) GetEvents() []*EventsPayload_Event { if m != nil { @@ -298,24 +469,53 @@ func (m *EventsPayload) GetMetadata() *CommonMetadata { } type EventsPayload_Event struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` - Ts int64 `protobuf:"varint,3,opt,name=ts,proto3" json:"ts,omitempty"` - Priority string `protobuf:"bytes,4,opt,name=priority,proto3" json:"priority,omitempty"` - Host string `protobuf:"bytes,5,opt,name=host,proto3" json:"host,omitempty"` - Tags []string `protobuf:"bytes,6,rep,name=tags" json:"tags,omitempty"` - AlertType string `protobuf:"bytes,7,opt,name=alert_type,json=alertType,proto3" json:"alert_type,omitempty"` - AggregationKey string `protobuf:"bytes,8,opt,name=aggregation_key,json=aggregationKey,proto3" json:"aggregation_key,omitempty"` - SourceTypeName string `protobuf:"bytes,9,opt,name=source_type_name,json=sourceTypeName,proto3" json:"source_type_name,omitempty"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` + Ts int64 `protobuf:"varint,3,opt,name=ts,proto3" json:"ts,omitempty"` + Priority string `protobuf:"bytes,4,opt,name=priority,proto3" json:"priority,omitempty"` + Host string `protobuf:"bytes,5,opt,name=host,proto3" json:"host,omitempty"` + Tags []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"` + AlertType string `protobuf:"bytes,7,opt,name=alert_type,json=alertType,proto3" json:"alert_type,omitempty"` + AggregationKey string `protobuf:"bytes,8,opt,name=aggregation_key,json=aggregationKey,proto3" json:"aggregation_key,omitempty"` + SourceTypeName string `protobuf:"bytes,9,opt,name=source_type_name,json=sourceTypeName,proto3" json:"source_type_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *EventsPayload_Event) Reset() { *m = EventsPayload_Event{} } func (m *EventsPayload_Event) String() string { return proto.CompactTextString(m) } func (*EventsPayload_Event) ProtoMessage() {} func (*EventsPayload_Event) Descriptor() ([]byte, []int) { - return fileDescriptorAgentPayload, []int{2, 0} + return fileDescriptor_0063f25d3d575515, []int{2, 0} +} +func (m *EventsPayload_Event) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventsPayload_Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventsPayload_Event.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 *EventsPayload_Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventsPayload_Event.Merge(m, src) +} +func (m *EventsPayload_Event) XXX_Size() int { + return m.Size() +} +func (m *EventsPayload_Event) XXX_DiscardUnknown() { + xxx_messageInfo_EventsPayload_Event.DiscardUnknown(m) } +var xxx_messageInfo_EventsPayload_Event proto.InternalMessageInfo + func (m *EventsPayload_Event) GetTitle() string { if m != nil { return m.Title @@ -380,14 +580,45 @@ func (m *EventsPayload_Event) GetSourceTypeName() string { } type SketchPayload struct { - Sketches []SketchPayload_Sketch `protobuf:"bytes,1,rep,name=sketches" json:"sketches"` - Metadata CommonMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata"` + Sketches []SketchPayload_Sketch `protobuf:"bytes,1,rep,name=sketches,proto3" json:"sketches"` + Metadata CommonMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SketchPayload) Reset() { *m = SketchPayload{} } +func (m *SketchPayload) String() string { return proto.CompactTextString(m) } +func (*SketchPayload) ProtoMessage() {} +func (*SketchPayload) Descriptor() ([]byte, []int) { + return fileDescriptor_0063f25d3d575515, []int{3} +} +func (m *SketchPayload) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SketchPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SketchPayload.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 *SketchPayload) XXX_Merge(src proto.Message) { + xxx_messageInfo_SketchPayload.Merge(m, src) +} +func (m *SketchPayload) XXX_Size() int { + return m.Size() +} +func (m *SketchPayload) XXX_DiscardUnknown() { + xxx_messageInfo_SketchPayload.DiscardUnknown(m) } -func (m *SketchPayload) Reset() { *m = SketchPayload{} } -func (m *SketchPayload) String() string { return proto.CompactTextString(m) } -func (*SketchPayload) ProtoMessage() {} -func (*SketchPayload) Descriptor() ([]byte, []int) { return fileDescriptorAgentPayload, []int{3} } +var xxx_messageInfo_SketchPayload proto.InternalMessageInfo func (m *SketchPayload) GetSketches() []SketchPayload_Sketch { if m != nil { @@ -404,19 +635,48 @@ func (m *SketchPayload) GetMetadata() CommonMetadata { } type SketchPayload_Sketch struct { - Metric string `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"` - Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` - Distributions []SketchPayload_Sketch_Distribution `protobuf:"bytes,3,rep,name=distributions" json:"distributions"` - Tags []string `protobuf:"bytes,4,rep,name=tags" json:"tags,omitempty"` - Dogsketches []SketchPayload_Sketch_Dogsketch `protobuf:"bytes,7,rep,name=dogsketches" json:"dogsketches"` + Metric string `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"` + Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` + Distributions []SketchPayload_Sketch_Distribution `protobuf:"bytes,3,rep,name=distributions,proto3" json:"distributions"` + Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` + Dogsketches []SketchPayload_Sketch_Dogsketch `protobuf:"bytes,7,rep,name=dogsketches,proto3" json:"dogsketches"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SketchPayload_Sketch) Reset() { *m = SketchPayload_Sketch{} } func (m *SketchPayload_Sketch) String() string { return proto.CompactTextString(m) } func (*SketchPayload_Sketch) ProtoMessage() {} func (*SketchPayload_Sketch) Descriptor() ([]byte, []int) { - return fileDescriptorAgentPayload, []int{3, 0} + return fileDescriptor_0063f25d3d575515, []int{3, 0} +} +func (m *SketchPayload_Sketch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SketchPayload_Sketch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SketchPayload_Sketch.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 *SketchPayload_Sketch) XXX_Merge(src proto.Message) { + xxx_messageInfo_SketchPayload_Sketch.Merge(m, src) +} +func (m *SketchPayload_Sketch) XXX_Size() int { + return m.Size() } +func (m *SketchPayload_Sketch) XXX_DiscardUnknown() { + xxx_messageInfo_SketchPayload_Sketch.DiscardUnknown(m) +} + +var xxx_messageInfo_SketchPayload_Sketch proto.InternalMessageInfo func (m *SketchPayload_Sketch) GetMetric() string { if m != nil { @@ -454,25 +714,54 @@ func (m *SketchPayload_Sketch) GetDogsketches() []SketchPayload_Sketch_Dogsketch } type SketchPayload_Sketch_Distribution struct { - Ts int64 `protobuf:"varint,1,opt,name=ts,proto3" json:"ts,omitempty"` - Cnt int64 `protobuf:"varint,2,opt,name=cnt,proto3" json:"cnt,omitempty"` - Min float64 `protobuf:"fixed64,3,opt,name=min,proto3" json:"min,omitempty"` - Max float64 `protobuf:"fixed64,4,opt,name=max,proto3" json:"max,omitempty"` - Avg float64 `protobuf:"fixed64,5,opt,name=avg,proto3" json:"avg,omitempty"` - Sum float64 `protobuf:"fixed64,6,opt,name=sum,proto3" json:"sum,omitempty"` - V []float64 `protobuf:"fixed64,7,rep,packed,name=v" json:"v,omitempty"` - G []uint32 `protobuf:"varint,8,rep,packed,name=g" json:"g,omitempty"` - Delta []uint32 `protobuf:"varint,9,rep,packed,name=delta" json:"delta,omitempty"` - Buf []float64 `protobuf:"fixed64,10,rep,packed,name=buf" json:"buf,omitempty"` + Ts int64 `protobuf:"varint,1,opt,name=ts,proto3" json:"ts,omitempty"` + Cnt int64 `protobuf:"varint,2,opt,name=cnt,proto3" json:"cnt,omitempty"` + Min float64 `protobuf:"fixed64,3,opt,name=min,proto3" json:"min,omitempty"` + Max float64 `protobuf:"fixed64,4,opt,name=max,proto3" json:"max,omitempty"` + Avg float64 `protobuf:"fixed64,5,opt,name=avg,proto3" json:"avg,omitempty"` + Sum float64 `protobuf:"fixed64,6,opt,name=sum,proto3" json:"sum,omitempty"` + V []float64 `protobuf:"fixed64,7,rep,packed,name=v,proto3" json:"v,omitempty"` + G []uint32 `protobuf:"varint,8,rep,packed,name=g,proto3" json:"g,omitempty"` + Delta []uint32 `protobuf:"varint,9,rep,packed,name=delta,proto3" json:"delta,omitempty"` + Buf []float64 `protobuf:"fixed64,10,rep,packed,name=buf,proto3" json:"buf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SketchPayload_Sketch_Distribution) Reset() { *m = SketchPayload_Sketch_Distribution{} } func (m *SketchPayload_Sketch_Distribution) String() string { return proto.CompactTextString(m) } func (*SketchPayload_Sketch_Distribution) ProtoMessage() {} func (*SketchPayload_Sketch_Distribution) Descriptor() ([]byte, []int) { - return fileDescriptorAgentPayload, []int{3, 0, 0} + return fileDescriptor_0063f25d3d575515, []int{3, 0, 0} +} +func (m *SketchPayload_Sketch_Distribution) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SketchPayload_Sketch_Distribution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SketchPayload_Sketch_Distribution.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 *SketchPayload_Sketch_Distribution) XXX_Merge(src proto.Message) { + xxx_messageInfo_SketchPayload_Sketch_Distribution.Merge(m, src) +} +func (m *SketchPayload_Sketch_Distribution) XXX_Size() int { + return m.Size() +} +func (m *SketchPayload_Sketch_Distribution) XXX_DiscardUnknown() { + xxx_messageInfo_SketchPayload_Sketch_Distribution.DiscardUnknown(m) } +var xxx_messageInfo_SketchPayload_Sketch_Distribution proto.InternalMessageInfo + func (m *SketchPayload_Sketch_Distribution) GetTs() int64 { if m != nil { return m.Ts @@ -544,22 +833,51 @@ func (m *SketchPayload_Sketch_Distribution) GetBuf() []float64 { } type SketchPayload_Sketch_Dogsketch struct { - Ts int64 `protobuf:"varint,1,opt,name=ts,proto3" json:"ts,omitempty"` - Cnt int64 `protobuf:"varint,2,opt,name=cnt,proto3" json:"cnt,omitempty"` - Min float64 `protobuf:"fixed64,3,opt,name=min,proto3" json:"min,omitempty"` - Max float64 `protobuf:"fixed64,4,opt,name=max,proto3" json:"max,omitempty"` - Avg float64 `protobuf:"fixed64,5,opt,name=avg,proto3" json:"avg,omitempty"` - Sum float64 `protobuf:"fixed64,6,opt,name=sum,proto3" json:"sum,omitempty"` - K []int32 `protobuf:"zigzag32,7,rep,packed,name=k" json:"k,omitempty"` - N []uint32 `protobuf:"varint,8,rep,packed,name=n" json:"n,omitempty"` + Ts int64 `protobuf:"varint,1,opt,name=ts,proto3" json:"ts,omitempty"` + Cnt int64 `protobuf:"varint,2,opt,name=cnt,proto3" json:"cnt,omitempty"` + Min float64 `protobuf:"fixed64,3,opt,name=min,proto3" json:"min,omitempty"` + Max float64 `protobuf:"fixed64,4,opt,name=max,proto3" json:"max,omitempty"` + Avg float64 `protobuf:"fixed64,5,opt,name=avg,proto3" json:"avg,omitempty"` + Sum float64 `protobuf:"fixed64,6,opt,name=sum,proto3" json:"sum,omitempty"` + K []int32 `protobuf:"zigzag32,7,rep,packed,name=k,proto3" json:"k,omitempty"` + N []uint32 `protobuf:"varint,8,rep,packed,name=n,proto3" json:"n,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SketchPayload_Sketch_Dogsketch) Reset() { *m = SketchPayload_Sketch_Dogsketch{} } func (m *SketchPayload_Sketch_Dogsketch) String() string { return proto.CompactTextString(m) } func (*SketchPayload_Sketch_Dogsketch) ProtoMessage() {} func (*SketchPayload_Sketch_Dogsketch) Descriptor() ([]byte, []int) { - return fileDescriptorAgentPayload, []int{3, 0, 1} + return fileDescriptor_0063f25d3d575515, []int{3, 0, 1} +} +func (m *SketchPayload_Sketch_Dogsketch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SketchPayload_Sketch_Dogsketch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SketchPayload_Sketch_Dogsketch.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 *SketchPayload_Sketch_Dogsketch) XXX_Merge(src proto.Message) { + xxx_messageInfo_SketchPayload_Sketch_Dogsketch.Merge(m, src) +} +func (m *SketchPayload_Sketch_Dogsketch) XXX_Size() int { + return m.Size() +} +func (m *SketchPayload_Sketch_Dogsketch) XXX_DiscardUnknown() { + xxx_messageInfo_SketchPayload_Sketch_Dogsketch.DiscardUnknown(m) +} + +var xxx_messageInfo_SketchPayload_Sketch_Dogsketch proto.InternalMessageInfo func (m *SketchPayload_Sketch_Dogsketch) GetTs() int64 { if m != nil { @@ -618,6 +936,7 @@ func (m *SketchPayload_Sketch_Dogsketch) GetN() []uint32 { } func init() { + proto.RegisterEnum("datadog.agentpayload.MetricPayload_MetricType", MetricPayload_MetricType_name, MetricPayload_MetricType_value) proto.RegisterType((*CommonMetadata)(nil), "datadog.agentpayload.CommonMetadata") proto.RegisterType((*MetricPayload)(nil), "datadog.agentpayload.MetricPayload") proto.RegisterType((*MetricPayload_MetricPoint)(nil), "datadog.agentpayload.MetricPayload.MetricPoint") @@ -629,12 +948,79 @@ func init() { proto.RegisterType((*SketchPayload_Sketch)(nil), "datadog.agentpayload.SketchPayload.Sketch") proto.RegisterType((*SketchPayload_Sketch_Distribution)(nil), "datadog.agentpayload.SketchPayload.Sketch.Distribution") proto.RegisterType((*SketchPayload_Sketch_Dogsketch)(nil), "datadog.agentpayload.SketchPayload.Sketch.Dogsketch") - proto.RegisterEnum("datadog.agentpayload.MetricPayload_MetricType", MetricPayload_MetricType_name, MetricPayload_MetricType_value) } + +func init() { proto.RegisterFile("proto/metrics/agent_payload.proto", fileDescriptor_0063f25d3d575515) } + +var fileDescriptor_0063f25d3d575515 = []byte{ + // 967 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xdf, 0x89, 0x13, 0xd7, 0x7e, 0x69, 0xba, 0x61, 0xb4, 0x02, 0x2b, 0x40, 0xb7, 0x04, 0x24, + 0xb2, 0x88, 0x4d, 0x50, 0x00, 0xed, 0x09, 0x89, 0xfe, 0xc9, 0x96, 0xb6, 0x6c, 0x59, 0xb9, 0x2d, + 0x07, 0x84, 0x14, 0x4d, 0x92, 0x59, 0x77, 0xd4, 0xd8, 0x63, 0xd9, 0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(m *CommonMetadata) 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 } @@ -642,53 +1028,67 @@ func (m *CommonMetadata) Marshal() (dAtA []byte, err error) { } func (m *CommonMetadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommonMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.AgentVersion) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.AgentVersion))) - i += copy(dAtA[i:], m.AgentVersion) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Timezone) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Timezone))) - i += copy(dAtA[i:], m.Timezone) + if len(m.ApiKey) > 0 { + i -= len(m.ApiKey) + copy(dAtA[i:], m.ApiKey) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.ApiKey))) + i-- + dAtA[i] = 0x32 } - if m.CurrentEpoch != 0 { - dAtA[i] = 0x19 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CurrentEpoch)))) - i += 8 + if len(m.PublicIp) > 0 { + i -= len(m.PublicIp) + copy(dAtA[i:], m.PublicIp) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.PublicIp))) + i-- + dAtA[i] = 0x2a } if len(m.InternalIp) > 0 { - dAtA[i] = 0x22 - i++ + i -= len(m.InternalIp) + copy(dAtA[i:], m.InternalIp) i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.InternalIp))) - i += copy(dAtA[i:], m.InternalIp) + i-- + dAtA[i] = 0x22 } - if len(m.PublicIp) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.PublicIp))) - i += copy(dAtA[i:], m.PublicIp) + if m.CurrentEpoch != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CurrentEpoch)))) + i-- + dAtA[i] = 0x19 } - if len(m.ApiKey) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.ApiKey))) - i += copy(dAtA[i:], m.ApiKey) + if len(m.Timezone) > 0 { + i -= len(m.Timezone) + copy(dAtA[i:], m.Timezone) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Timezone))) + i-- + dAtA[i] = 0x12 + } + if len(m.AgentVersion) > 0 { + i -= len(m.AgentVersion) + copy(dAtA[i:], m.AgentVersion) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.AgentVersion))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *MetricPayload) 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 } @@ -696,29 +1096,40 @@ func (m *MetricPayload) Marshal() (dAtA []byte, err error) { } func (m *MetricPayload) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MetricPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Series) > 0 { - for _, msg := range m.Series { - dAtA[i] = 0xa - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + 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 = encodeVarintAgentPayload(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *MetricPayload_MetricPoint) 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,28 +1137,37 @@ func (m *MetricPayload_MetricPoint) Marshal() (dAtA []byte, err error) { } func (m *MetricPayload_MetricPoint) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MetricPayload_MetricPoint) 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.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Timestamp != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintAgentPayload(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 *MetricPayload_Resource) 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 } @@ -755,29 +1175,40 @@ func (m *MetricPayload_Resource) Marshal() (dAtA []byte, err error) { } func (m *MetricPayload_Resource) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MetricPayload_Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Type) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Name) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Name) + copy(dAtA[i:], m.Name) i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + i-- + dAtA[i] = 0x12 + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *MetricPayload_MetricSeries) 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 } @@ -785,84 +1216,94 @@ func (m *MetricPayload_MetricSeries) Marshal() (dAtA []byte, err error) { } func (m *MetricPayload_MetricSeries) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MetricPayload_MetricSeries) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Resources) > 0 { - for _, msg := range m.Resources { - dAtA[i] = 0xa - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Metric) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Metric))) - i += copy(dAtA[i:], m.Metric) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Tags) > 0 { - for _, s := range m.Tags { - dAtA[i] = 0x1a - 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.Interval != 0 { + i = encodeVarintAgentPayload(dAtA, i, uint64(m.Interval)) + i-- + dAtA[i] = 0x40 } - if len(m.Points) > 0 { - for _, msg := range m.Points { - dAtA[i] = 0x22 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if len(m.SourceTypeName) > 0 { + i -= len(m.SourceTypeName) + copy(dAtA[i:], m.SourceTypeName) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.SourceTypeName))) + i-- + dAtA[i] = 0x3a + } + if len(m.Unit) > 0 { + i -= len(m.Unit) + copy(dAtA[i:], m.Unit) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Unit))) + i-- + dAtA[i] = 0x32 } if m.Type != 0 { - dAtA[i] = 0x28 - i++ i = encodeVarintAgentPayload(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x28 } - if len(m.Unit) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Unit))) - i += copy(dAtA[i:], m.Unit) + if len(m.Points) > 0 { + for iNdEx := len(m.Points) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Points[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAgentPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } } - if len(m.SourceTypeName) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.SourceTypeName))) - i += copy(dAtA[i:], m.SourceTypeName) + 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 = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Tags[iNdEx]))) + i-- + dAtA[i] = 0x1a + } } - if m.Interval != 0 { - dAtA[i] = 0x40 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(m.Interval)) + if len(m.Metric) > 0 { + i -= len(m.Metric) + copy(dAtA[i:], m.Metric) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Metric))) + i-- + dAtA[i] = 0x12 + } + if len(m.Resources) > 0 { + for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAgentPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *EventsPayload) 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 } @@ -870,39 +1311,52 @@ func (m *EventsPayload) Marshal() (dAtA []byte, err error) { } func (m *EventsPayload) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventsPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Events) > 0 { - for _, msg := range m.Events { - dAtA[i] = 0xa - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintAgentPayload(dAtA, i, uint64(size)) } - } - if m.Metadata != nil { + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(m.Metadata.Size())) - n1, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAgentPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - i += n1 } - return i, nil + return len(dAtA) - i, nil } func (m *EventsPayload_Event) 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 } @@ -910,79 +1364,89 @@ func (m *EventsPayload_Event) Marshal() (dAtA []byte, err error) { } func (m *EventsPayload_Event) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventsPayload_Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Title) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Title))) - i += copy(dAtA[i:], m.Title) - } - if len(m.Text) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Text))) - i += copy(dAtA[i:], m.Text) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Ts != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(m.Ts)) + if len(m.SourceTypeName) > 0 { + i -= len(m.SourceTypeName) + copy(dAtA[i:], m.SourceTypeName) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.SourceTypeName))) + i-- + dAtA[i] = 0x4a } - if len(m.Priority) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Priority))) - i += copy(dAtA[i:], m.Priority) + if len(m.AggregationKey) > 0 { + i -= len(m.AggregationKey) + copy(dAtA[i:], m.AggregationKey) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.AggregationKey))) + i-- + dAtA[i] = 0x42 } - if len(m.Host) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Host))) - i += copy(dAtA[i:], m.Host) + if len(m.AlertType) > 0 { + i -= len(m.AlertType) + copy(dAtA[i:], m.AlertType) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.AlertType))) + i-- + dAtA[i] = 0x3a } 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 = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Tags[iNdEx]))) + i-- dAtA[i] = 0x32 - 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.AlertType) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.AlertType))) - i += copy(dAtA[i:], m.AlertType) + if len(m.Host) > 0 { + i -= len(m.Host) + copy(dAtA[i:], m.Host) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Host))) + i-- + dAtA[i] = 0x2a } - if len(m.AggregationKey) > 0 { - dAtA[i] = 0x42 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.AggregationKey))) - i += copy(dAtA[i:], m.AggregationKey) + if len(m.Priority) > 0 { + i -= len(m.Priority) + copy(dAtA[i:], m.Priority) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Priority))) + i-- + dAtA[i] = 0x22 } - if len(m.SourceTypeName) > 0 { - dAtA[i] = 0x4a - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.SourceTypeName))) - i += copy(dAtA[i:], m.SourceTypeName) + if m.Ts != 0 { + i = encodeVarintAgentPayload(dAtA, i, uint64(m.Ts)) + i-- + dAtA[i] = 0x18 + } + if len(m.Text) > 0 { + i -= len(m.Text) + copy(dAtA[i:], m.Text) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Text))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *SketchPayload) 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 } @@ -990,37 +1454,50 @@ func (m *SketchPayload) Marshal() (dAtA []byte, err error) { } func (m *SketchPayload) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SketchPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Sketches) > 0 { - for _, msg := range m.Sketches { - dAtA[i] = 0xa - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintAgentPayload(dAtA, i, uint64(size)) } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(m.Metadata.Size())) - n2, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Sketches) > 0 { + for iNdEx := len(m.Sketches) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Sketches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAgentPayload(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - i += n2 - return i, nil + return len(dAtA) - i, nil } func (m *SketchPayload_Sketch) 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 } @@ -1028,68 +1505,77 @@ func (m *SketchPayload_Sketch) Marshal() (dAtA []byte, err error) { } func (m *SketchPayload_Sketch) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SketchPayload_Sketch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Metric) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Metric))) - i += copy(dAtA[i:], m.Metric) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Host) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Host))) - i += copy(dAtA[i:], m.Host) - } - if len(m.Distributions) > 0 { - for _, msg := range m.Distributions { - dAtA[i] = 0x1a - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Dogsketches) > 0 { + for iNdEx := len(m.Dogsketches) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Dogsketches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAgentPayload(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x3a } } 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 = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Tags[iNdEx]))) + i-- 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 len(m.Dogsketches) > 0 { - for _, msg := range m.Dogsketches { - dAtA[i] = 0x3a - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Distributions) > 0 { + for iNdEx := len(m.Distributions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Distributions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAgentPayload(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x1a } } - return i, nil + if len(m.Host) > 0 { + i -= len(m.Host) + copy(dAtA[i:], m.Host) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Host))) + i-- + dAtA[i] = 0x12 + } + if len(m.Metric) > 0 { + i -= len(m.Metric) + copy(dAtA[i:], m.Metric) + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Metric))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *SketchPayload_Sketch_Distribution) 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 } @@ -1097,58 +1583,33 @@ func (m *SketchPayload_Sketch_Distribution) Marshal() (dAtA []byte, err error) { } func (m *SketchPayload_Sketch_Distribution) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SketchPayload_Sketch_Distribution) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Ts != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(m.Ts)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Cnt != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(m.Cnt)) - } - if m.Min != 0 { - dAtA[i] = 0x19 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min)))) - i += 8 - } - if m.Max != 0 { - dAtA[i] = 0x21 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) - i += 8 - } - if m.Avg != 0 { - dAtA[i] = 0x29 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Avg)))) - i += 8 - } - if m.Sum != 0 { - dAtA[i] = 0x31 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) - i += 8 - } - if len(m.V) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.V)*8)) - for _, num := range m.V { - f3 := math.Float64bits(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f3)) - i += 8 + if len(m.Buf) > 0 { + for iNdEx := len(m.Buf) - 1; iNdEx >= 0; iNdEx-- { + f3 := math.Float64bits(float64(m.Buf[iNdEx])) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f3)) } + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Buf)*8)) + i-- + dAtA[i] = 0x52 } - if len(m.G) > 0 { - dAtA5 := make([]byte, len(m.G)*10) + if len(m.Delta) > 0 { + dAtA5 := make([]byte, len(m.Delta)*10) var j4 int - for _, num := range m.G { + for _, num := range m.Delta { for num >= 1<<7 { dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -1157,15 +1618,16 @@ func (m *SketchPayload_Sketch_Distribution) MarshalTo(dAtA []byte) (int, error) dAtA5[j4] = uint8(num) j4++ } - dAtA[i] = 0x42 - i++ + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) i = encodeVarintAgentPayload(dAtA, i, uint64(j4)) - i += copy(dAtA[i:], dAtA5[:j4]) + i-- + dAtA[i] = 0x4a } - if len(m.Delta) > 0 { - dAtA7 := make([]byte, len(m.Delta)*10) + if len(m.G) > 0 { + dAtA7 := make([]byte, len(m.G)*10) var j6 int - for _, num := range m.Delta { + for _, num := range m.G { for num >= 1<<7 { dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -1174,121 +1636,172 @@ func (m *SketchPayload_Sketch_Distribution) MarshalTo(dAtA []byte) (int, error) dAtA7[j6] = uint8(num) j6++ } - dAtA[i] = 0x4a - i++ + i -= j6 + copy(dAtA[i:], dAtA7[:j6]) i = encodeVarintAgentPayload(dAtA, i, uint64(j6)) - i += copy(dAtA[i:], dAtA7[:j6]) + i-- + dAtA[i] = 0x42 } - if len(m.Buf) > 0 { - dAtA[i] = 0x52 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.Buf)*8)) - for _, num := range m.Buf { - f8 := math.Float64bits(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f8)) - i += 8 + if len(m.V) > 0 { + for iNdEx := len(m.V) - 1; iNdEx >= 0; iNdEx-- { + f8 := math.Float64bits(float64(m.V[iNdEx])) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f8)) } + i = encodeVarintAgentPayload(dAtA, i, uint64(len(m.V)*8)) + i-- + dAtA[i] = 0x3a + } + if m.Sum != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) + i-- + dAtA[i] = 0x31 + } + if m.Avg != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Avg)))) + i-- + dAtA[i] = 0x29 + } + if m.Max != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) + i-- + dAtA[i] = 0x21 + } + if m.Min != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min)))) + i-- + dAtA[i] = 0x19 + } + if m.Cnt != 0 { + i = encodeVarintAgentPayload(dAtA, i, uint64(m.Cnt)) + i-- + dAtA[i] = 0x10 + } + if m.Ts != 0 { + i = encodeVarintAgentPayload(dAtA, i, uint64(m.Ts)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *SketchPayload_Sketch_Dogsketch) 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 } return dAtA[:n], nil } - -func (m *SketchPayload_Sketch_Dogsketch) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Ts != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(m.Ts)) - } - if m.Cnt != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(m.Cnt)) - } - if m.Min != 0 { - dAtA[i] = 0x19 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min)))) - i += 8 - } - if m.Max != 0 { - dAtA[i] = 0x21 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) - i += 8 - } - if m.Avg != 0 { - dAtA[i] = 0x29 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Avg)))) - i += 8 - } - if m.Sum != 0 { - dAtA[i] = 0x31 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) - i += 8 - } - if len(m.K) > 0 { - dAtA9 := make([]byte, len(m.K)*5) - var j10 int - for _, num := range m.K { - x11 := (uint32(num) << 1) ^ uint32((num >> 31)) - for x11 >= 1<<7 { - dAtA9[j10] = uint8(uint64(x11)&0x7f | 0x80) - j10++ - x11 >>= 7 - } - dAtA9[j10] = uint8(x11) - j10++ - } - dAtA[i] = 0x3a - i++ - i = encodeVarintAgentPayload(dAtA, i, uint64(j10)) - i += copy(dAtA[i:], dAtA9[:j10]) + +func (m *SketchPayload_Sketch_Dogsketch) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SketchPayload_Sketch_Dogsketch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.N) > 0 { - dAtA13 := make([]byte, len(m.N)*10) - var j12 int + dAtA10 := make([]byte, len(m.N)*10) + var j9 int for _, num := range m.N { for num >= 1<<7 { - dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) + dAtA10[j9] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 + j9++ + } + dAtA10[j9] = uint8(num) + j9++ + } + i -= j9 + copy(dAtA[i:], dAtA10[:j9]) + i = encodeVarintAgentPayload(dAtA, i, uint64(j9)) + i-- + dAtA[i] = 0x42 + } + if len(m.K) > 0 { + dAtA11 := make([]byte, len(m.K)*5) + var j12 int + for _, num := range m.K { + x13 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x13 >= 1<<7 { + dAtA11[j12] = uint8(uint64(x13)&0x7f | 0x80) j12++ + x13 >>= 7 } - dAtA13[j12] = uint8(num) + dAtA11[j12] = uint8(x13) j12++ } - dAtA[i] = 0x42 - i++ + i -= j12 + copy(dAtA[i:], dAtA11[:j12]) i = encodeVarintAgentPayload(dAtA, i, uint64(j12)) - i += copy(dAtA[i:], dAtA13[:j12]) + i-- + dAtA[i] = 0x3a + } + if m.Sum != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) + i-- + dAtA[i] = 0x31 + } + if m.Avg != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Avg)))) + i-- + dAtA[i] = 0x29 + } + if m.Max != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) + i-- + dAtA[i] = 0x21 + } + if m.Min != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min)))) + i-- + dAtA[i] = 0x19 + } + if m.Cnt != 0 { + i = encodeVarintAgentPayload(dAtA, i, uint64(m.Cnt)) + i-- + dAtA[i] = 0x10 + } + if m.Ts != 0 { + i = encodeVarintAgentPayload(dAtA, i, uint64(m.Ts)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintAgentPayload(dAtA []byte, offset int, v uint64) int { + offset -= sovAgentPayload(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 *CommonMetadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.AgentVersion) @@ -1314,10 +1827,16 @@ func (m *CommonMetadata) Size() (n int) { if l > 0 { n += 1 + l + sovAgentPayload(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *MetricPayload) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Series) > 0 { @@ -1326,10 +1845,16 @@ func (m *MetricPayload) Size() (n int) { n += 1 + l + sovAgentPayload(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *MetricPayload_MetricPoint) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Value != 0 { @@ -1338,10 +1863,16 @@ func (m *MetricPayload_MetricPoint) Size() (n int) { if m.Timestamp != 0 { n += 1 + sovAgentPayload(uint64(m.Timestamp)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *MetricPayload_Resource) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Type) @@ -1352,10 +1883,16 @@ func (m *MetricPayload_Resource) Size() (n int) { if l > 0 { n += 1 + l + sovAgentPayload(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *MetricPayload_MetricSeries) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Resources) > 0 { @@ -1394,10 +1931,16 @@ func (m *MetricPayload_MetricSeries) Size() (n int) { if m.Interval != 0 { n += 1 + sovAgentPayload(uint64(m.Interval)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *EventsPayload) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Events) > 0 { @@ -1410,10 +1953,16 @@ func (m *EventsPayload) Size() (n int) { l = m.Metadata.Size() n += 1 + l + sovAgentPayload(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *EventsPayload_Event) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Title) @@ -1453,10 +2002,16 @@ func (m *EventsPayload_Event) Size() (n int) { if l > 0 { n += 1 + l + sovAgentPayload(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *SketchPayload) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Sketches) > 0 { @@ -1467,10 +2022,16 @@ func (m *SketchPayload) Size() (n int) { } l = m.Metadata.Size() n += 1 + l + sovAgentPayload(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *SketchPayload_Sketch) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Metric) @@ -1499,10 +2060,16 @@ func (m *SketchPayload_Sketch) Size() (n int) { n += 1 + l + sovAgentPayload(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *SketchPayload_Sketch_Distribution) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Ts != 0 { @@ -1543,10 +2110,16 @@ func (m *SketchPayload_Sketch_Distribution) Size() (n int) { if len(m.Buf) > 0 { n += 1 + sovAgentPayload(uint64(len(m.Buf)*8)) + len(m.Buf)*8 } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *SketchPayload_Sketch_Dogsketch) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Ts != 0 { @@ -1581,18 +2154,14 @@ func (m *SketchPayload_Sketch_Dogsketch) Size() (n int) { } n += 1 + sovAgentPayload(uint64(l)) + l } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func sovAgentPayload(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozAgentPayload(x uint64) (n int) { return sovAgentPayload(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1612,7 +2181,7 @@ func (m *CommonMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1640,7 +2209,7 @@ func (m *CommonMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1650,6 +2219,9 @@ func (m *CommonMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1669,7 +2241,7 @@ func (m *CommonMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1679,6 +2251,9 @@ func (m *CommonMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1692,7 +2267,7 @@ func (m *CommonMetadata) 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.CurrentEpoch = float64(math.Float64frombits(v)) case 4: @@ -1709,7 +2284,7 @@ func (m *CommonMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1719,6 +2294,9 @@ func (m *CommonMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1738,7 +2316,7 @@ func (m *CommonMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1748,6 +2326,9 @@ func (m *CommonMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1767,7 +2348,7 @@ func (m *CommonMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1777,6 +2358,9 @@ func (m *CommonMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1788,12 +2372,13 @@ func (m *CommonMetadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgentPayload } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -1818,7 +2403,7 @@ func (m *MetricPayload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1846,7 +2431,7 @@ func (m *MetricPayload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1855,6 +2440,9 @@ func (m *MetricPayload) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1869,12 +2457,13 @@ func (m *MetricPayload) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgentPayload } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -1899,7 +2488,7 @@ func (m *MetricPayload_MetricPoint) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1921,7 +2510,7 @@ func (m *MetricPayload_MetricPoint) 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: @@ -1938,7 +2527,7 @@ func (m *MetricPayload_MetricPoint) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Timestamp |= (int64(b) & 0x7F) << shift + m.Timestamp |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1949,12 +2538,13 @@ func (m *MetricPayload_MetricPoint) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgentPayload } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -1979,7 +2569,7 @@ func (m *MetricPayload_Resource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2007,7 +2597,7 @@ func (m *MetricPayload_Resource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2017,6 +2607,9 @@ func (m *MetricPayload_Resource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2036,7 +2629,7 @@ func (m *MetricPayload_Resource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2046,6 +2639,9 @@ func (m *MetricPayload_Resource) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2057,12 +2653,13 @@ func (m *MetricPayload_Resource) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgentPayload } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2087,7 +2684,7 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2115,7 +2712,7 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2124,6 +2721,9 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2146,7 +2746,7 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2156,6 +2756,9 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2175,7 +2778,7 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2185,6 +2788,9 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2204,7 +2810,7 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2213,6 +2819,9 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2235,7 +2844,7 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (MetricPayload_MetricType(b) & 0x7F) << shift + m.Type |= MetricPayload_MetricType(b&0x7F) << shift if b < 0x80 { break } @@ -2254,7 +2863,7 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2264,6 +2873,9 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2283,7 +2895,7 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2293,6 +2905,9 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2312,7 +2927,7 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Interval |= (int64(b) & 0x7F) << shift + m.Interval |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -2323,12 +2938,13 @@ func (m *MetricPayload_MetricSeries) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgentPayload } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2353,7 +2969,7 @@ func (m *EventsPayload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2381,7 +2997,7 @@ func (m *EventsPayload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2390,6 +3006,9 @@ func (m *EventsPayload) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2412,7 +3031,7 @@ func (m *EventsPayload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2421,6 +3040,9 @@ func (m *EventsPayload) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2437,12 +3059,13 @@ func (m *EventsPayload) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgentPayload } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2467,7 +3090,7 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2495,7 +3118,7 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2505,6 +3128,9 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2524,7 +3150,7 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2534,6 +3160,9 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2553,7 +3182,7 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Ts |= (int64(b) & 0x7F) << shift + m.Ts |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -2572,7 +3201,7 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2582,6 +3211,9 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2601,7 +3233,7 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2611,6 +3243,9 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2630,7 +3265,7 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2640,6 +3275,9 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2659,7 +3297,7 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2669,6 +3307,9 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2688,7 +3329,7 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2698,6 +3339,9 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2717,7 +3361,7 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2727,6 +3371,9 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2738,12 +3385,13 @@ func (m *EventsPayload_Event) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgentPayload } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2768,7 +3416,7 @@ func (m *SketchPayload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2796,7 +3444,7 @@ func (m *SketchPayload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2805,6 +3453,9 @@ func (m *SketchPayload) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2827,7 +3478,7 @@ func (m *SketchPayload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2836,6 +3487,9 @@ func (m *SketchPayload) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2849,12 +3503,13 @@ func (m *SketchPayload) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgentPayload } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2879,7 +3534,7 @@ func (m *SketchPayload_Sketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2907,7 +3562,7 @@ func (m *SketchPayload_Sketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2917,6 +3572,9 @@ func (m *SketchPayload_Sketch) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2936,7 +3594,7 @@ func (m *SketchPayload_Sketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2946,6 +3604,9 @@ func (m *SketchPayload_Sketch) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2965,7 +3626,7 @@ func (m *SketchPayload_Sketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2974,6 +3635,9 @@ func (m *SketchPayload_Sketch) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2996,7 +3660,7 @@ func (m *SketchPayload_Sketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3006,6 +3670,9 @@ func (m *SketchPayload_Sketch) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3025,7 +3692,7 @@ func (m *SketchPayload_Sketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3034,6 +3701,9 @@ func (m *SketchPayload_Sketch) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3048,12 +3718,13 @@ func (m *SketchPayload_Sketch) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgentPayload } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3078,7 +3749,7 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3106,7 +3777,7 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Ts |= (int64(b) & 0x7F) << shift + m.Ts |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -3125,7 +3796,7 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Cnt |= (int64(b) & 0x7F) << shift + m.Cnt |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -3138,7 +3809,7 @@ func (m *SketchPayload_Sketch_Distribution) 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.Min = float64(math.Float64frombits(v)) case 4: @@ -3149,7 +3820,7 @@ func (m *SketchPayload_Sketch_Distribution) 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.Max = float64(math.Float64frombits(v)) case 5: @@ -3160,7 +3831,7 @@ func (m *SketchPayload_Sketch_Distribution) 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.Avg = float64(math.Float64frombits(v)) case 6: @@ -3171,7 +3842,7 @@ func (m *SketchPayload_Sketch_Distribution) 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.Sum = float64(math.Float64frombits(v)) case 7: @@ -3180,7 +3851,7 @@ func (m *SketchPayload_Sketch_Distribution) 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.V = append(m.V, v2) @@ -3195,7 +3866,7 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3204,15 +3875,23 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.V) == 0 { + m.V = 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.V = append(m.V, v2) @@ -3232,7 +3911,7 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint32(b) & 0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -3249,7 +3928,7 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3258,9 +3937,23 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } 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.G) == 0 { + m.G = make([]uint32, 0, elementCount) + } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { @@ -3272,7 +3965,7 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint32(b) & 0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -3294,7 +3987,7 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint32(b) & 0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -3311,7 +4004,7 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3320,9 +4013,23 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } 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.Delta) == 0 { + m.Delta = make([]uint32, 0, elementCount) + } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { @@ -3334,7 +4041,7 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint32(b) & 0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -3350,7 +4057,7 @@ func (m *SketchPayload_Sketch_Distribution) 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.Buf = append(m.Buf, v2) @@ -3365,7 +4072,7 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3374,15 +4081,23 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Buf) == 0 { + m.Buf = 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.Buf = append(m.Buf, v2) @@ -3396,12 +4111,13 @@ func (m *SketchPayload_Sketch_Distribution) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgentPayload } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3426,7 +4142,7 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3454,7 +4170,7 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Ts |= (int64(b) & 0x7F) << shift + m.Ts |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -3473,7 +4189,7 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Cnt |= (int64(b) & 0x7F) << shift + m.Cnt |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -3486,7 +4202,7 @@ func (m *SketchPayload_Sketch_Dogsketch) 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.Min = float64(math.Float64frombits(v)) case 4: @@ -3497,7 +4213,7 @@ func (m *SketchPayload_Sketch_Dogsketch) 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.Max = float64(math.Float64frombits(v)) case 5: @@ -3508,7 +4224,7 @@ func (m *SketchPayload_Sketch_Dogsketch) 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.Avg = float64(math.Float64frombits(v)) case 6: @@ -3519,7 +4235,7 @@ func (m *SketchPayload_Sketch_Dogsketch) 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.Sum = float64(math.Float64frombits(v)) case 7: @@ -3534,7 +4250,7 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int32(b) & 0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -3552,7 +4268,7 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3561,9 +4277,23 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } 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.K) == 0 { + m.K = make([]int32, 0, elementCount) + } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { @@ -3575,7 +4305,7 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int32(b) & 0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -3598,7 +4328,7 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint32(b) & 0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -3615,7 +4345,7 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3624,9 +4354,23 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentPayload } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthAgentPayload + } 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.N) == 0 { + m.N = make([]uint32, 0, elementCount) + } for iNdEx < postIndex { var v uint32 for shift := uint(0); ; shift += 7 { @@ -3638,7 +4382,7 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint32(b) & 0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -3654,12 +4398,13 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgentPayload } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3672,6 +4417,7 @@ func (m *SketchPayload_Sketch_Dogsketch) Unmarshal(dAtA []byte) error { func skipAgentPayload(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 { @@ -3703,10 +4449,8 @@ func skipAgentPayload(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 { @@ -3723,120 +4467,34 @@ func skipAgentPayload(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthAgentPayload } - 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, ErrIntOverflowAgentPayload - } - 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 := skipAgentPayload(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, ErrUnexpectedEndOfGroupAgentPayload + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthAgentPayload + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthAgentPayload = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAgentPayload = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthAgentPayload = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAgentPayload = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAgentPayload = fmt.Errorf("proto: unexpected end of group") ) - -func init() { proto.RegisterFile("proto/metrics/agent_payload.proto", fileDescriptorAgentPayload) } - -var fileDescriptorAgentPayload = []byte{ - // 967 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0xdf, 0x89, 0x13, 0xd7, 0x7e, 0x69, 0xba, 0x61, 0xb4, 0x02, 0x2b, 0x40, 0xb7, 0x04, 0x24, - 0xb2, 0x88, 0x4d, 0x50, 0x00, 0xed, 0x09, 0x89, 0xfe, 0xc9, 0x96, 0xb6, 0x6c, 0x59, 0xb9, 0x2d, - 0x07, 0x84, 0x14, 0x4d, 0x92, 0x59, 0x77, 0xd4, 0xd8, 0x63, 0xd9, 0xe3, 0xa8, 0xe1, 0xce, 0x85, - 0x03, 0x12, 0x5f, 0x85, 0x33, 0x1f, 0x60, 0x2f, 0x48, 0x7c, 0x02, 0x84, 0xfa, 0x15, 0x38, 0x70, - 0x45, 0xf3, 0x3c, 0x76, 0x9d, 0x55, 0x0e, 0x85, 0xc3, 0xde, 0xde, 0xfb, 0x8d, 0xdf, 0x7b, 0xf3, - 0x7e, 0xbf, 0xf7, 0x92, 0x81, 0xf7, 0xe2, 0x44, 0x2a, 0x39, 0x08, 0xb9, 0x4a, 0xc4, 0x34, 0x1d, - 0xb0, 0x80, 0x47, 0x6a, 0x1c, 0xb3, 0xe5, 0x5c, 0xb2, 0x59, 0x1f, 0xcf, 0xe8, 0x83, 0x19, 0x53, - 0x6c, 0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0xe3, 0x73, 0xc5, 0x3c, 0x17, 0x91, 0xdc, 0xd1, - 0x39, 0x26, 0xd9, 0x0b, 0x0f, 0x30, 0x46, 0x9b, 0x9d, 0x5f, 0x08, 0xb8, 0x65, 0x7f, 0xaf, 0xf7, - 0xee, 0x57, 0x78, 0xf7, 0x37, 0x7c, 0x72, 0xa5, 0xbd, 0xa8, 0xb8, 0x7b, 0x74, 0x5c, 0x77, 0x1a, - 0x6d, 0xfb, 0xb8, 0xee, 0xd8, 0xed, 0x0d, 0x7f, 0x6b, 0x45, 0xdf, 0x93, 0x57, 0xfc, 0xfd, 0xbd, - 0x27, 0x2f, 0x6f, 0xb6, 0xc9, 0x1f, 0x37, 0xdb, 0xe4, 0xaf, 0x9b, 0x6d, 0xf2, 0xdd, 0xa3, 0xca, - 0xd3, 0xe2, 0x80, 0x29, 0x76, 0x20, 0x83, 0xfc, 0x61, 0xf2, 0xd8, 0x08, 0x3c, 0x58, 0x7c, 0xae, - 0xdf, 0x16, 0x3c, 0x9a, 0xd8, 0xf8, 0xba, 0xf8, 0xf4, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, - 0x32, 0x8e, 0xac, 0xc7, 0x08, 0x00, 0x00, -} diff --git a/pb/agent_logs_payload.pb.go b/pb/agent_logs_payload.pb.go index 78f40e61..6ffb438a 100644 --- a/pb/agent_logs_payload.pb.go +++ b/pb/agent_logs_payload.pb.go @@ -1,22 +1,15 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/logs/agent_logs_payload.proto -/* - Package pb is a generated protocol buffer package. - - It is generated from these files: - proto/logs/agent_logs_payload.proto - - It has these top-level messages: - Log -*/ package pb -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 @@ -27,7 +20,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 Log struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` @@ -39,13 +32,44 @@ type Log struct { Service string `protobuf:"bytes,5,opt,name=service,proto3" json:"service,omitempty"` Source string `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"` // from config, container tags, ... - Tags []string `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"` + Tags []string `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Log) Reset() { *m = Log{} } +func (m *Log) String() string { return proto.CompactTextString(m) } +func (*Log) ProtoMessage() {} +func (*Log) Descriptor() ([]byte, []int) { + return fileDescriptor_ad4736ffde8ea121, []int{0} +} +func (m *Log) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Log.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 *Log) XXX_Merge(src proto.Message) { + xxx_messageInfo_Log.Merge(m, src) +} +func (m *Log) XXX_Size() int { + return m.Size() +} +func (m *Log) XXX_DiscardUnknown() { + xxx_messageInfo_Log.DiscardUnknown(m) } -func (m *Log) Reset() { *m = Log{} } -func (m *Log) String() string { return proto.CompactTextString(m) } -func (*Log) ProtoMessage() {} -func (*Log) Descriptor() ([]byte, []int) { return fileDescriptorAgentLogsPayload, []int{0} } +var xxx_messageInfo_Log proto.InternalMessageInfo func (m *Log) GetMessage() string { if m != nil { @@ -99,10 +123,36 @@ func (m *Log) GetTags() []string { func init() { proto.RegisterType((*Log)(nil), "pb.Log") } + +func init() { + proto.RegisterFile("proto/logs/agent_logs_payload.proto", fileDescriptor_ad4736ffde8ea121) +} + +var fileDescriptor_ad4736ffde8ea121 = []byte{ + // 257 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0x41, 0x4a, 0xc4, 0x30, + 0x14, 0x86, 0xc9, 0x74, 0xec, 0xd8, 0x20, 0x08, 0x59, 0x48, 0x10, 0x29, 0x45, 0x41, 0xba, 0xb1, + 0x5d, 0x88, 0x07, 0x70, 0x98, 0xa5, 0x8b, 0xa1, 0xe0, 0xc6, 0xcd, 0xf0, 0xd2, 0x86, 0x4c, 0x61, + 0x32, 0x2f, 0x34, 0xaf, 0x03, 0x9e, 0xcc, 0x2b, 0xb8, 0xf4, 0x08, 0xd2, 0x93, 0x48, 0xd3, 0xaa, + 0xbb, 0xff, 0xcb, 0x23, 0x7c, 0xfc, 0x3f, 0xbf, 0x73, 0x1d, 0x12, 0x96, 0x07, 0x34, 0xbe, 0x04, + 0xa3, 0x8f, 0xb4, 0x1b, 0xe3, 0xce, 0xc1, 0xfb, 0x01, 0xa1, 0x29, 0xc2, 0x55, 0x2c, 0x9c, 0xba, + 0xfd, 0x60, 0x3c, 0x7a, 0x41, 0x23, 0x24, 0x5f, 0x59, 0xed, 0x3d, 0x18, 0x2d, 0x59, 0xc6, 0xf2, + 0xa4, 0xfa, 0x45, 0x71, 0xc5, 0x63, 0x4f, 0x40, 0xbd, 0x97, 0x8b, 0x70, 0x98, 0x49, 0xdc, 0xf0, + 0x84, 0x5a, 0xab, 0x3d, 0x81, 0x75, 0x32, 0xca, 0x58, 0x1e, 0x55, 0xff, 0x0f, 0xe2, 0x9a, 0x9f, + 0xef, 0xd1, 0xd3, 0x11, 0xac, 0x96, 0xcb, 0xf0, 0xef, 0x8f, 0x47, 0x97, 0xd7, 0xdd, 0xa9, 0xad, + 0xb5, 0x3c, 0x9b, 0x5c, 0x33, 0x06, 0x17, 0xf6, 0x5d, 0xad, 0x65, 0x3c, 0xbb, 0x02, 0x09, 0xc1, + 0x97, 0x04, 0xc6, 0xcb, 0x55, 0x16, 0xe5, 0x49, 0x15, 0xf2, 0xfa, 0xf5, 0x73, 0x48, 0xd9, 0xd7, + 0x90, 0xb2, 0xef, 0x21, 0x65, 0xfc, 0xb2, 0x46, 0x5b, 0x34, 0x4d, 0x11, 0xca, 0x16, 0x4e, 0xad, + 0x2f, 0x9e, 0xc7, 0xb4, 0x9d, 0x0a, 0x6f, 0xd9, 0xdb, 0xbd, 0x69, 0x69, 0xdf, 0xab, 0xa2, 0x46, + 0x5b, 0x6e, 0x80, 0x60, 0x83, 0x66, 0x5a, 0xe6, 0x61, 0x1e, 0xa5, 0x3c, 0x3d, 0x95, 0x4e, 0xa9, + 0x38, 0x6c, 0xf3, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x8b, 0xab, 0x22, 0x42, 0x01, 0x00, + 0x00, +} + func (m *Log) 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 } @@ -110,73 +160,86 @@ func (m *Log) Marshal() (dAtA []byte, err error) { } func (m *Log) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Message) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAgentLogsPayload(dAtA, i, uint64(len(m.Message))) - i += copy(dAtA[i:], m.Message) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Status) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAgentLogsPayload(dAtA, i, uint64(len(m.Status))) - i += copy(dAtA[i:], m.Status) + 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 = encodeVarintAgentLogsPayload(dAtA, i, uint64(len(m.Tags[iNdEx]))) + i-- + dAtA[i] = 0x3a + } } - if m.Timestamp != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintAgentLogsPayload(dAtA, i, uint64(m.Timestamp)) + if len(m.Source) > 0 { + i -= len(m.Source) + copy(dAtA[i:], m.Source) + i = encodeVarintAgentLogsPayload(dAtA, i, uint64(len(m.Source))) + i-- + dAtA[i] = 0x32 + } + if len(m.Service) > 0 { + i -= len(m.Service) + copy(dAtA[i:], m.Service) + i = encodeVarintAgentLogsPayload(dAtA, i, uint64(len(m.Service))) + i-- + dAtA[i] = 0x2a } if len(m.Hostname) > 0 { - dAtA[i] = 0x22 - i++ + i -= len(m.Hostname) + copy(dAtA[i:], m.Hostname) i = encodeVarintAgentLogsPayload(dAtA, i, uint64(len(m.Hostname))) - i += copy(dAtA[i:], m.Hostname) + i-- + dAtA[i] = 0x22 } - if len(m.Service) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintAgentLogsPayload(dAtA, i, uint64(len(m.Service))) - i += copy(dAtA[i:], m.Service) + if m.Timestamp != 0 { + i = encodeVarintAgentLogsPayload(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x18 } - if len(m.Source) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintAgentLogsPayload(dAtA, i, uint64(len(m.Source))) - i += copy(dAtA[i:], m.Source) + if len(m.Status) > 0 { + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintAgentLogsPayload(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0x12 } - if len(m.Tags) > 0 { - for _, s := range m.Tags { - dAtA[i] = 0x3a - 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.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintAgentLogsPayload(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintAgentLogsPayload(dAtA []byte, offset int, v uint64) int { + offset -= sovAgentLogsPayload(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 *Log) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Message) @@ -208,18 +271,14 @@ func (m *Log) Size() (n int) { n += 1 + l + sovAgentLogsPayload(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func sovAgentLogsPayload(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozAgentLogsPayload(x uint64) (n int) { return sovAgentLogsPayload(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -239,7 +298,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -267,7 +326,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -277,6 +336,9 @@ func (m *Log) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentLogsPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentLogsPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -296,7 +358,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -306,6 +368,9 @@ func (m *Log) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentLogsPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentLogsPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -325,7 +390,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Timestamp |= (int64(b) & 0x7F) << shift + m.Timestamp |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -344,7 +409,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -354,6 +419,9 @@ func (m *Log) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentLogsPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentLogsPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -373,7 +441,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -383,6 +451,9 @@ func (m *Log) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentLogsPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentLogsPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -402,7 +473,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -412,6 +483,9 @@ func (m *Log) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentLogsPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentLogsPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -431,7 +505,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -441,6 +515,9 @@ func (m *Log) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgentLogsPayload } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgentLogsPayload + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -452,12 +529,13 @@ func (m *Log) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgentLogsPayload } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -470,6 +548,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { func skipAgentLogsPayload(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 { @@ -501,10 +580,8 @@ func skipAgentLogsPayload(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 { @@ -521,78 +598,34 @@ func skipAgentLogsPayload(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthAgentLogsPayload } - 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, ErrIntOverflowAgentLogsPayload - } - 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 := skipAgentLogsPayload(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, ErrUnexpectedEndOfGroupAgentLogsPayload + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthAgentLogsPayload + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthAgentLogsPayload = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAgentLogsPayload = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthAgentLogsPayload = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAgentLogsPayload = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAgentLogsPayload = fmt.Errorf("proto: unexpected end of group") ) - -func init() { - proto.RegisterFile("proto/logs/agent_logs_payload.proto", fileDescriptorAgentLogsPayload) -} - -var fileDescriptorAgentLogsPayload = []byte{ - // 257 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0x41, 0x4a, 0xc4, 0x30, - 0x14, 0x86, 0xc9, 0x74, 0xec, 0xd8, 0x20, 0x08, 0x59, 0x48, 0x10, 0x29, 0x45, 0x41, 0xba, 0xb1, - 0x5d, 0x88, 0x07, 0x70, 0x98, 0xa5, 0x8b, 0xa1, 0xe0, 0xc6, 0xcd, 0xf0, 0xd2, 0x86, 0x4c, 0x61, - 0x32, 0x2f, 0x34, 0xaf, 0x03, 0x9e, 0xcc, 0x2b, 0xb8, 0xf4, 0x08, 0xd2, 0x93, 0x48, 0xd3, 0xaa, - 0xbb, 0xff, 0xcb, 0x23, 0x7c, 0xfc, 0x3f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x01, 0x00, - 0x00, -}