Debian Codegraph @

envoy/config/cluster/aggregate/v2alpha/cluster_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/aggregate/v2alpha/cluster.proto
6
7 package v2alpha
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 *ClusterConfig) 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 *ClusterConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
35 size := m.SizeVT()
36 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
37 }
38
39 func (m *ClusterConfig) 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.Clusters) > 0 {
52 for iNdEx := len(m.Clusters) - 1; iNdEx >= 0; iNdEx-- {
53 i -= len(m.Clusters[iNdEx])
54 copy(dAtA[i:], m.Clusters[iNdEx])
55 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Clusters[iNdEx])))
56 i--
57 dAtA[i] = 0xa
58 }
59 }
60 return len(dAtA) - i, nil
61 }
62
63 func (m *ClusterConfig) SizeVT() (n int) {
64 if m == nil {
65 return 0
66 }
67 var l int
68 _ = l
69 if len(m.Clusters) > 0 {
70 for _, s := range m.Clusters {
71 l = len(s)
72 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
73 }
74 }
75 n += len(m.unknownFields)
76 return n
77 }