github.com/alibaba/ilogtail/pkg@v0.0.0-20250526110833-c53b480d046c/protocol/pipeline_event_group.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: pipeline_event_group.proto 3 4 package protocol 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 24 25 type PipelineEventGroup struct { 26 Metadata map[string][]byte `protobuf:"bytes,1,rep,name=Metadata,proto3" json:"Metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 27 Tags map[string][]byte `protobuf:"bytes,2,rep,name=Tags,proto3" json:"Tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 28 // Types that are valid to be assigned to PipelineEvents: 29 // *PipelineEventGroup_Logs 30 // *PipelineEventGroup_Metrics 31 // *PipelineEventGroup_Spans 32 PipelineEvents isPipelineEventGroup_PipelineEvents `protobuf_oneof:"PipelineEvents"` 33 } 34 35 func (m *PipelineEventGroup) Reset() { *m = PipelineEventGroup{} } 36 func (m *PipelineEventGroup) String() string { return proto.CompactTextString(m) } 37 func (*PipelineEventGroup) ProtoMessage() {} 38 func (*PipelineEventGroup) Descriptor() ([]byte, []int) { 39 return fileDescriptor_4ac730b25d5b901f, []int{0} 40 } 41 func (m *PipelineEventGroup) XXX_Unmarshal(b []byte) error { 42 return m.Unmarshal(b) 43 } 44 func (m *PipelineEventGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 if deterministic { 46 return xxx_messageInfo_PipelineEventGroup.Marshal(b, m, deterministic) 47 } else { 48 b = b[:cap(b)] 49 n, err := m.MarshalToSizedBuffer(b) 50 if err != nil { 51 return nil, err 52 } 53 return b[:n], nil 54 } 55 } 56 func (m *PipelineEventGroup) XXX_Merge(src proto.Message) { 57 xxx_messageInfo_PipelineEventGroup.Merge(m, src) 58 } 59 func (m *PipelineEventGroup) XXX_Size() int { 60 return m.Size() 61 } 62 func (m *PipelineEventGroup) XXX_DiscardUnknown() { 63 xxx_messageInfo_PipelineEventGroup.DiscardUnknown(m) 64 } 65 66 var xxx_messageInfo_PipelineEventGroup proto.InternalMessageInfo 67 68 type isPipelineEventGroup_PipelineEvents interface { 69 isPipelineEventGroup_PipelineEvents() 70 MarshalTo([]byte) (int, error) 71 Size() int 72 } 73 74 type PipelineEventGroup_Logs struct { 75 Logs *PipelineEventGroup_LogEvents `protobuf:"bytes,3,opt,name=Logs,proto3,oneof" json:"Logs,omitempty"` 76 } 77 type PipelineEventGroup_Metrics struct { 78 Metrics *PipelineEventGroup_MetricEvents `protobuf:"bytes,4,opt,name=Metrics,proto3,oneof" json:"Metrics,omitempty"` 79 } 80 type PipelineEventGroup_Spans struct { 81 Spans *PipelineEventGroup_SpanEvents `protobuf:"bytes,5,opt,name=Spans,proto3,oneof" json:"Spans,omitempty"` 82 } 83 84 func (*PipelineEventGroup_Logs) isPipelineEventGroup_PipelineEvents() {} 85 func (*PipelineEventGroup_Metrics) isPipelineEventGroup_PipelineEvents() {} 86 func (*PipelineEventGroup_Spans) isPipelineEventGroup_PipelineEvents() {} 87 88 func (m *PipelineEventGroup) GetPipelineEvents() isPipelineEventGroup_PipelineEvents { 89 if m != nil { 90 return m.PipelineEvents 91 } 92 return nil 93 } 94 95 func (m *PipelineEventGroup) GetMetadata() map[string][]byte { 96 if m != nil { 97 return m.Metadata 98 } 99 return nil 100 } 101 102 func (m *PipelineEventGroup) GetTags() map[string][]byte { 103 if m != nil { 104 return m.Tags 105 } 106 return nil 107 } 108 109 func (m *PipelineEventGroup) GetLogs() *PipelineEventGroup_LogEvents { 110 if x, ok := m.GetPipelineEvents().(*PipelineEventGroup_Logs); ok { 111 return x.Logs 112 } 113 return nil 114 } 115 116 func (m *PipelineEventGroup) GetMetrics() *PipelineEventGroup_MetricEvents { 117 if x, ok := m.GetPipelineEvents().(*PipelineEventGroup_Metrics); ok { 118 return x.Metrics 119 } 120 return nil 121 } 122 123 func (m *PipelineEventGroup) GetSpans() *PipelineEventGroup_SpanEvents { 124 if x, ok := m.GetPipelineEvents().(*PipelineEventGroup_Spans); ok { 125 return x.Spans 126 } 127 return nil 128 } 129 130 // XXX_OneofWrappers is for the internal use of the proto package. 131 func (*PipelineEventGroup) XXX_OneofWrappers() []interface{} { 132 return []interface{}{ 133 (*PipelineEventGroup_Logs)(nil), 134 (*PipelineEventGroup_Metrics)(nil), 135 (*PipelineEventGroup_Spans)(nil), 136 } 137 } 138 139 type PipelineEventGroup_LogEvents struct { 140 Events []*LogEvent `protobuf:"bytes,1,rep,name=Events,proto3" json:"Events,omitempty"` 141 } 142 143 func (m *PipelineEventGroup_LogEvents) Reset() { *m = PipelineEventGroup_LogEvents{} } 144 func (m *PipelineEventGroup_LogEvents) String() string { return proto.CompactTextString(m) } 145 func (*PipelineEventGroup_LogEvents) ProtoMessage() {} 146 func (*PipelineEventGroup_LogEvents) Descriptor() ([]byte, []int) { 147 return fileDescriptor_4ac730b25d5b901f, []int{0, 2} 148 } 149 func (m *PipelineEventGroup_LogEvents) XXX_Unmarshal(b []byte) error { 150 return m.Unmarshal(b) 151 } 152 func (m *PipelineEventGroup_LogEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 153 if deterministic { 154 return xxx_messageInfo_PipelineEventGroup_LogEvents.Marshal(b, m, deterministic) 155 } else { 156 b = b[:cap(b)] 157 n, err := m.MarshalToSizedBuffer(b) 158 if err != nil { 159 return nil, err 160 } 161 return b[:n], nil 162 } 163 } 164 func (m *PipelineEventGroup_LogEvents) XXX_Merge(src proto.Message) { 165 xxx_messageInfo_PipelineEventGroup_LogEvents.Merge(m, src) 166 } 167 func (m *PipelineEventGroup_LogEvents) XXX_Size() int { 168 return m.Size() 169 } 170 func (m *PipelineEventGroup_LogEvents) XXX_DiscardUnknown() { 171 xxx_messageInfo_PipelineEventGroup_LogEvents.DiscardUnknown(m) 172 } 173 174 var xxx_messageInfo_PipelineEventGroup_LogEvents proto.InternalMessageInfo 175 176 func (m *PipelineEventGroup_LogEvents) GetEvents() []*LogEvent { 177 if m != nil { 178 return m.Events 179 } 180 return nil 181 } 182 183 type PipelineEventGroup_MetricEvents struct { 184 Events []*MetricEvent `protobuf:"bytes,1,rep,name=Events,proto3" json:"Events,omitempty"` 185 } 186 187 func (m *PipelineEventGroup_MetricEvents) Reset() { *m = PipelineEventGroup_MetricEvents{} } 188 func (m *PipelineEventGroup_MetricEvents) String() string { return proto.CompactTextString(m) } 189 func (*PipelineEventGroup_MetricEvents) ProtoMessage() {} 190 func (*PipelineEventGroup_MetricEvents) Descriptor() ([]byte, []int) { 191 return fileDescriptor_4ac730b25d5b901f, []int{0, 3} 192 } 193 func (m *PipelineEventGroup_MetricEvents) XXX_Unmarshal(b []byte) error { 194 return m.Unmarshal(b) 195 } 196 func (m *PipelineEventGroup_MetricEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 197 if deterministic { 198 return xxx_messageInfo_PipelineEventGroup_MetricEvents.Marshal(b, m, deterministic) 199 } else { 200 b = b[:cap(b)] 201 n, err := m.MarshalToSizedBuffer(b) 202 if err != nil { 203 return nil, err 204 } 205 return b[:n], nil 206 } 207 } 208 func (m *PipelineEventGroup_MetricEvents) XXX_Merge(src proto.Message) { 209 xxx_messageInfo_PipelineEventGroup_MetricEvents.Merge(m, src) 210 } 211 func (m *PipelineEventGroup_MetricEvents) XXX_Size() int { 212 return m.Size() 213 } 214 func (m *PipelineEventGroup_MetricEvents) XXX_DiscardUnknown() { 215 xxx_messageInfo_PipelineEventGroup_MetricEvents.DiscardUnknown(m) 216 } 217 218 var xxx_messageInfo_PipelineEventGroup_MetricEvents proto.InternalMessageInfo 219 220 func (m *PipelineEventGroup_MetricEvents) GetEvents() []*MetricEvent { 221 if m != nil { 222 return m.Events 223 } 224 return nil 225 } 226 227 type PipelineEventGroup_SpanEvents struct { 228 Events []*SpanEvent `protobuf:"bytes,1,rep,name=Events,proto3" json:"Events,omitempty"` 229 } 230 231 func (m *PipelineEventGroup_SpanEvents) Reset() { *m = PipelineEventGroup_SpanEvents{} } 232 func (m *PipelineEventGroup_SpanEvents) String() string { return proto.CompactTextString(m) } 233 func (*PipelineEventGroup_SpanEvents) ProtoMessage() {} 234 func (*PipelineEventGroup_SpanEvents) Descriptor() ([]byte, []int) { 235 return fileDescriptor_4ac730b25d5b901f, []int{0, 4} 236 } 237 func (m *PipelineEventGroup_SpanEvents) XXX_Unmarshal(b []byte) error { 238 return m.Unmarshal(b) 239 } 240 func (m *PipelineEventGroup_SpanEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 241 if deterministic { 242 return xxx_messageInfo_PipelineEventGroup_SpanEvents.Marshal(b, m, deterministic) 243 } else { 244 b = b[:cap(b)] 245 n, err := m.MarshalToSizedBuffer(b) 246 if err != nil { 247 return nil, err 248 } 249 return b[:n], nil 250 } 251 } 252 func (m *PipelineEventGroup_SpanEvents) XXX_Merge(src proto.Message) { 253 xxx_messageInfo_PipelineEventGroup_SpanEvents.Merge(m, src) 254 } 255 func (m *PipelineEventGroup_SpanEvents) XXX_Size() int { 256 return m.Size() 257 } 258 func (m *PipelineEventGroup_SpanEvents) XXX_DiscardUnknown() { 259 xxx_messageInfo_PipelineEventGroup_SpanEvents.DiscardUnknown(m) 260 } 261 262 var xxx_messageInfo_PipelineEventGroup_SpanEvents proto.InternalMessageInfo 263 264 func (m *PipelineEventGroup_SpanEvents) GetEvents() []*SpanEvent { 265 if m != nil { 266 return m.Events 267 } 268 return nil 269 } 270 271 func init() { 272 proto.RegisterType((*PipelineEventGroup)(nil), "logtail.models.PipelineEventGroup") 273 proto.RegisterMapType((map[string][]byte)(nil), "logtail.models.PipelineEventGroup.MetadataEntry") 274 proto.RegisterMapType((map[string][]byte)(nil), "logtail.models.PipelineEventGroup.TagsEntry") 275 proto.RegisterType((*PipelineEventGroup_LogEvents)(nil), "logtail.models.PipelineEventGroup.LogEvents") 276 proto.RegisterType((*PipelineEventGroup_MetricEvents)(nil), "logtail.models.PipelineEventGroup.MetricEvents") 277 proto.RegisterType((*PipelineEventGroup_SpanEvents)(nil), "logtail.models.PipelineEventGroup.SpanEvents") 278 } 279 280 func init() { proto.RegisterFile("pipeline_event_group.proto", fileDescriptor_4ac730b25d5b901f) } 281 282 var fileDescriptor_4ac730b25d5b901f = []byte{ 283 // 378 bytes of a gzipped FileDescriptorProto 284 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0x4a, 0xeb, 0x40, 285 0x14, 0x86, 0x33, 0x6d, 0xd3, 0x7b, 0x7b, 0xac, 0xb5, 0x0c, 0x2e, 0xc6, 0x08, 0x21, 0xb8, 0xea, 286 0x42, 0x63, 0xb5, 0x0b, 0x45, 0x11, 0xa5, 0x52, 0x14, 0x6c, 0x41, 0xa2, 0xfb, 0x32, 0xb6, 0x43, 287 0x08, 0xa6, 0x99, 0x90, 0x49, 0x0b, 0x7d, 0x0b, 0x1f, 0x4b, 0x77, 0x5d, 0xba, 0x94, 0xf6, 0x45, 288 0x24, 0x93, 0x26, 0x36, 0x71, 0x13, 0x77, 0x33, 0x87, 0xef, 0xff, 0x0e, 0xf3, 0x27, 0xa0, 0xf9, 289 0x8e, 0xcf, 0x5c, 0xc7, 0x63, 0x43, 0x36, 0x63, 0x5e, 0x38, 0xb4, 0x03, 0x3e, 0xf5, 0x4d, 0x3f, 290 0xe0, 0x21, 0xc7, 0x0d, 0x97, 0xdb, 0x21, 0x75, 0x5c, 0x73, 0xc2, 0xc7, 0xcc, 0x15, 0xda, 0x8e, 291 0xcb, 0xed, 0x18, 0x8b, 0x01, 0x0d, 0x4f, 0x58, 0x18, 0x38, 0xa3, 0xcc, 0xac, 0x29, 0x7c, 0xea, 292 0x6d, 0x4e, 0x0e, 0x3e, 0x54, 0xc0, 0x8f, 0xeb, 0x2d, 0xbd, 0x68, 0x7e, 0x17, 0xed, 0xc0, 0x7d, 293 0xf8, 0x3f, 0x60, 0x21, 0x1d, 0xd3, 0x90, 0x12, 0x64, 0x94, 0x5b, 0x5b, 0xa7, 0x6d, 0x33, 0xbb, 294 0xd0, 0xfc, 0x9d, 0x32, 0x93, 0x48, 0xcf, 0x0b, 0x83, 0xb9, 0x95, 0x1a, 0xf0, 0x0d, 0x54, 0x9e, 295 0xa9, 0x2d, 0x48, 0x49, 0x9a, 0x0e, 0x0b, 0x98, 0x22, 0x3c, 0xb6, 0xc8, 0x24, 0xee, 0x42, 0xa5, 296 0xcf, 0x6d, 0x41, 0xca, 0x06, 0x2a, 0x68, 0xe8, 0x73, 0x5b, 0xde, 0xc4, 0xbd, 0x62, 0xc9, 0x2c, 297 0x7e, 0x80, 0x7f, 0x03, 0x59, 0x89, 0x20, 0x15, 0xa9, 0x39, 0x2e, 0xf6, 0xa4, 0xc0, 0x19, 0xa5, 298 0xa6, 0xc4, 0x80, 0x7b, 0xa0, 0x3e, 0xf9, 0xd4, 0x13, 0x44, 0x95, 0xaa, 0xa3, 0x02, 0xaa, 0x88, 299 0x4f, 0x45, 0x71, 0x5a, 0xbb, 0x84, 0xed, 0x4c, 0x69, 0xb8, 0x09, 0xe5, 0x57, 0x36, 0x27, 0xc8, 300 0x40, 0xad, 0x9a, 0x15, 0x1d, 0xf1, 0x2e, 0xa8, 0x33, 0xea, 0x4e, 0x19, 0x29, 0x19, 0xa8, 0x55, 301 0xb7, 0xe2, 0xcb, 0x45, 0xe9, 0x1c, 0x69, 0x67, 0x50, 0x4b, 0x7b, 0xfa, 0x53, 0xf0, 0x0a, 0x6a, 302 0x69, 0x3d, 0xb8, 0x0d, 0xd5, 0xf8, 0xb4, 0xfe, 0xd0, 0x24, 0xff, 0x94, 0x04, 0xb5, 0xd6, 0x9c, 303 0x76, 0x0b, 0xf5, 0xcd, 0x5a, 0x70, 0x27, 0x67, 0xd8, 0xcf, 0x1b, 0x36, 0xe8, 0x54, 0x72, 0x0d, 304 0xf0, 0x53, 0x08, 0x3e, 0xc9, 0x29, 0xf6, 0xf2, 0x8a, 0x94, 0x4d, 0x04, 0xdd, 0x26, 0x34, 0x32, 305 0x25, 0x8b, 0x2e, 0x79, 0x5f, 0xea, 0x68, 0xb1, 0xd4, 0xd1, 0xd7, 0x52, 0x47, 0x6f, 0x2b, 0x5d, 306 0x59, 0xac, 0x74, 0xe5, 0x73, 0xa5, 0x2b, 0x2f, 0x55, 0xf9, 0xb3, 0x77, 0xbe, 0x03, 0x00, 0x00, 307 0xff, 0xff, 0xb5, 0x6e, 0xbc, 0x2a, 0x51, 0x03, 0x00, 0x00, 308 } 309 310 func (m *PipelineEventGroup) Marshal() (dAtA []byte, err error) { 311 size := m.Size() 312 dAtA = make([]byte, size) 313 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 314 if err != nil { 315 return nil, err 316 } 317 return dAtA[:n], nil 318 } 319 320 func (m *PipelineEventGroup) MarshalTo(dAtA []byte) (int, error) { 321 size := m.Size() 322 return m.MarshalToSizedBuffer(dAtA[:size]) 323 } 324 325 func (m *PipelineEventGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { 326 i := len(dAtA) 327 _ = i 328 var l int 329 _ = l 330 if m.PipelineEvents != nil { 331 { 332 size := m.PipelineEvents.Size() 333 i -= size 334 if _, err := m.PipelineEvents.MarshalTo(dAtA[i:]); err != nil { 335 return 0, err 336 } 337 } 338 } 339 if len(m.Tags) > 0 { 340 for k := range m.Tags { 341 v := m.Tags[k] 342 baseI := i 343 if len(v) > 0 { 344 i -= len(v) 345 copy(dAtA[i:], v) 346 i = encodeVarintPipelineEventGroup(dAtA, i, uint64(len(v))) 347 i-- 348 dAtA[i] = 0x12 349 } 350 i -= len(k) 351 copy(dAtA[i:], k) 352 i = encodeVarintPipelineEventGroup(dAtA, i, uint64(len(k))) 353 i-- 354 dAtA[i] = 0xa 355 i = encodeVarintPipelineEventGroup(dAtA, i, uint64(baseI-i)) 356 i-- 357 dAtA[i] = 0x12 358 } 359 } 360 if len(m.Metadata) > 0 { 361 for k := range m.Metadata { 362 v := m.Metadata[k] 363 baseI := i 364 if len(v) > 0 { 365 i -= len(v) 366 copy(dAtA[i:], v) 367 i = encodeVarintPipelineEventGroup(dAtA, i, uint64(len(v))) 368 i-- 369 dAtA[i] = 0x12 370 } 371 i -= len(k) 372 copy(dAtA[i:], k) 373 i = encodeVarintPipelineEventGroup(dAtA, i, uint64(len(k))) 374 i-- 375 dAtA[i] = 0xa 376 i = encodeVarintPipelineEventGroup(dAtA, i, uint64(baseI-i)) 377 i-- 378 dAtA[i] = 0xa 379 } 380 } 381 return len(dAtA) - i, nil 382 } 383 384 func (m *PipelineEventGroup_Logs) MarshalTo(dAtA []byte) (int, error) { 385 size := m.Size() 386 return m.MarshalToSizedBuffer(dAtA[:size]) 387 } 388 389 func (m *PipelineEventGroup_Logs) MarshalToSizedBuffer(dAtA []byte) (int, error) { 390 i := len(dAtA) 391 if m.Logs != nil { 392 { 393 size, err := m.Logs.MarshalToSizedBuffer(dAtA[:i]) 394 if err != nil { 395 return 0, err 396 } 397 i -= size 398 i = encodeVarintPipelineEventGroup(dAtA, i, uint64(size)) 399 } 400 i-- 401 dAtA[i] = 0x1a 402 } 403 return len(dAtA) - i, nil 404 } 405 func (m *PipelineEventGroup_Metrics) MarshalTo(dAtA []byte) (int, error) { 406 size := m.Size() 407 return m.MarshalToSizedBuffer(dAtA[:size]) 408 } 409 410 func (m *PipelineEventGroup_Metrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { 411 i := len(dAtA) 412 if m.Metrics != nil { 413 { 414 size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) 415 if err != nil { 416 return 0, err 417 } 418 i -= size 419 i = encodeVarintPipelineEventGroup(dAtA, i, uint64(size)) 420 } 421 i-- 422 dAtA[i] = 0x22 423 } 424 return len(dAtA) - i, nil 425 } 426 func (m *PipelineEventGroup_Spans) MarshalTo(dAtA []byte) (int, error) { 427 size := m.Size() 428 return m.MarshalToSizedBuffer(dAtA[:size]) 429 } 430 431 func (m *PipelineEventGroup_Spans) MarshalToSizedBuffer(dAtA []byte) (int, error) { 432 i := len(dAtA) 433 if m.Spans != nil { 434 { 435 size, err := m.Spans.MarshalToSizedBuffer(dAtA[:i]) 436 if err != nil { 437 return 0, err 438 } 439 i -= size 440 i = encodeVarintPipelineEventGroup(dAtA, i, uint64(size)) 441 } 442 i-- 443 dAtA[i] = 0x2a 444 } 445 return len(dAtA) - i, nil 446 } 447 func (m *PipelineEventGroup_LogEvents) Marshal() (dAtA []byte, err error) { 448 size := m.Size() 449 dAtA = make([]byte, size) 450 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 451 if err != nil { 452 return nil, err 453 } 454 return dAtA[:n], nil 455 } 456 457 func (m *PipelineEventGroup_LogEvents) MarshalTo(dAtA []byte) (int, error) { 458 size := m.Size() 459 return m.MarshalToSizedBuffer(dAtA[:size]) 460 } 461 462 func (m *PipelineEventGroup_LogEvents) MarshalToSizedBuffer(dAtA []byte) (int, error) { 463 i := len(dAtA) 464 _ = i 465 var l int 466 _ = l 467 if len(m.Events) > 0 { 468 for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { 469 { 470 size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 471 if err != nil { 472 return 0, err 473 } 474 i -= size 475 i = encodeVarintPipelineEventGroup(dAtA, i, uint64(size)) 476 } 477 i-- 478 dAtA[i] = 0xa 479 } 480 } 481 return len(dAtA) - i, nil 482 } 483 484 func (m *PipelineEventGroup_MetricEvents) Marshal() (dAtA []byte, err error) { 485 size := m.Size() 486 dAtA = make([]byte, size) 487 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 488 if err != nil { 489 return nil, err 490 } 491 return dAtA[:n], nil 492 } 493 494 func (m *PipelineEventGroup_MetricEvents) MarshalTo(dAtA []byte) (int, error) { 495 size := m.Size() 496 return m.MarshalToSizedBuffer(dAtA[:size]) 497 } 498 499 func (m *PipelineEventGroup_MetricEvents) MarshalToSizedBuffer(dAtA []byte) (int, error) { 500 i := len(dAtA) 501 _ = i 502 var l int 503 _ = l 504 if len(m.Events) > 0 { 505 for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { 506 { 507 size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 508 if err != nil { 509 return 0, err 510 } 511 i -= size 512 i = encodeVarintPipelineEventGroup(dAtA, i, uint64(size)) 513 } 514 i-- 515 dAtA[i] = 0xa 516 } 517 } 518 return len(dAtA) - i, nil 519 } 520 521 func (m *PipelineEventGroup_SpanEvents) Marshal() (dAtA []byte, err error) { 522 size := m.Size() 523 dAtA = make([]byte, size) 524 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 525 if err != nil { 526 return nil, err 527 } 528 return dAtA[:n], nil 529 } 530 531 func (m *PipelineEventGroup_SpanEvents) MarshalTo(dAtA []byte) (int, error) { 532 size := m.Size() 533 return m.MarshalToSizedBuffer(dAtA[:size]) 534 } 535 536 func (m *PipelineEventGroup_SpanEvents) MarshalToSizedBuffer(dAtA []byte) (int, error) { 537 i := len(dAtA) 538 _ = i 539 var l int 540 _ = l 541 if len(m.Events) > 0 { 542 for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { 543 { 544 size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 545 if err != nil { 546 return 0, err 547 } 548 i -= size 549 i = encodeVarintPipelineEventGroup(dAtA, i, uint64(size)) 550 } 551 i-- 552 dAtA[i] = 0xa 553 } 554 } 555 return len(dAtA) - i, nil 556 } 557 558 func encodeVarintPipelineEventGroup(dAtA []byte, offset int, v uint64) int { 559 offset -= sovPipelineEventGroup(v) 560 base := offset 561 for v >= 1<<7 { 562 dAtA[offset] = uint8(v&0x7f | 0x80) 563 v >>= 7 564 offset++ 565 } 566 dAtA[offset] = uint8(v) 567 return base 568 } 569 func (m *PipelineEventGroup) Size() (n int) { 570 if m == nil { 571 return 0 572 } 573 var l int 574 _ = l 575 if len(m.Metadata) > 0 { 576 for k, v := range m.Metadata { 577 _ = k 578 _ = v 579 l = 0 580 if len(v) > 0 { 581 l = 1 + len(v) + sovPipelineEventGroup(uint64(len(v))) 582 } 583 mapEntrySize := 1 + len(k) + sovPipelineEventGroup(uint64(len(k))) + l 584 n += mapEntrySize + 1 + sovPipelineEventGroup(uint64(mapEntrySize)) 585 } 586 } 587 if len(m.Tags) > 0 { 588 for k, v := range m.Tags { 589 _ = k 590 _ = v 591 l = 0 592 if len(v) > 0 { 593 l = 1 + len(v) + sovPipelineEventGroup(uint64(len(v))) 594 } 595 mapEntrySize := 1 + len(k) + sovPipelineEventGroup(uint64(len(k))) + l 596 n += mapEntrySize + 1 + sovPipelineEventGroup(uint64(mapEntrySize)) 597 } 598 } 599 if m.PipelineEvents != nil { 600 n += m.PipelineEvents.Size() 601 } 602 return n 603 } 604 605 func (m *PipelineEventGroup_Logs) Size() (n int) { 606 if m == nil { 607 return 0 608 } 609 var l int 610 _ = l 611 if m.Logs != nil { 612 l = m.Logs.Size() 613 n += 1 + l + sovPipelineEventGroup(uint64(l)) 614 } 615 return n 616 } 617 func (m *PipelineEventGroup_Metrics) Size() (n int) { 618 if m == nil { 619 return 0 620 } 621 var l int 622 _ = l 623 if m.Metrics != nil { 624 l = m.Metrics.Size() 625 n += 1 + l + sovPipelineEventGroup(uint64(l)) 626 } 627 return n 628 } 629 func (m *PipelineEventGroup_Spans) Size() (n int) { 630 if m == nil { 631 return 0 632 } 633 var l int 634 _ = l 635 if m.Spans != nil { 636 l = m.Spans.Size() 637 n += 1 + l + sovPipelineEventGroup(uint64(l)) 638 } 639 return n 640 } 641 func (m *PipelineEventGroup_LogEvents) Size() (n int) { 642 if m == nil { 643 return 0 644 } 645 var l int 646 _ = l 647 if len(m.Events) > 0 { 648 for _, e := range m.Events { 649 l = e.Size() 650 n += 1 + l + sovPipelineEventGroup(uint64(l)) 651 } 652 } 653 return n 654 } 655 656 func (m *PipelineEventGroup_MetricEvents) Size() (n int) { 657 if m == nil { 658 return 0 659 } 660 var l int 661 _ = l 662 if len(m.Events) > 0 { 663 for _, e := range m.Events { 664 l = e.Size() 665 n += 1 + l + sovPipelineEventGroup(uint64(l)) 666 } 667 } 668 return n 669 } 670 671 func (m *PipelineEventGroup_SpanEvents) Size() (n int) { 672 if m == nil { 673 return 0 674 } 675 var l int 676 _ = l 677 if len(m.Events) > 0 { 678 for _, e := range m.Events { 679 l = e.Size() 680 n += 1 + l + sovPipelineEventGroup(uint64(l)) 681 } 682 } 683 return n 684 } 685 686 func sovPipelineEventGroup(x uint64) (n int) { 687 return (math_bits.Len64(x|1) + 6) / 7 688 } 689 func sozPipelineEventGroup(x uint64) (n int) { 690 return sovPipelineEventGroup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 691 } 692 func (m *PipelineEventGroup) Unmarshal(dAtA []byte) error { 693 l := len(dAtA) 694 iNdEx := 0 695 for iNdEx < l { 696 preIndex := iNdEx 697 var wire uint64 698 for shift := uint(0); ; shift += 7 { 699 if shift >= 64 { 700 return ErrIntOverflowPipelineEventGroup 701 } 702 if iNdEx >= l { 703 return io.ErrUnexpectedEOF 704 } 705 b := dAtA[iNdEx] 706 iNdEx++ 707 wire |= uint64(b&0x7F) << shift 708 if b < 0x80 { 709 break 710 } 711 } 712 fieldNum := int32(wire >> 3) 713 wireType := int(wire & 0x7) 714 if wireType == 4 { 715 return fmt.Errorf("proto: PipelineEventGroup: wiretype end group for non-group") 716 } 717 if fieldNum <= 0 { 718 return fmt.Errorf("proto: PipelineEventGroup: illegal tag %d (wire type %d)", fieldNum, wire) 719 } 720 switch fieldNum { 721 case 1: 722 if wireType != 2 { 723 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 724 } 725 var msglen int 726 for shift := uint(0); ; shift += 7 { 727 if shift >= 64 { 728 return ErrIntOverflowPipelineEventGroup 729 } 730 if iNdEx >= l { 731 return io.ErrUnexpectedEOF 732 } 733 b := dAtA[iNdEx] 734 iNdEx++ 735 msglen |= int(b&0x7F) << shift 736 if b < 0x80 { 737 break 738 } 739 } 740 if msglen < 0 { 741 return ErrInvalidLengthPipelineEventGroup 742 } 743 postIndex := iNdEx + msglen 744 if postIndex < 0 { 745 return ErrInvalidLengthPipelineEventGroup 746 } 747 if postIndex > l { 748 return io.ErrUnexpectedEOF 749 } 750 if m.Metadata == nil { 751 m.Metadata = make(map[string][]byte) 752 } 753 var mapkey string 754 mapvalue := []byte{} 755 for iNdEx < postIndex { 756 entryPreIndex := iNdEx 757 var wire uint64 758 for shift := uint(0); ; shift += 7 { 759 if shift >= 64 { 760 return ErrIntOverflowPipelineEventGroup 761 } 762 if iNdEx >= l { 763 return io.ErrUnexpectedEOF 764 } 765 b := dAtA[iNdEx] 766 iNdEx++ 767 wire |= uint64(b&0x7F) << shift 768 if b < 0x80 { 769 break 770 } 771 } 772 fieldNum := int32(wire >> 3) 773 if fieldNum == 1 { 774 var stringLenmapkey uint64 775 for shift := uint(0); ; shift += 7 { 776 if shift >= 64 { 777 return ErrIntOverflowPipelineEventGroup 778 } 779 if iNdEx >= l { 780 return io.ErrUnexpectedEOF 781 } 782 b := dAtA[iNdEx] 783 iNdEx++ 784 stringLenmapkey |= uint64(b&0x7F) << shift 785 if b < 0x80 { 786 break 787 } 788 } 789 intStringLenmapkey := int(stringLenmapkey) 790 if intStringLenmapkey < 0 { 791 return ErrInvalidLengthPipelineEventGroup 792 } 793 postStringIndexmapkey := iNdEx + intStringLenmapkey 794 if postStringIndexmapkey < 0 { 795 return ErrInvalidLengthPipelineEventGroup 796 } 797 if postStringIndexmapkey > l { 798 return io.ErrUnexpectedEOF 799 } 800 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 801 iNdEx = postStringIndexmapkey 802 } else if fieldNum == 2 { 803 var mapbyteLen uint64 804 for shift := uint(0); ; shift += 7 { 805 if shift >= 64 { 806 return ErrIntOverflowPipelineEventGroup 807 } 808 if iNdEx >= l { 809 return io.ErrUnexpectedEOF 810 } 811 b := dAtA[iNdEx] 812 iNdEx++ 813 mapbyteLen |= uint64(b&0x7F) << shift 814 if b < 0x80 { 815 break 816 } 817 } 818 intMapbyteLen := int(mapbyteLen) 819 if intMapbyteLen < 0 { 820 return ErrInvalidLengthPipelineEventGroup 821 } 822 postbytesIndex := iNdEx + intMapbyteLen 823 if postbytesIndex < 0 { 824 return ErrInvalidLengthPipelineEventGroup 825 } 826 if postbytesIndex > l { 827 return io.ErrUnexpectedEOF 828 } 829 mapvalue = make([]byte, mapbyteLen) 830 copy(mapvalue, dAtA[iNdEx:postbytesIndex]) 831 iNdEx = postbytesIndex 832 } else { 833 iNdEx = entryPreIndex 834 skippy, err := skipPipelineEventGroup(dAtA[iNdEx:]) 835 if err != nil { 836 return err 837 } 838 if (skippy < 0) || (iNdEx+skippy) < 0 { 839 return ErrInvalidLengthPipelineEventGroup 840 } 841 if (iNdEx + skippy) > postIndex { 842 return io.ErrUnexpectedEOF 843 } 844 iNdEx += skippy 845 } 846 } 847 m.Metadata[mapkey] = mapvalue 848 iNdEx = postIndex 849 case 2: 850 if wireType != 2 { 851 return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) 852 } 853 var msglen int 854 for shift := uint(0); ; shift += 7 { 855 if shift >= 64 { 856 return ErrIntOverflowPipelineEventGroup 857 } 858 if iNdEx >= l { 859 return io.ErrUnexpectedEOF 860 } 861 b := dAtA[iNdEx] 862 iNdEx++ 863 msglen |= int(b&0x7F) << shift 864 if b < 0x80 { 865 break 866 } 867 } 868 if msglen < 0 { 869 return ErrInvalidLengthPipelineEventGroup 870 } 871 postIndex := iNdEx + msglen 872 if postIndex < 0 { 873 return ErrInvalidLengthPipelineEventGroup 874 } 875 if postIndex > l { 876 return io.ErrUnexpectedEOF 877 } 878 if m.Tags == nil { 879 m.Tags = make(map[string][]byte) 880 } 881 var mapkey string 882 mapvalue := []byte{} 883 for iNdEx < postIndex { 884 entryPreIndex := iNdEx 885 var wire uint64 886 for shift := uint(0); ; shift += 7 { 887 if shift >= 64 { 888 return ErrIntOverflowPipelineEventGroup 889 } 890 if iNdEx >= l { 891 return io.ErrUnexpectedEOF 892 } 893 b := dAtA[iNdEx] 894 iNdEx++ 895 wire |= uint64(b&0x7F) << shift 896 if b < 0x80 { 897 break 898 } 899 } 900 fieldNum := int32(wire >> 3) 901 if fieldNum == 1 { 902 var stringLenmapkey uint64 903 for shift := uint(0); ; shift += 7 { 904 if shift >= 64 { 905 return ErrIntOverflowPipelineEventGroup 906 } 907 if iNdEx >= l { 908 return io.ErrUnexpectedEOF 909 } 910 b := dAtA[iNdEx] 911 iNdEx++ 912 stringLenmapkey |= uint64(b&0x7F) << shift 913 if b < 0x80 { 914 break 915 } 916 } 917 intStringLenmapkey := int(stringLenmapkey) 918 if intStringLenmapkey < 0 { 919 return ErrInvalidLengthPipelineEventGroup 920 } 921 postStringIndexmapkey := iNdEx + intStringLenmapkey 922 if postStringIndexmapkey < 0 { 923 return ErrInvalidLengthPipelineEventGroup 924 } 925 if postStringIndexmapkey > l { 926 return io.ErrUnexpectedEOF 927 } 928 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 929 iNdEx = postStringIndexmapkey 930 } else if fieldNum == 2 { 931 var mapbyteLen uint64 932 for shift := uint(0); ; shift += 7 { 933 if shift >= 64 { 934 return ErrIntOverflowPipelineEventGroup 935 } 936 if iNdEx >= l { 937 return io.ErrUnexpectedEOF 938 } 939 b := dAtA[iNdEx] 940 iNdEx++ 941 mapbyteLen |= uint64(b&0x7F) << shift 942 if b < 0x80 { 943 break 944 } 945 } 946 intMapbyteLen := int(mapbyteLen) 947 if intMapbyteLen < 0 { 948 return ErrInvalidLengthPipelineEventGroup 949 } 950 postbytesIndex := iNdEx + intMapbyteLen 951 if postbytesIndex < 0 { 952 return ErrInvalidLengthPipelineEventGroup 953 } 954 if postbytesIndex > l { 955 return io.ErrUnexpectedEOF 956 } 957 mapvalue = make([]byte, mapbyteLen) 958 copy(mapvalue, dAtA[iNdEx:postbytesIndex]) 959 iNdEx = postbytesIndex 960 } else { 961 iNdEx = entryPreIndex 962 skippy, err := skipPipelineEventGroup(dAtA[iNdEx:]) 963 if err != nil { 964 return err 965 } 966 if (skippy < 0) || (iNdEx+skippy) < 0 { 967 return ErrInvalidLengthPipelineEventGroup 968 } 969 if (iNdEx + skippy) > postIndex { 970 return io.ErrUnexpectedEOF 971 } 972 iNdEx += skippy 973 } 974 } 975 m.Tags[mapkey] = mapvalue 976 iNdEx = postIndex 977 case 3: 978 if wireType != 2 { 979 return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) 980 } 981 var msglen int 982 for shift := uint(0); ; shift += 7 { 983 if shift >= 64 { 984 return ErrIntOverflowPipelineEventGroup 985 } 986 if iNdEx >= l { 987 return io.ErrUnexpectedEOF 988 } 989 b := dAtA[iNdEx] 990 iNdEx++ 991 msglen |= int(b&0x7F) << shift 992 if b < 0x80 { 993 break 994 } 995 } 996 if msglen < 0 { 997 return ErrInvalidLengthPipelineEventGroup 998 } 999 postIndex := iNdEx + msglen 1000 if postIndex < 0 { 1001 return ErrInvalidLengthPipelineEventGroup 1002 } 1003 if postIndex > l { 1004 return io.ErrUnexpectedEOF 1005 } 1006 v := &PipelineEventGroup_LogEvents{} 1007 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1008 return err 1009 } 1010 m.PipelineEvents = &PipelineEventGroup_Logs{v} 1011 iNdEx = postIndex 1012 case 4: 1013 if wireType != 2 { 1014 return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) 1015 } 1016 var msglen int 1017 for shift := uint(0); ; shift += 7 { 1018 if shift >= 64 { 1019 return ErrIntOverflowPipelineEventGroup 1020 } 1021 if iNdEx >= l { 1022 return io.ErrUnexpectedEOF 1023 } 1024 b := dAtA[iNdEx] 1025 iNdEx++ 1026 msglen |= int(b&0x7F) << shift 1027 if b < 0x80 { 1028 break 1029 } 1030 } 1031 if msglen < 0 { 1032 return ErrInvalidLengthPipelineEventGroup 1033 } 1034 postIndex := iNdEx + msglen 1035 if postIndex < 0 { 1036 return ErrInvalidLengthPipelineEventGroup 1037 } 1038 if postIndex > l { 1039 return io.ErrUnexpectedEOF 1040 } 1041 v := &PipelineEventGroup_MetricEvents{} 1042 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1043 return err 1044 } 1045 m.PipelineEvents = &PipelineEventGroup_Metrics{v} 1046 iNdEx = postIndex 1047 case 5: 1048 if wireType != 2 { 1049 return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) 1050 } 1051 var msglen int 1052 for shift := uint(0); ; shift += 7 { 1053 if shift >= 64 { 1054 return ErrIntOverflowPipelineEventGroup 1055 } 1056 if iNdEx >= l { 1057 return io.ErrUnexpectedEOF 1058 } 1059 b := dAtA[iNdEx] 1060 iNdEx++ 1061 msglen |= int(b&0x7F) << shift 1062 if b < 0x80 { 1063 break 1064 } 1065 } 1066 if msglen < 0 { 1067 return ErrInvalidLengthPipelineEventGroup 1068 } 1069 postIndex := iNdEx + msglen 1070 if postIndex < 0 { 1071 return ErrInvalidLengthPipelineEventGroup 1072 } 1073 if postIndex > l { 1074 return io.ErrUnexpectedEOF 1075 } 1076 v := &PipelineEventGroup_SpanEvents{} 1077 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1078 return err 1079 } 1080 m.PipelineEvents = &PipelineEventGroup_Spans{v} 1081 iNdEx = postIndex 1082 default: 1083 iNdEx = preIndex 1084 skippy, err := skipPipelineEventGroup(dAtA[iNdEx:]) 1085 if err != nil { 1086 return err 1087 } 1088 if (skippy < 0) || (iNdEx+skippy) < 0 { 1089 return ErrInvalidLengthPipelineEventGroup 1090 } 1091 if (iNdEx + skippy) > l { 1092 return io.ErrUnexpectedEOF 1093 } 1094 iNdEx += skippy 1095 } 1096 } 1097 1098 if iNdEx > l { 1099 return io.ErrUnexpectedEOF 1100 } 1101 return nil 1102 } 1103 func (m *PipelineEventGroup_LogEvents) Unmarshal(dAtA []byte) error { 1104 l := len(dAtA) 1105 iNdEx := 0 1106 for iNdEx < l { 1107 preIndex := iNdEx 1108 var wire uint64 1109 for shift := uint(0); ; shift += 7 { 1110 if shift >= 64 { 1111 return ErrIntOverflowPipelineEventGroup 1112 } 1113 if iNdEx >= l { 1114 return io.ErrUnexpectedEOF 1115 } 1116 b := dAtA[iNdEx] 1117 iNdEx++ 1118 wire |= uint64(b&0x7F) << shift 1119 if b < 0x80 { 1120 break 1121 } 1122 } 1123 fieldNum := int32(wire >> 3) 1124 wireType := int(wire & 0x7) 1125 if wireType == 4 { 1126 return fmt.Errorf("proto: LogEvents: wiretype end group for non-group") 1127 } 1128 if fieldNum <= 0 { 1129 return fmt.Errorf("proto: LogEvents: illegal tag %d (wire type %d)", fieldNum, wire) 1130 } 1131 switch fieldNum { 1132 case 1: 1133 if wireType != 2 { 1134 return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) 1135 } 1136 var msglen int 1137 for shift := uint(0); ; shift += 7 { 1138 if shift >= 64 { 1139 return ErrIntOverflowPipelineEventGroup 1140 } 1141 if iNdEx >= l { 1142 return io.ErrUnexpectedEOF 1143 } 1144 b := dAtA[iNdEx] 1145 iNdEx++ 1146 msglen |= int(b&0x7F) << shift 1147 if b < 0x80 { 1148 break 1149 } 1150 } 1151 if msglen < 0 { 1152 return ErrInvalidLengthPipelineEventGroup 1153 } 1154 postIndex := iNdEx + msglen 1155 if postIndex < 0 { 1156 return ErrInvalidLengthPipelineEventGroup 1157 } 1158 if postIndex > l { 1159 return io.ErrUnexpectedEOF 1160 } 1161 m.Events = append(m.Events, &LogEvent{}) 1162 if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1163 return err 1164 } 1165 iNdEx = postIndex 1166 default: 1167 iNdEx = preIndex 1168 skippy, err := skipPipelineEventGroup(dAtA[iNdEx:]) 1169 if err != nil { 1170 return err 1171 } 1172 if (skippy < 0) || (iNdEx+skippy) < 0 { 1173 return ErrInvalidLengthPipelineEventGroup 1174 } 1175 if (iNdEx + skippy) > l { 1176 return io.ErrUnexpectedEOF 1177 } 1178 iNdEx += skippy 1179 } 1180 } 1181 1182 if iNdEx > l { 1183 return io.ErrUnexpectedEOF 1184 } 1185 return nil 1186 } 1187 func (m *PipelineEventGroup_MetricEvents) Unmarshal(dAtA []byte) error { 1188 l := len(dAtA) 1189 iNdEx := 0 1190 for iNdEx < l { 1191 preIndex := iNdEx 1192 var wire uint64 1193 for shift := uint(0); ; shift += 7 { 1194 if shift >= 64 { 1195 return ErrIntOverflowPipelineEventGroup 1196 } 1197 if iNdEx >= l { 1198 return io.ErrUnexpectedEOF 1199 } 1200 b := dAtA[iNdEx] 1201 iNdEx++ 1202 wire |= uint64(b&0x7F) << shift 1203 if b < 0x80 { 1204 break 1205 } 1206 } 1207 fieldNum := int32(wire >> 3) 1208 wireType := int(wire & 0x7) 1209 if wireType == 4 { 1210 return fmt.Errorf("proto: MetricEvents: wiretype end group for non-group") 1211 } 1212 if fieldNum <= 0 { 1213 return fmt.Errorf("proto: MetricEvents: illegal tag %d (wire type %d)", fieldNum, wire) 1214 } 1215 switch fieldNum { 1216 case 1: 1217 if wireType != 2 { 1218 return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) 1219 } 1220 var msglen int 1221 for shift := uint(0); ; shift += 7 { 1222 if shift >= 64 { 1223 return ErrIntOverflowPipelineEventGroup 1224 } 1225 if iNdEx >= l { 1226 return io.ErrUnexpectedEOF 1227 } 1228 b := dAtA[iNdEx] 1229 iNdEx++ 1230 msglen |= int(b&0x7F) << shift 1231 if b < 0x80 { 1232 break 1233 } 1234 } 1235 if msglen < 0 { 1236 return ErrInvalidLengthPipelineEventGroup 1237 } 1238 postIndex := iNdEx + msglen 1239 if postIndex < 0 { 1240 return ErrInvalidLengthPipelineEventGroup 1241 } 1242 if postIndex > l { 1243 return io.ErrUnexpectedEOF 1244 } 1245 m.Events = append(m.Events, &MetricEvent{}) 1246 if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1247 return err 1248 } 1249 iNdEx = postIndex 1250 default: 1251 iNdEx = preIndex 1252 skippy, err := skipPipelineEventGroup(dAtA[iNdEx:]) 1253 if err != nil { 1254 return err 1255 } 1256 if (skippy < 0) || (iNdEx+skippy) < 0 { 1257 return ErrInvalidLengthPipelineEventGroup 1258 } 1259 if (iNdEx + skippy) > l { 1260 return io.ErrUnexpectedEOF 1261 } 1262 iNdEx += skippy 1263 } 1264 } 1265 1266 if iNdEx > l { 1267 return io.ErrUnexpectedEOF 1268 } 1269 return nil 1270 } 1271 func (m *PipelineEventGroup_SpanEvents) Unmarshal(dAtA []byte) error { 1272 l := len(dAtA) 1273 iNdEx := 0 1274 for iNdEx < l { 1275 preIndex := iNdEx 1276 var wire uint64 1277 for shift := uint(0); ; shift += 7 { 1278 if shift >= 64 { 1279 return ErrIntOverflowPipelineEventGroup 1280 } 1281 if iNdEx >= l { 1282 return io.ErrUnexpectedEOF 1283 } 1284 b := dAtA[iNdEx] 1285 iNdEx++ 1286 wire |= uint64(b&0x7F) << shift 1287 if b < 0x80 { 1288 break 1289 } 1290 } 1291 fieldNum := int32(wire >> 3) 1292 wireType := int(wire & 0x7) 1293 if wireType == 4 { 1294 return fmt.Errorf("proto: SpanEvents: wiretype end group for non-group") 1295 } 1296 if fieldNum <= 0 { 1297 return fmt.Errorf("proto: SpanEvents: illegal tag %d (wire type %d)", fieldNum, wire) 1298 } 1299 switch fieldNum { 1300 case 1: 1301 if wireType != 2 { 1302 return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) 1303 } 1304 var msglen int 1305 for shift := uint(0); ; shift += 7 { 1306 if shift >= 64 { 1307 return ErrIntOverflowPipelineEventGroup 1308 } 1309 if iNdEx >= l { 1310 return io.ErrUnexpectedEOF 1311 } 1312 b := dAtA[iNdEx] 1313 iNdEx++ 1314 msglen |= int(b&0x7F) << shift 1315 if b < 0x80 { 1316 break 1317 } 1318 } 1319 if msglen < 0 { 1320 return ErrInvalidLengthPipelineEventGroup 1321 } 1322 postIndex := iNdEx + msglen 1323 if postIndex < 0 { 1324 return ErrInvalidLengthPipelineEventGroup 1325 } 1326 if postIndex > l { 1327 return io.ErrUnexpectedEOF 1328 } 1329 m.Events = append(m.Events, &SpanEvent{}) 1330 if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1331 return err 1332 } 1333 iNdEx = postIndex 1334 default: 1335 iNdEx = preIndex 1336 skippy, err := skipPipelineEventGroup(dAtA[iNdEx:]) 1337 if err != nil { 1338 return err 1339 } 1340 if (skippy < 0) || (iNdEx+skippy) < 0 { 1341 return ErrInvalidLengthPipelineEventGroup 1342 } 1343 if (iNdEx + skippy) > l { 1344 return io.ErrUnexpectedEOF 1345 } 1346 iNdEx += skippy 1347 } 1348 } 1349 1350 if iNdEx > l { 1351 return io.ErrUnexpectedEOF 1352 } 1353 return nil 1354 } 1355 func skipPipelineEventGroup(dAtA []byte) (n int, err error) { 1356 l := len(dAtA) 1357 iNdEx := 0 1358 depth := 0 1359 for iNdEx < l { 1360 var wire uint64 1361 for shift := uint(0); ; shift += 7 { 1362 if shift >= 64 { 1363 return 0, ErrIntOverflowPipelineEventGroup 1364 } 1365 if iNdEx >= l { 1366 return 0, io.ErrUnexpectedEOF 1367 } 1368 b := dAtA[iNdEx] 1369 iNdEx++ 1370 wire |= (uint64(b) & 0x7F) << shift 1371 if b < 0x80 { 1372 break 1373 } 1374 } 1375 wireType := int(wire & 0x7) 1376 switch wireType { 1377 case 0: 1378 for shift := uint(0); ; shift += 7 { 1379 if shift >= 64 { 1380 return 0, ErrIntOverflowPipelineEventGroup 1381 } 1382 if iNdEx >= l { 1383 return 0, io.ErrUnexpectedEOF 1384 } 1385 iNdEx++ 1386 if dAtA[iNdEx-1] < 0x80 { 1387 break 1388 } 1389 } 1390 case 1: 1391 iNdEx += 8 1392 case 2: 1393 var length int 1394 for shift := uint(0); ; shift += 7 { 1395 if shift >= 64 { 1396 return 0, ErrIntOverflowPipelineEventGroup 1397 } 1398 if iNdEx >= l { 1399 return 0, io.ErrUnexpectedEOF 1400 } 1401 b := dAtA[iNdEx] 1402 iNdEx++ 1403 length |= (int(b) & 0x7F) << shift 1404 if b < 0x80 { 1405 break 1406 } 1407 } 1408 if length < 0 { 1409 return 0, ErrInvalidLengthPipelineEventGroup 1410 } 1411 iNdEx += length 1412 case 3: 1413 depth++ 1414 case 4: 1415 if depth == 0 { 1416 return 0, ErrUnexpectedEndOfGroupPipelineEventGroup 1417 } 1418 depth-- 1419 case 5: 1420 iNdEx += 4 1421 default: 1422 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1423 } 1424 if iNdEx < 0 { 1425 return 0, ErrInvalidLengthPipelineEventGroup 1426 } 1427 if depth == 0 { 1428 return iNdEx, nil 1429 } 1430 } 1431 return 0, io.ErrUnexpectedEOF 1432 } 1433 1434 var ( 1435 ErrInvalidLengthPipelineEventGroup = fmt.Errorf("proto: negative length found during unmarshaling") 1436 ErrIntOverflowPipelineEventGroup = fmt.Errorf("proto: integer overflow") 1437 ErrUnexpectedEndOfGroupPipelineEventGroup = fmt.Errorf("proto: unexpected end of group") 1438 )