hack: generate vtproto files for buildx

Integrates vtproto into buildx. The generated files dockerfile has been
modified to copy the buildkit equivalent file to ensure files are laid
out in the appropriate way for imports.

An import has also been included to change the grpc codec to the version
in buildkit that supports vtproto. This will allow buildx to utilize the
speed and memory improvements from that.

Also updates the gc control options for prune.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
Jonathan A. Sternberg
2024-10-08 13:35:06 -05:00
parent d353f5f6ba
commit 64c5139ab6
109 changed files with 68070 additions and 2941 deletions

View File

@ -2,7 +2,7 @@
// versions:
// protoc-gen-go v1.34.1
// protoc v3.11.4
// source: caps.proto
// source: github.com/moby/buildkit/util/apicaps/pb/caps.proto
package moby_buildkit_v1_apicaps
@ -37,7 +37,7 @@ type APICap struct {
func (x *APICap) Reset() {
*x = APICap{}
if protoimpl.UnsafeEnabled {
mi := &file_caps_proto_msgTypes[0]
mi := &file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -50,7 +50,7 @@ func (x *APICap) String() string {
func (*APICap) ProtoMessage() {}
func (x *APICap) ProtoReflect() protoreflect.Message {
mi := &file_caps_proto_msgTypes[0]
mi := &file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -63,7 +63,7 @@ func (x *APICap) ProtoReflect() protoreflect.Message {
// Deprecated: Use APICap.ProtoReflect.Descriptor instead.
func (*APICap) Descriptor() ([]byte, []int) {
return file_caps_proto_rawDescGZIP(), []int{0}
return file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_rawDescGZIP(), []int{0}
}
func (x *APICap) GetID() string {
@ -108,49 +108,52 @@ func (x *APICap) GetDisabledAlternative() string {
return ""
}
var File_caps_proto protoreflect.FileDescriptor
var File_github_com_moby_buildkit_util_apicaps_pb_caps_proto protoreflect.FileDescriptor
var file_caps_proto_rawDesc = []byte{
0x0a, 0x0a, 0x63, 0x61, 0x70, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x6d, 0x6f,
0x62, 0x79, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x61,
0x70, 0x69, 0x63, 0x61, 0x70, 0x73, 0x22, 0xda, 0x01, 0x0a, 0x06, 0x41, 0x50, 0x49, 0x43, 0x61,
0x70, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49,
0x44, 0x12, 0x18, 0x0a, 0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x08, 0x52, 0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x44,
0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
0x0a, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x44,
0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x61,
0x73, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52,
0x65, 0x61, 0x73, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11,
var file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_rawDesc = []byte{
0x0a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, 0x62,
0x79, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x2f, 0x75, 0x74, 0x69, 0x6c, 0x2f,
0x61, 0x70, 0x69, 0x63, 0x61, 0x70, 0x73, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x61, 0x70, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x6d, 0x6f, 0x62, 0x79, 0x2e, 0x62, 0x75, 0x69, 0x6c,
0x64, 0x6b, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x61, 0x70, 0x69, 0x63, 0x61, 0x70, 0x73, 0x22,
0xda, 0x01, 0x0a, 0x06, 0x41, 0x50, 0x49, 0x43, 0x61, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63,
0x61, 0x74, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x44, 0x69,
0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x11,
0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x4d, 0x73,
0x67, 0x12, 0x30, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6c, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13,
0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74,
0x69, 0x76, 0x65, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x6d, 0x6f, 0x62, 0x79, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x2f,
0x75, 0x74, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x63, 0x61, 0x70, 0x73, 0x2f, 0x70, 0x62, 0x3b,
0x6d, 0x6f, 0x62, 0x79, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x5f, 0x76, 0x31,
0x5f, 0x61, 0x70, 0x69, 0x63, 0x61, 0x70, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x30, 0x0a, 0x13, 0x44, 0x69,
0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x42, 0x43, 0x5a, 0x41,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, 0x62, 0x79, 0x2f,
0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x2f, 0x75, 0x74, 0x69, 0x6c, 0x2f, 0x61, 0x70,
0x69, 0x63, 0x61, 0x70, 0x73, 0x2f, 0x70, 0x62, 0x3b, 0x6d, 0x6f, 0x62, 0x79, 0x5f, 0x62, 0x75,
0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x5f, 0x76, 0x31, 0x5f, 0x61, 0x70, 0x69, 0x63, 0x61, 0x70,
0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_caps_proto_rawDescOnce sync.Once
file_caps_proto_rawDescData = file_caps_proto_rawDesc
file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_rawDescOnce sync.Once
file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_rawDescData = file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_rawDesc
)
func file_caps_proto_rawDescGZIP() []byte {
file_caps_proto_rawDescOnce.Do(func() {
file_caps_proto_rawDescData = protoimpl.X.CompressGZIP(file_caps_proto_rawDescData)
func file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_rawDescGZIP() []byte {
file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_rawDescOnce.Do(func() {
file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_rawDescData)
})
return file_caps_proto_rawDescData
return file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_rawDescData
}
var file_caps_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_caps_proto_goTypes = []interface{}{
var file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_goTypes = []interface{}{
(*APICap)(nil), // 0: moby.buildkit.v1.apicaps.APICap
}
var file_caps_proto_depIdxs = []int32{
var file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
@ -158,13 +161,13 @@ var file_caps_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for field type_name
}
func init() { file_caps_proto_init() }
func file_caps_proto_init() {
if File_caps_proto != nil {
func init() { file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_init() }
func file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_init() {
if File_github_com_moby_buildkit_util_apicaps_pb_caps_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_caps_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*APICap); i {
case 0:
return &v.state
@ -181,18 +184,18 @@ func file_caps_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_caps_proto_rawDesc,
RawDescriptor: file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_caps_proto_goTypes,
DependencyIndexes: file_caps_proto_depIdxs,
MessageInfos: file_caps_proto_msgTypes,
GoTypes: file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_goTypes,
DependencyIndexes: file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_depIdxs,
MessageInfos: file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_msgTypes,
}.Build()
File_caps_proto = out.File
file_caps_proto_rawDesc = nil
file_caps_proto_goTypes = nil
file_caps_proto_depIdxs = nil
File_github_com_moby_buildkit_util_apicaps_pb_caps_proto = out.File
file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_rawDesc = nil
file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_goTypes = nil
file_github_com_moby_buildkit_util_apicaps_pb_caps_proto_depIdxs = nil
}

View File

@ -0,0 +1,409 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10
// source: github.com/moby/buildkit/util/apicaps/pb/caps.proto
package moby_buildkit_v1_apicaps
import (
fmt "fmt"
protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
proto "google.golang.org/protobuf/proto"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
io "io"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
func (m *APICap) CloneVT() *APICap {
if m == nil {
return (*APICap)(nil)
}
r := new(APICap)
r.ID = m.ID
r.Enabled = m.Enabled
r.Deprecated = m.Deprecated
r.DisabledReason = m.DisabledReason
r.DisabledReasonMsg = m.DisabledReasonMsg
r.DisabledAlternative = m.DisabledAlternative
if len(m.unknownFields) > 0 {
r.unknownFields = make([]byte, len(m.unknownFields))
copy(r.unknownFields, m.unknownFields)
}
return r
}
func (m *APICap) CloneMessageVT() proto.Message {
return m.CloneVT()
}
func (this *APICap) EqualVT(that *APICap) bool {
if this == that {
return true
} else if this == nil || that == nil {
return false
}
if this.ID != that.ID {
return false
}
if this.Enabled != that.Enabled {
return false
}
if this.Deprecated != that.Deprecated {
return false
}
if this.DisabledReason != that.DisabledReason {
return false
}
if this.DisabledReasonMsg != that.DisabledReasonMsg {
return false
}
if this.DisabledAlternative != that.DisabledAlternative {
return false
}
return string(this.unknownFields) == string(that.unknownFields)
}
func (this *APICap) EqualMessageVT(thatMsg proto.Message) bool {
that, ok := thatMsg.(*APICap)
if !ok {
return false
}
return this.EqualVT(that)
}
func (m *APICap) MarshalVT() (dAtA []byte, err error) {
if m == nil {
return nil, nil
}
size := m.SizeVT()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *APICap) MarshalToVT(dAtA []byte) (int, error) {
size := m.SizeVT()
return m.MarshalToSizedBufferVT(dAtA[:size])
}
func (m *APICap) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if m == nil {
return 0, nil
}
i := len(dAtA)
_ = i
var l int
_ = l
if m.unknownFields != nil {
i -= len(m.unknownFields)
copy(dAtA[i:], m.unknownFields)
}
if len(m.DisabledAlternative) > 0 {
i -= len(m.DisabledAlternative)
copy(dAtA[i:], m.DisabledAlternative)
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DisabledAlternative)))
i--
dAtA[i] = 0x32
}
if len(m.DisabledReasonMsg) > 0 {
i -= len(m.DisabledReasonMsg)
copy(dAtA[i:], m.DisabledReasonMsg)
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DisabledReasonMsg)))
i--
dAtA[i] = 0x2a
}
if len(m.DisabledReason) > 0 {
i -= len(m.DisabledReason)
copy(dAtA[i:], m.DisabledReason)
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DisabledReason)))
i--
dAtA[i] = 0x22
}
if m.Deprecated {
i--
if m.Deprecated {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x18
}
if m.Enabled {
i--
if m.Enabled {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x10
}
if len(m.ID) > 0 {
i -= len(m.ID)
copy(dAtA[i:], m.ID)
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ID)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *APICap) SizeVT() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
if m.Enabled {
n += 2
}
if m.Deprecated {
n += 2
}
l = len(m.DisabledReason)
if l > 0 {
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
l = len(m.DisabledReasonMsg)
if l > 0 {
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
l = len(m.DisabledAlternative)
if l > 0 {
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
n += len(m.unknownFields)
return n
}
func (m *APICap) UnmarshalVT(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: APICap: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: APICap: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protohelpers.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protohelpers.ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Enabled = bool(v != 0)
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Deprecated", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Deprecated = bool(v != 0)
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DisabledReason", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protohelpers.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protohelpers.ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.DisabledReason = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DisabledReasonMsg", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protohelpers.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protohelpers.ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.DisabledReasonMsg = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DisabledAlternative", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protohelpers.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protohelpers.ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.DisabledAlternative = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protohelpers.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}

View File

@ -1,3 +0,0 @@
package moby_buildkit_v1_apicaps //nolint:revive
//go:generate protoc -I=. -I=../../../vendor/ -I=../../../../../../ --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative,require_unimplemented_servers=false:. caps.proto