Debian Codegraph @

envoy/config/cluster/v3/outlier_detection_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/cluster/v3/outlier_detection.proto
6
7 package clusterv3
8
9 import (
10 protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
11 durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
12 wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
13 proto "google.golang.org/protobuf/proto"
14 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
15 )
16
17 const (
18 // Verify that this generated code is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
20 // Verify that runtime/protoimpl is sufficiently up-to-date.
21 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
22 )
23
24 func (m *OutlierDetection) MarshalVTStrict() (dAtA []byte, err error) {
25 if m == nil {
26 return nil, nil
27 }
28 size := m.SizeVT()
29 dAtA = make([]byte, size)
30 n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
31 if err != nil {
32 return nil, err
33 }
34 return dAtA[:n], nil
35 }
36
37 func (m *OutlierDetection) MarshalToVTStrict(dAtA []byte) (int, error) {
38 size := m.SizeVT()
39 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
40 }
41
42 func (m *OutlierDetection) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
43 if m == nil {
44 return 0, nil
45 }
46 i := len(dAtA)
47 _ = i
48 var l int
49 _ = l
50 if m.unknownFields != nil {
51 i -= len(m.unknownFields)
52 copy(dAtA[i:], m.unknownFields)
53 }
54 if m.AlwaysEjectOneHost != nil {
55 size, err := (*wrapperspb.BoolValue)(m.AlwaysEjectOneHost).MarshalToSizedBufferVTStrict(dAtA[:i])
56 if err != nil {
57 return 0, err
58 }
59 i -= size
60 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
61 i--
62 dAtA[i] = 0x1
63 i--
64 dAtA[i] = 0xca
65 }
66 if len(m.Monitors) > 0 {
67 for iNdEx := len(m.Monitors) - 1; iNdEx >= 0; iNdEx-- {
68 if vtmsg, ok := interface{}(m.Monitors[iNdEx]).(interface {
69 MarshalToSizedBufferVTStrict([]byte) (int, error)
70 }); ok {
71 size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
72 if err != nil {
73 return 0, err
74 }
75 i -= size
76 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
77 } else {
78 encoded, err := proto.Marshal(m.Monitors[iNdEx])
79 if err != nil {
80 return 0, err
81 }
82 i -= len(encoded)
83 copy(dAtA[i:], encoded)
84 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
85 }
86 i--
87 dAtA[i] = 0x1
88 i--
89 dAtA[i] = 0xc2
90 }
91 }
92 if m.SuccessfulActiveHealthCheckUnejectHost != nil {
93 size, err := (*wrapperspb.BoolValue)(m.SuccessfulActiveHealthCheckUnejectHost).MarshalToSizedBufferVTStrict(dAtA[:i])
94 if err != nil {
95 return 0, err
96 }
97 i -= size
98 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
99 i--
100 dAtA[i] = 0x1
101 i--
102 dAtA[i] = 0xba
103 }
104 if m.MaxEjectionTimeJitter != nil {
105 size, err := (*durationpb.Duration)(m.MaxEjectionTimeJitter).MarshalToSizedBufferVTStrict(dAtA[:i])
106 if err != nil {
107 return 0, err
108 }
109 i -= size
110 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
111 i--
112 dAtA[i] = 0x1
113 i--
114 dAtA[i] = 0xb2
115 }
116 if m.MaxEjectionTime != nil {
117 size, err := (*durationpb.Duration)(m.MaxEjectionTime).MarshalToSizedBufferVTStrict(dAtA[:i])
118 if err != nil {
119 return 0, err
120 }
121 i -= size
122 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
123 i--
124 dAtA[i] = 0x1
125 i--
126 dAtA[i] = 0xaa
127 }
128 if m.FailurePercentageRequestVolume != nil {
129 size, err := (*wrapperspb.UInt32Value)(m.FailurePercentageRequestVolume).MarshalToSizedBufferVTStrict(dAtA[:i])
130 if err != nil {
131 return 0, err
132 }
133 i -= size
134 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
135 i--
136 dAtA[i] = 0x1
137 i--
138 dAtA[i] = 0xa2
139 }
140 if m.FailurePercentageMinimumHosts != nil {
141 size, err := (*wrapperspb.UInt32Value)(m.FailurePercentageMinimumHosts).MarshalToSizedBufferVTStrict(dAtA[:i])
142 if err != nil {
143 return 0, err
144 }
145 i -= size
146 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
147 i--
148 dAtA[i] = 0x1
149 i--
150 dAtA[i] = 0x9a
151 }
152 if m.EnforcingFailurePercentageLocalOrigin != nil {
153 size, err := (*wrapperspb.UInt32Value)(m.EnforcingFailurePercentageLocalOrigin).MarshalToSizedBufferVTStrict(dAtA[:i])
154 if err != nil {
155 return 0, err
156 }
157 i -= size
158 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
159 i--
160 dAtA[i] = 0x1
161 i--
162 dAtA[i] = 0x92
163 }
164 if m.EnforcingFailurePercentage != nil {
165 size, err := (*wrapperspb.UInt32Value)(m.EnforcingFailurePercentage).MarshalToSizedBufferVTStrict(dAtA[:i])
166 if err != nil {
167 return 0, err
168 }
169 i -= size
170 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
171 i--
172 dAtA[i] = 0x1
173 i--
174 dAtA[i] = 0x8a
175 }
176 if m.FailurePercentageThreshold != nil {
177 size, err := (*wrapperspb.UInt32Value)(m.FailurePercentageThreshold).MarshalToSizedBufferVTStrict(dAtA[:i])
178 if err != nil {
179 return 0, err
180 }
181 i -= size
182 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
183 i--
184 dAtA[i] = 0x1
185 i--
186 dAtA[i] = 0x82
187 }
188 if m.EnforcingLocalOriginSuccessRate != nil {
189 size, err := (*wrapperspb.UInt32Value)(m.EnforcingLocalOriginSuccessRate).MarshalToSizedBufferVTStrict(dAtA[:i])
190 if err != nil {
191 return 0, err
192 }
193 i -= size
194 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
195 i--
196 dAtA[i] = 0x7a
197 }
198 if m.EnforcingConsecutiveLocalOriginFailure != nil {
199 size, err := (*wrapperspb.UInt32Value)(m.EnforcingConsecutiveLocalOriginFailure).MarshalToSizedBufferVTStrict(dAtA[:i])
200 if err != nil {
201 return 0, err
202 }
203 i -= size
204 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
205 i--
206 dAtA[i] = 0x72
207 }
208 if m.ConsecutiveLocalOriginFailure != nil {
209 size, err := (*wrapperspb.UInt32Value)(m.ConsecutiveLocalOriginFailure).MarshalToSizedBufferVTStrict(dAtA[:i])
210 if err != nil {
211 return 0, err
212 }
213 i -= size
214 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
215 i--
216 dAtA[i] = 0x6a
217 }
218 if m.SplitExternalLocalOriginErrors {
219 i--
220 if m.SplitExternalLocalOriginErrors {
221 dAtA[i] = 1
222 } else {
223 dAtA[i] = 0
224 }
225 i--
226 dAtA[i] = 0x60
227 }
228 if m.EnforcingConsecutiveGatewayFailure != nil {
229 size, err := (*wrapperspb.UInt32Value)(m.EnforcingConsecutiveGatewayFailure).MarshalToSizedBufferVTStrict(dAtA[:i])
230 if err != nil {
231 return 0, err
232 }
233 i -= size
234 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
235 i--
236 dAtA[i] = 0x5a
237 }
238 if m.ConsecutiveGatewayFailure != nil {
239 size, err := (*wrapperspb.UInt32Value)(m.ConsecutiveGatewayFailure).MarshalToSizedBufferVTStrict(dAtA[:i])
240 if err != nil {
241 return 0, err
242 }
243 i -= size
244 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
245 i--
246 dAtA[i] = 0x52
247 }
248 if m.SuccessRateStdevFactor != nil {
249 size, err := (*wrapperspb.UInt32Value)(m.SuccessRateStdevFactor).MarshalToSizedBufferVTStrict(dAtA[:i])
250 if err != nil {
251 return 0, err
252 }
253 i -= size
254 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
255 i--
256 dAtA[i] = 0x4a
257 }
258 if m.SuccessRateRequestVolume != nil {
259 size, err := (*wrapperspb.UInt32Value)(m.SuccessRateRequestVolume).MarshalToSizedBufferVTStrict(dAtA[:i])
260 if err != nil {
261 return 0, err
262 }
263 i -= size
264 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
265 i--
266 dAtA[i] = 0x42
267 }
268 if m.SuccessRateMinimumHosts != nil {
269 size, err := (*wrapperspb.UInt32Value)(m.SuccessRateMinimumHosts).MarshalToSizedBufferVTStrict(dAtA[:i])
270 if err != nil {
271 return 0, err
272 }
273 i -= size
274 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
275 i--
276 dAtA[i] = 0x3a
277 }
278 if m.EnforcingSuccessRate != nil {
279 size, err := (*wrapperspb.UInt32Value)(m.EnforcingSuccessRate).MarshalToSizedBufferVTStrict(dAtA[:i])
280 if err != nil {
281 return 0, err
282 }
283 i -= size
284 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
285 i--
286 dAtA[i] = 0x32
287 }
288 if m.EnforcingConsecutive_5Xx != nil {
289 size, err := (*wrapperspb.UInt32Value)(m.EnforcingConsecutive_5Xx).MarshalToSizedBufferVTStrict(dAtA[:i])
290 if err != nil {
291 return 0, err
292 }
293 i -= size
294 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
295 i--
296 dAtA[i] = 0x2a
297 }
298 if m.MaxEjectionPercent != nil {
299 size, err := (*wrapperspb.UInt32Value)(m.MaxEjectionPercent).MarshalToSizedBufferVTStrict(dAtA[:i])
300 if err != nil {
301 return 0, err
302 }
303 i -= size
304 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
305 i--
306 dAtA[i] = 0x22
307 }
308 if m.BaseEjectionTime != nil {
309 size, err := (*durationpb.Duration)(m.BaseEjectionTime).MarshalToSizedBufferVTStrict(dAtA[:i])
310 if err != nil {
311 return 0, err
312 }
313 i -= size
314 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
315 i--
316 dAtA[i] = 0x1a
317 }
318 if m.Interval != nil {
319 size, err := (*durationpb.Duration)(m.Interval).MarshalToSizedBufferVTStrict(dAtA[:i])
320 if err != nil {
321 return 0, err
322 }
323 i -= size
324 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
325 i--
326 dAtA[i] = 0x12
327 }
328 if m.Consecutive_5Xx != nil {
329 size, err := (*wrapperspb.UInt32Value)(m.Consecutive_5Xx).MarshalToSizedBufferVTStrict(dAtA[:i])
330 if err != nil {
331 return 0, err
332 }
333 i -= size
334 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
335 i--
336 dAtA[i] = 0xa
337 }
338 return len(dAtA) - i, nil
339 }
340
341 func (m *OutlierDetection) SizeVT() (n int) {
342 if m == nil {
343 return 0
344 }
345 var l int
346 _ = l
347 if m.Consecutive_5Xx != nil {
348 l = (*wrapperspb.UInt32Value)(m.Consecutive_5Xx).SizeVT()
349 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
350 }
351 if m.Interval != nil {
352 l = (*durationpb.Duration)(m.Interval).SizeVT()
353 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
354 }
355 if m.BaseEjectionTime != nil {
356 l = (*durationpb.Duration)(m.BaseEjectionTime).SizeVT()
357 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
358 }
359 if m.MaxEjectionPercent != nil {
360 l = (*wrapperspb.UInt32Value)(m.MaxEjectionPercent).SizeVT()
361 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
362 }
363 if m.EnforcingConsecutive_5Xx != nil {
364 l = (*wrapperspb.UInt32Value)(m.EnforcingConsecutive_5Xx).SizeVT()
365 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
366 }
367 if m.EnforcingSuccessRate != nil {
368 l = (*wrapperspb.UInt32Value)(m.EnforcingSuccessRate).SizeVT()
369 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
370 }
371 if m.SuccessRateMinimumHosts != nil {
372 l = (*wrapperspb.UInt32Value)(m.SuccessRateMinimumHosts).SizeVT()
373 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
374 }
375 if m.SuccessRateRequestVolume != nil {
376 l = (*wrapperspb.UInt32Value)(m.SuccessRateRequestVolume).SizeVT()
377 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
378 }
379 if m.SuccessRateStdevFactor != nil {
380 l = (*wrapperspb.UInt32Value)(m.SuccessRateStdevFactor).SizeVT()
381 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
382 }
383 if m.ConsecutiveGatewayFailure != nil {
384 l = (*wrapperspb.UInt32Value)(m.ConsecutiveGatewayFailure).SizeVT()
385 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
386 }
387 if m.EnforcingConsecutiveGatewayFailure != nil {
388 l = (*wrapperspb.UInt32Value)(m.EnforcingConsecutiveGatewayFailure).SizeVT()
389 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
390 }
391 if m.SplitExternalLocalOriginErrors {
392 n += 2
393 }
394 if m.ConsecutiveLocalOriginFailure != nil {
395 l = (*wrapperspb.UInt32Value)(m.ConsecutiveLocalOriginFailure).SizeVT()
396 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
397 }
398 if m.EnforcingConsecutiveLocalOriginFailure != nil {
399 l = (*wrapperspb.UInt32Value)(m.EnforcingConsecutiveLocalOriginFailure).SizeVT()
400 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
401 }
402 if m.EnforcingLocalOriginSuccessRate != nil {
403 l = (*wrapperspb.UInt32Value)(m.EnforcingLocalOriginSuccessRate).SizeVT()
404 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
405 }
406 if m.FailurePercentageThreshold != nil {
407 l = (*wrapperspb.UInt32Value)(m.FailurePercentageThreshold).SizeVT()
408 n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
409 }
410 if m.EnforcingFailurePercentage != nil {
411 l = (*wrapperspb.UInt32Value)(m.EnforcingFailurePercentage).SizeVT()
412 n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
413 }
414 if m.EnforcingFailurePercentageLocalOrigin != nil {
415 l = (*wrapperspb.UInt32Value)(m.EnforcingFailurePercentageLocalOrigin).SizeVT()
416 n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
417 }
418 if m.FailurePercentageMinimumHosts != nil {
419 l = (*wrapperspb.UInt32Value)(m.FailurePercentageMinimumHosts).SizeVT()
420 n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
421 }
422 if m.FailurePercentageRequestVolume != nil {
423 l = (*wrapperspb.UInt32Value)(m.FailurePercentageRequestVolume).SizeVT()
424 n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
425 }
426 if m.MaxEjectionTime != nil {
427 l = (*durationpb.Duration)(m.MaxEjectionTime).SizeVT()
428 n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
429 }
430 if m.MaxEjectionTimeJitter != nil {
431 l = (*durationpb.Duration)(m.MaxEjectionTimeJitter).SizeVT()
432 n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
433 }
434 if m.SuccessfulActiveHealthCheckUnejectHost != nil {
435 l = (*wrapperspb.BoolValue)(m.SuccessfulActiveHealthCheckUnejectHost).SizeVT()
436 n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
437 }
438 if len(m.Monitors) > 0 {
439 for _, e := range m.Monitors {
440 if size, ok := interface{}(e).(interface {
441 SizeVT() int
442 }); ok {
443 l = size.SizeVT()
444 } else {
445 l = proto.Size(e)
446 }
447 n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
448 }
449 }
450 if m.AlwaysEjectOneHost != nil {
451 l = (*wrapperspb.BoolValue)(m.AlwaysEjectOneHost).SizeVT()
452 n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
453 }
454 n += len(m.unknownFields)
455 return n
456 }