Debian Codegraph @

envoy/config/trace/v2/lightstep_vtproto.pb.go

raw
1 //go:build vtprotobuf
2 // +build vtprotobuf
3
4 // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
5 // source: envoy/config/trace/v2/lightstep.proto
6
7 package tracev2
8
9 import (
10 protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
11 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12 )
13
14 const (
15 // Verify that this generated code is sufficiently up-to-date.
16 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
17 // Verify that runtime/protoimpl is sufficiently up-to-date.
18 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
19 )
20
21 func (m *LightstepConfig) MarshalVTStrict() (dAtA []byte, err error) {
22 if m == nil {
23 return nil, nil
24 }
25 size := m.SizeVT()
26 dAtA = make([]byte, size)
27 n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
28 if err != nil {
29 return nil, err
30 }
31 return dAtA[:n], nil
32 }
33
34 func (m *LightstepConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
35 size := m.SizeVT()
36 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
37 }
38
39 func (m *LightstepConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
40 if m == nil {
41 return 0, nil
42 }
43 i := len(dAtA)
44 _ = i
45 var l int
46 _ = l
47 if m.unknownFields != nil {
48 i -= len(m.unknownFields)
49 copy(dAtA[i:], m.unknownFields)
50 }
51 if len(m.PropagationModes) > 0 {
52 var pksize2 int
53 for _, num := range m.PropagationModes {
54 pksize2 += protohelpers.SizeOfVarint(uint64(num))
55 }
56 i -= pksize2
57 j1 := i
58 for _, num1 := range m.PropagationModes {
59 num := uint64(num1)
60 for num >= 1<<7 {
61 dAtA[j1] = uint8(uint64(num)&0x7f | 0x80)
62 num >>= 7
63 j1++
64 }
65 dAtA[j1] = uint8(num)
66 j1++
67 }
68 i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2))
69 i--
70 dAtA[i] = 0x1a
71 }
72 if len(m.AccessTokenFile) > 0 {
73 i -= len(m.AccessTokenFile)
74 copy(dAtA[i:], m.AccessTokenFile)
75 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccessTokenFile)))
76 i--
77 dAtA[i] = 0x12
78 }
79 if len(m.CollectorCluster) > 0 {
80 i -= len(m.CollectorCluster)
81 copy(dAtA[i:], m.CollectorCluster)
82 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CollectorCluster)))
83 i--
84 dAtA[i] = 0xa
85 }
86 return len(dAtA) - i, nil
87 }
88
89 func (m *LightstepConfig) SizeVT() (n int) {
90 if m == nil {
91 return 0
92 }
93 var l int
94 _ = l
95 l = len(m.CollectorCluster)
96 if l > 0 {
97 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
98 }
99 l = len(m.AccessTokenFile)
100 if l > 0 {
101 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
102 }
103 if len(m.PropagationModes) > 0 {
104 l = 0
105 for _, e := range m.PropagationModes {
106 l += protohelpers.SizeOfVarint(uint64(e))
107 }
108 n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l
109 }
110 n += len(m.unknownFields)
111 return n
112 }