diff --git a/api/types/plugins/logdriver/entry.pb.go b/api/types/plugins/logdriver/entry.pb.go index 5ced16895c..167d1d5f88 100644 --- a/api/types/plugins/logdriver/entry.pb.go +++ b/api/types/plugins/logdriver/entry.pb.go @@ -1,24 +1,15 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: entry.proto -// DO NOT EDIT! -/* - Package logdriver is a generated protocol buffer package. - - It is generated from these files: - entry.proto - - It has these top-level messages: - LogEntry - PartialLogEntryMetadata -*/ package logdriver -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -29,20 +20,48 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type LogEntry struct { Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` TimeNano int64 `protobuf:"varint,2,opt,name=time_nano,json=timeNano,proto3" json:"time_nano,omitempty"` Line []byte `protobuf:"bytes,3,opt,name=line,proto3" json:"line,omitempty"` Partial bool `protobuf:"varint,4,opt,name=partial,proto3" json:"partial,omitempty"` - PartialLogMetadata *PartialLogEntryMetadata `protobuf:"bytes,5,opt,name=partial_log_metadata,json=partialLogMetadata" json:"partial_log_metadata,omitempty"` + PartialLogMetadata *PartialLogEntryMetadata `protobuf:"bytes,5,opt,name=partial_log_metadata,json=partialLogMetadata,proto3" json:"partial_log_metadata,omitempty"` } -func (m *LogEntry) Reset() { *m = LogEntry{} } -func (m *LogEntry) String() string { return proto.CompactTextString(m) } -func (*LogEntry) ProtoMessage() {} -func (*LogEntry) Descriptor() ([]byte, []int) { return fileDescriptorEntry, []int{0} } +func (m *LogEntry) Reset() { *m = LogEntry{} } +func (m *LogEntry) String() string { return proto.CompactTextString(m) } +func (*LogEntry) ProtoMessage() {} +func (*LogEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_daa6c5b6c627940f, []int{0} +} +func (m *LogEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LogEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LogEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LogEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogEntry.Merge(m, src) +} +func (m *LogEntry) XXX_Size() int { + return m.Size() +} +func (m *LogEntry) XXX_DiscardUnknown() { + xxx_messageInfo_LogEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_LogEntry proto.InternalMessageInfo func (m *LogEntry) GetSource() string { if m != nil { @@ -85,10 +104,38 @@ type PartialLogEntryMetadata struct { Ordinal int32 `protobuf:"varint,3,opt,name=ordinal,proto3" json:"ordinal,omitempty"` } -func (m *PartialLogEntryMetadata) Reset() { *m = PartialLogEntryMetadata{} } -func (m *PartialLogEntryMetadata) String() string { return proto.CompactTextString(m) } -func (*PartialLogEntryMetadata) ProtoMessage() {} -func (*PartialLogEntryMetadata) Descriptor() ([]byte, []int) { return fileDescriptorEntry, []int{1} } +func (m *PartialLogEntryMetadata) Reset() { *m = PartialLogEntryMetadata{} } +func (m *PartialLogEntryMetadata) String() string { return proto.CompactTextString(m) } +func (*PartialLogEntryMetadata) ProtoMessage() {} +func (*PartialLogEntryMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_daa6c5b6c627940f, []int{1} +} +func (m *PartialLogEntryMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PartialLogEntryMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PartialLogEntryMetadata.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PartialLogEntryMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_PartialLogEntryMetadata.Merge(m, src) +} +func (m *PartialLogEntryMetadata) XXX_Size() int { + return m.Size() +} +func (m *PartialLogEntryMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_PartialLogEntryMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_PartialLogEntryMetadata proto.InternalMessageInfo func (m *PartialLogEntryMetadata) GetLast() bool { if m != nil { @@ -115,10 +162,33 @@ func init() { proto.RegisterType((*LogEntry)(nil), "LogEntry") proto.RegisterType((*PartialLogEntryMetadata)(nil), "PartialLogEntryMetadata") } + +func init() { proto.RegisterFile("entry.proto", fileDescriptor_daa6c5b6c627940f) } + +var fileDescriptor_daa6c5b6c627940f = []byte{ + // 250 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xbd, 0x4a, 0x04, 0x31, + 0x14, 0x85, 0xe7, 0xce, 0xfe, 0x38, 0x73, 0x57, 0x2c, 0x82, 0x68, 0x40, 0x08, 0x61, 0xab, 0x54, + 0x5b, 0xe8, 0x1b, 0x08, 0x36, 0xa2, 0x22, 0x69, 0x2c, 0x87, 0xab, 0x13, 0x96, 0xc0, 0x6c, 0x32, + 0x64, 0x63, 0xe1, 0x5b, 0xf8, 0x3a, 0xbe, 0x81, 0xe5, 0x96, 0x96, 0x32, 0xf3, 0x22, 0x32, 0x71, + 0xc6, 0xce, 0xee, 0x9c, 0xf3, 0xa5, 0xf8, 0x72, 0x71, 0x65, 0x5c, 0x0c, 0x6f, 0x9b, 0x36, 0xf8, + 0xe8, 0xd7, 0x1f, 0x80, 0xc5, 0x9d, 0xdf, 0xde, 0x0c, 0x13, 0x3b, 0xc3, 0xe5, 0xde, 0xbf, 0x86, + 0x17, 0xc3, 0x41, 0x82, 0x2a, 0xf5, 0xd8, 0xd8, 0x05, 0x96, 0xd1, 0xee, 0x4c, 0xe5, 0xc8, 0x79, + 0x9e, 0x4b, 0x50, 0x33, 0x5d, 0x0c, 0xc3, 0x03, 0x39, 0xcf, 0x18, 0xce, 0x1b, 0xeb, 0x0c, 0x9f, + 0x49, 0x50, 0xc7, 0x3a, 0x65, 0xc6, 0xf1, 0xa8, 0xa5, 0x10, 0x2d, 0x35, 0x7c, 0x2e, 0x41, 0x15, + 0x7a, 0xaa, 0xec, 0x16, 0x4f, 0xc7, 0x58, 0x35, 0x7e, 0x5b, 0xed, 0x4c, 0xa4, 0x9a, 0x22, 0xf1, + 0x85, 0x04, 0xb5, 0xba, 0xe4, 0x9b, 0xc7, 0x5f, 0x38, 0x29, 0xdd, 0x8f, 0x5c, 0xb3, 0xf6, 0x0f, + 0x4c, 0xdb, 0xfa, 0x09, 0xcf, 0xff, 0x79, 0x9e, 0xa4, 0x68, 0x1f, 0xd3, 0x3f, 0x0a, 0x9d, 0x32, + 0x3b, 0xc1, 0xdc, 0xd6, 0x49, 0xbf, 0xd4, 0xb9, 0xad, 0x07, 0x49, 0x1f, 0x6a, 0xeb, 0xa8, 0x49, + 0xee, 0x0b, 0x3d, 0xd5, 0x6b, 0xfe, 0xd9, 0x09, 0x38, 0x74, 0x02, 0xbe, 0x3b, 0x01, 0xef, 0xbd, + 0xc8, 0x0e, 0xbd, 0xc8, 0xbe, 0x7a, 0x91, 0x3d, 0x2f, 0xd3, 0xd5, 0xae, 0x7e, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xbb, 0x82, 0x62, 0xd5, 0x44, 0x01, 0x00, 0x00, +} + func (m *LogEntry) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -126,54 +196,63 @@ func (m *LogEntry) Marshal() (dAtA []byte, err error) { } func (m *LogEntry) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LogEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Source) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintEntry(dAtA, i, uint64(len(m.Source))) - i += copy(dAtA[i:], m.Source) - } - if m.TimeNano != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintEntry(dAtA, i, uint64(m.TimeNano)) - } - if len(m.Line) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintEntry(dAtA, i, uint64(len(m.Line))) - i += copy(dAtA[i:], m.Line) + if m.PartialLogMetadata != nil { + { + size, err := m.PartialLogMetadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEntry(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } if m.Partial { - dAtA[i] = 0x20 - i++ + i-- if m.Partial { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x20 } - if m.PartialLogMetadata != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintEntry(dAtA, i, uint64(m.PartialLogMetadata.Size())) - n1, err := m.PartialLogMetadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 + if len(m.Line) > 0 { + i -= len(m.Line) + copy(dAtA[i:], m.Line) + i = encodeVarintEntry(dAtA, i, uint64(len(m.Line))) + i-- + dAtA[i] = 0x1a } - return i, nil + if m.TimeNano != 0 { + i = encodeVarintEntry(dAtA, i, uint64(m.TimeNano)) + i-- + dAtA[i] = 0x10 + } + if len(m.Source) > 0 { + i -= len(m.Source) + copy(dAtA[i:], m.Source) + i = encodeVarintEntry(dAtA, i, uint64(len(m.Source))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *PartialLogEntryMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -181,62 +260,55 @@ func (m *PartialLogEntryMetadata) Marshal() (dAtA []byte, err error) { } func (m *PartialLogEntryMetadata) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PartialLogEntryMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.Ordinal != 0 { + i = encodeVarintEntry(dAtA, i, uint64(m.Ordinal)) + i-- + dAtA[i] = 0x18 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintEntry(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x12 + } if m.Last { - dAtA[i] = 0x8 - i++ + i-- if m.Last { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x8 } - if len(m.Id) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintEntry(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if m.Ordinal != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintEntry(dAtA, i, uint64(m.Ordinal)) - } - return i, nil + return len(dAtA) - i, nil } -func encodeFixed64Entry(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Entry(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} func encodeVarintEntry(dAtA []byte, offset int, v uint64) int { + offset -= sovEntry(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *LogEntry) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Source) @@ -261,6 +333,9 @@ func (m *LogEntry) Size() (n int) { } func (m *PartialLogEntryMetadata) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Last { @@ -277,14 +352,7 @@ func (m *PartialLogEntryMetadata) Size() (n int) { } func sovEntry(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozEntry(x uint64) (n int) { return sovEntry(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -304,7 +372,7 @@ func (m *LogEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -332,7 +400,7 @@ func (m *LogEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -342,6 +410,9 @@ func (m *LogEntry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthEntry } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEntry + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -361,7 +432,7 @@ func (m *LogEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TimeNano |= (int64(b) & 0x7F) << shift + m.TimeNano |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -380,7 +451,7 @@ func (m *LogEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -389,6 +460,9 @@ func (m *LogEntry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthEntry } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEntry + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -411,7 +485,7 @@ func (m *LogEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -431,7 +505,7 @@ func (m *LogEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -440,6 +514,9 @@ func (m *LogEntry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthEntry } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEntry + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -456,7 +533,7 @@ func (m *LogEntry) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEntry } if (iNdEx + skippy) > l { @@ -486,7 +563,7 @@ func (m *PartialLogEntryMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -514,7 +591,7 @@ func (m *PartialLogEntryMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -534,7 +611,7 @@ func (m *PartialLogEntryMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -544,6 +621,9 @@ func (m *PartialLogEntryMetadata) Unmarshal(dAtA []byte) error { return ErrInvalidLengthEntry } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEntry + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -563,7 +643,7 @@ func (m *PartialLogEntryMetadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Ordinal |= (int32(b) & 0x7F) << shift + m.Ordinal |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -574,7 +654,7 @@ func (m *PartialLogEntryMetadata) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEntry } if (iNdEx + skippy) > l { @@ -592,6 +672,7 @@ func (m *PartialLogEntryMetadata) Unmarshal(dAtA []byte) error { func skipEntry(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -623,10 +704,8 @@ func skipEntry(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -643,74 +722,34 @@ func skipEntry(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthEntry } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEntry - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipEntry(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEntry + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthEntry + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthEntry = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEntry = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthEntry = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEntry = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEntry = fmt.Errorf("proto: unexpected end of group") ) - -func init() { proto.RegisterFile("entry.proto", fileDescriptorEntry) } - -var fileDescriptorEntry = []byte{ - // 237 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x90, 0xbd, 0x4a, 0x04, 0x31, - 0x14, 0x85, 0xb9, 0xb3, 0x3f, 0xce, 0xdc, 0x5d, 0x2c, 0x82, 0x68, 0x40, 0x18, 0xc2, 0x56, 0xa9, - 0xb6, 0xd0, 0x37, 0x10, 0x6c, 0x44, 0x45, 0xd2, 0x58, 0x0e, 0x57, 0x27, 0x2c, 0x81, 0xd9, 0xdc, - 0x21, 0x13, 0x0b, 0x1f, 0xcd, 0x37, 0xb0, 0xf4, 0x11, 0x64, 0x9e, 0x44, 0x26, 0x4e, 0xec, 0xec, - 0xce, 0x39, 0x5f, 0x8a, 0x2f, 0x17, 0x37, 0xd6, 0xc7, 0xf0, 0xbe, 0xef, 0x03, 0x47, 0xde, 0x7d, - 0x00, 0x96, 0xf7, 0x7c, 0xb8, 0x9d, 0x26, 0x71, 0x8e, 0xeb, 0x81, 0xdf, 0xc2, 0xab, 0x95, 0xa0, - 0x40, 0x57, 0x66, 0x6e, 0xe2, 0x12, 0xab, 0xe8, 0x8e, 0xb6, 0xf1, 0xe4, 0x59, 0x16, 0x0a, 0xf4, - 0xc2, 0x94, 0xd3, 0xf0, 0x48, 0x9e, 0x85, 0xc0, 0x65, 0xe7, 0xbc, 0x95, 0x0b, 0x05, 0x7a, 0x6b, - 0x52, 0x16, 0x12, 0x4f, 0x7a, 0x0a, 0xd1, 0x51, 0x27, 0x97, 0x0a, 0x74, 0x69, 0x72, 0x15, 0x77, - 0x78, 0x36, 0xc7, 0xa6, 0xe3, 0x43, 0x73, 0xb4, 0x91, 0x5a, 0x8a, 0x24, 0x57, 0x0a, 0xf4, 0xe6, - 0x4a, 0xee, 0x9f, 0x7e, 0x61, 0x56, 0x7a, 0x98, 0xb9, 0x11, 0xfd, 0x1f, 0xc8, 0xdb, 0xee, 0x19, - 0x2f, 0xfe, 0x79, 0x9e, 0xa4, 0x68, 0x88, 0xe9, 0x1f, 0xa5, 0x49, 0x59, 0x9c, 0x62, 0xe1, 0xda, - 0xa4, 0x5f, 0x99, 0xc2, 0xb5, 0x93, 0x24, 0x87, 0xd6, 0x79, 0xea, 0x92, 0xfb, 0xca, 0xe4, 0x7a, - 0xb3, 0xfd, 0x1c, 0x6b, 0xf8, 0x1a, 0x6b, 0xf8, 0x1e, 0x6b, 0x78, 0x59, 0xa7, 0x4b, 0x5d, 0xff, - 0x04, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xed, 0x9f, 0xb6, 0x38, 0x01, 0x00, 0x00, -} diff --git a/api/types/swarm/runtime/plugin.pb.go b/api/types/swarm/runtime/plugin.pb.go index e45045866a..32aaf0d519 100644 --- a/api/types/swarm/runtime/plugin.pb.go +++ b/api/types/swarm/runtime/plugin.pb.go @@ -1,23 +1,15 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: plugin.proto -/* - Package runtime is a generated protocol buffer package. - - It is generated from these files: - plugin.proto - - It has these top-level messages: - PluginSpec - PluginPrivilege -*/ package runtime -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -28,22 +20,50 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // PluginSpec defines the base payload which clients can specify for creating // a service with the plugin runtime. type PluginSpec struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Remote string `protobuf:"bytes,2,opt,name=remote,proto3" json:"remote,omitempty"` - Privileges []*PluginPrivilege `protobuf:"bytes,3,rep,name=privileges" json:"privileges,omitempty"` + Privileges []*PluginPrivilege `protobuf:"bytes,3,rep,name=privileges,proto3" json:"privileges,omitempty"` Disabled bool `protobuf:"varint,4,opt,name=disabled,proto3" json:"disabled,omitempty"` - Env []string `protobuf:"bytes,5,rep,name=env" json:"env,omitempty"` + Env []string `protobuf:"bytes,5,rep,name=env,proto3" json:"env,omitempty"` } -func (m *PluginSpec) Reset() { *m = PluginSpec{} } -func (m *PluginSpec) String() string { return proto.CompactTextString(m) } -func (*PluginSpec) ProtoMessage() {} -func (*PluginSpec) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{0} } +func (m *PluginSpec) Reset() { *m = PluginSpec{} } +func (m *PluginSpec) String() string { return proto.CompactTextString(m) } +func (*PluginSpec) ProtoMessage() {} +func (*PluginSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_22a625af4bc1cc87, []int{0} +} +func (m *PluginSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PluginSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PluginSpec.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PluginSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_PluginSpec.Merge(m, src) +} +func (m *PluginSpec) XXX_Size() int { + return m.Size() +} +func (m *PluginSpec) XXX_DiscardUnknown() { + xxx_messageInfo_PluginSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_PluginSpec proto.InternalMessageInfo func (m *PluginSpec) GetName() string { if m != nil { @@ -85,13 +105,41 @@ func (m *PluginSpec) GetEnv() []string { type PluginPrivilege struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Value []string `protobuf:"bytes,3,rep,name=value" json:"value,omitempty"` + Value []string `protobuf:"bytes,3,rep,name=value,proto3" json:"value,omitempty"` } -func (m *PluginPrivilege) Reset() { *m = PluginPrivilege{} } -func (m *PluginPrivilege) String() string { return proto.CompactTextString(m) } -func (*PluginPrivilege) ProtoMessage() {} -func (*PluginPrivilege) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{1} } +func (m *PluginPrivilege) Reset() { *m = PluginPrivilege{} } +func (m *PluginPrivilege) String() string { return proto.CompactTextString(m) } +func (*PluginPrivilege) ProtoMessage() {} +func (*PluginPrivilege) Descriptor() ([]byte, []int) { + return fileDescriptor_22a625af4bc1cc87, []int{1} +} +func (m *PluginPrivilege) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PluginPrivilege) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PluginPrivilege.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PluginPrivilege) XXX_Merge(src proto.Message) { + xxx_messageInfo_PluginPrivilege.Merge(m, src) +} +func (m *PluginPrivilege) XXX_Size() int { + return m.Size() +} +func (m *PluginPrivilege) XXX_DiscardUnknown() { + xxx_messageInfo_PluginPrivilege.DiscardUnknown(m) +} + +var xxx_messageInfo_PluginPrivilege proto.InternalMessageInfo func (m *PluginPrivilege) GetName() string { if m != nil { @@ -118,10 +166,32 @@ func init() { proto.RegisterType((*PluginSpec)(nil), "PluginSpec") proto.RegisterType((*PluginPrivilege)(nil), "PluginPrivilege") } + +func init() { proto.RegisterFile("plugin.proto", fileDescriptor_22a625af4bc1cc87) } + +var fileDescriptor_22a625af4bc1cc87 = []byte{ + // 225 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0xc8, 0x29, 0x4d, + 0xcf, 0xcc, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x9a, 0xc1, 0xc8, 0xc5, 0x15, 0x00, 0x16, + 0x08, 0x2e, 0x48, 0x4d, 0x16, 0x12, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 0x95, 0x60, 0x54, 0x60, + 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0xc4, 0xb8, 0xd8, 0x8a, 0x52, 0x73, 0xf3, 0x4b, 0x52, 0x25, + 0x98, 0xc0, 0xa2, 0x50, 0x9e, 0x90, 0x01, 0x17, 0x57, 0x41, 0x51, 0x66, 0x59, 0x66, 0x4e, 0x6a, + 0x7a, 0x6a, 0xb1, 0x04, 0xb3, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0x80, 0x1e, 0xc4, 0xb0, 0x00, 0x98, + 0x44, 0x10, 0x92, 0x1a, 0x21, 0x29, 0x2e, 0x8e, 0x94, 0xcc, 0xe2, 0xc4, 0xa4, 0x9c, 0xd4, 0x14, + 0x09, 0x16, 0x05, 0x46, 0x0d, 0x8e, 0x20, 0x38, 0x5f, 0x48, 0x80, 0x8b, 0x39, 0x35, 0xaf, 0x4c, + 0x82, 0x55, 0x81, 0x59, 0x83, 0x33, 0x08, 0xc4, 0x54, 0x8a, 0xe5, 0xe2, 0x47, 0x33, 0x0c, 0xab, + 0xf3, 0x14, 0xb8, 0xb8, 0x53, 0x52, 0x8b, 0x93, 0x8b, 0x32, 0x0b, 0x4a, 0x32, 0xf3, 0xf3, 0xa0, + 0x6e, 0x44, 0x16, 0x12, 0x12, 0xe1, 0x62, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0x05, 0xbb, 0x91, 0x33, + 0x08, 0xc2, 0x71, 0x92, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, + 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x24, 0x36, + 0x70, 0xd0, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x37, 0xea, 0xe2, 0xca, 0x2a, 0x01, 0x00, + 0x00, +} + func (m *PluginSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -129,66 +199,69 @@ func (m *PluginSpec) Marshal() (dAtA []byte, err error) { } func (m *PluginSpec) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PluginSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPlugin(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.Remote) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPlugin(dAtA, i, uint64(len(m.Remote))) - i += copy(dAtA[i:], m.Remote) - } - if len(m.Privileges) > 0 { - for _, msg := range m.Privileges { - dAtA[i] = 0x1a - i++ - i = encodeVarintPlugin(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n + if len(m.Env) > 0 { + for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Env[iNdEx]) + copy(dAtA[i:], m.Env[iNdEx]) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Env[iNdEx]))) + i-- + dAtA[i] = 0x2a } } if m.Disabled { - dAtA[i] = 0x20 - i++ + i-- if m.Disabled { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x20 } - if len(m.Env) > 0 { - for _, s := range m.Env { - dAtA[i] = 0x2a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ + if len(m.Privileges) > 0 { + for iNdEx := len(m.Privileges) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Privileges[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlugin(dAtA, i, uint64(size)) } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) + i-- + dAtA[i] = 0x1a } } - return i, nil + if len(m.Remote) > 0 { + i -= len(m.Remote) + copy(dAtA[i:], m.Remote) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Remote))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *PluginPrivilege) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -196,50 +269,56 @@ func (m *PluginPrivilege) Marshal() (dAtA []byte, err error) { } func (m *PluginPrivilege) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PluginPrivilege) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPlugin(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.Description) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPlugin(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) - } if len(m.Value) > 0 { - for _, s := range m.Value { + for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Value[iNdEx]) + copy(dAtA[i:], m.Value[iNdEx]) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Value[iNdEx]))) + i-- dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - return i, nil + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintPlugin(dAtA []byte, offset int, v uint64) int { + offset -= sovPlugin(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *PluginSpec) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -269,6 +348,9 @@ func (m *PluginSpec) Size() (n int) { } func (m *PluginPrivilege) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -289,14 +371,7 @@ func (m *PluginPrivilege) Size() (n int) { } func sovPlugin(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPlugin(x uint64) (n int) { return sovPlugin(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -316,7 +391,7 @@ func (m *PluginSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -344,7 +419,7 @@ func (m *PluginSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -354,6 +429,9 @@ func (m *PluginSpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlugin } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -373,7 +451,7 @@ func (m *PluginSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -383,6 +461,9 @@ func (m *PluginSpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlugin } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -402,7 +483,7 @@ func (m *PluginSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -411,6 +492,9 @@ func (m *PluginSpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlugin } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -433,7 +517,7 @@ func (m *PluginSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -453,7 +537,7 @@ func (m *PluginSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -463,6 +547,9 @@ func (m *PluginSpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlugin } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -474,7 +561,7 @@ func (m *PluginSpec) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlugin } if (iNdEx + skippy) > l { @@ -504,7 +591,7 @@ func (m *PluginPrivilege) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -532,7 +619,7 @@ func (m *PluginPrivilege) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -542,6 +629,9 @@ func (m *PluginPrivilege) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlugin } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -561,7 +651,7 @@ func (m *PluginPrivilege) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -571,6 +661,9 @@ func (m *PluginPrivilege) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlugin } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -590,7 +683,7 @@ func (m *PluginPrivilege) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -600,6 +693,9 @@ func (m *PluginPrivilege) Unmarshal(dAtA []byte) error { return ErrInvalidLengthPlugin } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -611,7 +707,7 @@ func (m *PluginPrivilege) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPlugin } if (iNdEx + skippy) > l { @@ -629,6 +725,7 @@ func (m *PluginPrivilege) Unmarshal(dAtA []byte) error { func skipPlugin(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -660,10 +757,8 @@ func skipPlugin(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -680,75 +775,34 @@ func skipPlugin(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthPlugin } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPlugin - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipPlugin(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPlugin + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthPlugin + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthPlugin = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPlugin = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthPlugin = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPlugin = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPlugin = fmt.Errorf("proto: unexpected end of group") ) - -func init() { proto.RegisterFile("plugin.proto", fileDescriptorPlugin) } - -var fileDescriptorPlugin = []byte{ - // 256 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x4d, 0x4b, 0xc3, 0x30, - 0x18, 0xc7, 0x89, 0xdd, 0xc6, 0xfa, 0x4c, 0x70, 0x04, 0x91, 0xe2, 0xa1, 0x94, 0x9d, 0x7a, 0x6a, - 0x45, 0x2f, 0x82, 0x37, 0x0f, 0x9e, 0x47, 0xbc, 0x09, 0x1e, 0xd2, 0xf6, 0xa1, 0x06, 0x9b, 0x17, - 0x92, 0xb4, 0xe2, 0x37, 0xf1, 0x23, 0x79, 0xf4, 0x23, 0x48, 0x3f, 0x89, 0x98, 0x75, 0x32, 0x64, - 0xa7, 0xff, 0x4b, 0xc2, 0x9f, 0x1f, 0x0f, 0x9c, 0x9a, 0xae, 0x6f, 0x85, 0x2a, 0x8c, 0xd5, 0x5e, - 0x6f, 0x3e, 0x08, 0xc0, 0x36, 0x14, 0x8f, 0x06, 0x6b, 0x4a, 0x61, 0xa6, 0xb8, 0xc4, 0x84, 0x64, - 0x24, 0x8f, 0x59, 0xf0, 0xf4, 0x02, 0x16, 0x16, 0xa5, 0xf6, 0x98, 0x9c, 0x84, 0x76, 0x4a, 0xf4, - 0x0a, 0xc0, 0x58, 0x31, 0x88, 0x0e, 0x5b, 0x74, 0x49, 0x94, 0x45, 0xf9, 0xea, 0x7a, 0x5d, 0xec, - 0xc6, 0xb6, 0xfb, 0x07, 0x76, 0xf0, 0x87, 0x5e, 0xc2, 0xb2, 0x11, 0x8e, 0x57, 0x1d, 0x36, 0xc9, - 0x2c, 0x23, 0xf9, 0x92, 0xfd, 0x65, 0xba, 0x86, 0x08, 0xd5, 0x90, 0xcc, 0xb3, 0x28, 0x8f, 0xd9, - 0xaf, 0xdd, 0x3c, 0xc3, 0xd9, 0xbf, 0xb1, 0xa3, 0x78, 0x19, 0xac, 0x1a, 0x74, 0xb5, 0x15, 0xc6, - 0x0b, 0xad, 0x26, 0xc6, 0xc3, 0x8a, 0x9e, 0xc3, 0x7c, 0xe0, 0x5d, 0x8f, 0x81, 0x31, 0x66, 0xbb, - 0x70, 0xff, 0xf0, 0x39, 0xa6, 0xe4, 0x6b, 0x4c, 0xc9, 0xf7, 0x98, 0x92, 0xa7, 0xdb, 0x56, 0xf8, - 0x97, 0xbe, 0x2a, 0x6a, 0x2d, 0xcb, 0x46, 0xd7, 0xaf, 0x68, 0xf7, 0xc2, 0x8d, 0x28, 0xfd, 0xbb, - 0x41, 0x57, 0xba, 0x37, 0x6e, 0x65, 0x69, 0x7b, 0xe5, 0x85, 0xc4, 0xbb, 0x49, 0xab, 0x45, 0x38, - 0xe4, 0xcd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0xa8, 0xd9, 0x9b, 0x58, 0x01, 0x00, 0x00, -} diff --git a/builder/remotecontext/tarsum.pb.go b/builder/remotecontext/tarsum.pb.go index 1d23bbe65b..d41e6677d4 100644 --- a/builder/remotecontext/tarsum.pb.go +++ b/builder/remotecontext/tarsum.pb.go @@ -1,27 +1,18 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: tarsum.proto -// DO NOT EDIT! -/* -Package remotecontext is a generated protocol buffer package. - -It is generated from these files: - tarsum.proto - -It has these top-level messages: - TarsumBackup -*/ package remotecontext -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import strings "strings" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -32,15 +23,43 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type TarsumBackup struct { - Hashes map[string]string `protobuf:"bytes,1,rep,name=Hashes" json:"Hashes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Hashes map[string]string `protobuf:"bytes,1,rep,name=Hashes,proto3" json:"Hashes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *TarsumBackup) Reset() { *m = TarsumBackup{} } -func (*TarsumBackup) ProtoMessage() {} -func (*TarsumBackup) Descriptor() ([]byte, []int) { return fileDescriptorTarsum, []int{0} } +func (m *TarsumBackup) Reset() { *m = TarsumBackup{} } +func (*TarsumBackup) ProtoMessage() {} +func (*TarsumBackup) Descriptor() ([]byte, []int) { + return fileDescriptor_375be7466b474c4d, []int{0} +} +func (m *TarsumBackup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TarsumBackup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TarsumBackup.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TarsumBackup) XXX_Merge(src proto.Message) { + xxx_messageInfo_TarsumBackup.Merge(m, src) +} +func (m *TarsumBackup) XXX_Size() int { + return m.Size() +} +func (m *TarsumBackup) XXX_DiscardUnknown() { + xxx_messageInfo_TarsumBackup.DiscardUnknown(m) +} + +var xxx_messageInfo_TarsumBackup proto.InternalMessageInfo func (m *TarsumBackup) GetHashes() map[string]string { if m != nil { @@ -51,13 +70,31 @@ func (m *TarsumBackup) GetHashes() map[string]string { func init() { proto.RegisterType((*TarsumBackup)(nil), "remotecontext.TarsumBackup") + proto.RegisterMapType((map[string]string)(nil), "remotecontext.TarsumBackup.HashesEntry") } + +func init() { proto.RegisterFile("tarsum.proto", fileDescriptor_375be7466b474c4d) } + +var fileDescriptor_375be7466b474c4d = []byte{ + // 205 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x49, 0x2c, 0x2a, + 0x2e, 0xcd, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2d, 0x4a, 0xcd, 0xcd, 0x2f, 0x49, + 0x4d, 0xce, 0xcf, 0x2b, 0x49, 0xad, 0x28, 0x51, 0xea, 0x62, 0xe4, 0xe2, 0x09, 0x01, 0xcb, 0x3b, + 0x25, 0x26, 0x67, 0x97, 0x16, 0x08, 0xd9, 0x73, 0xb1, 0x79, 0x24, 0x16, 0x67, 0xa4, 0x16, 0x4b, + 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x1b, 0xa9, 0xeb, 0xa1, 0x68, 0xd0, 0x43, 0x56, 0xac, 0x07, 0x51, + 0xe9, 0x9a, 0x57, 0x52, 0x54, 0x19, 0x04, 0xd5, 0x26, 0x65, 0xc9, 0xc5, 0x8d, 0x24, 0x2c, 0x24, + 0xc0, 0xc5, 0x9c, 0x9d, 0x5a, 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0x62, 0x0a, 0x89, + 0x70, 0xb1, 0x96, 0x25, 0xe6, 0x94, 0xa6, 0x4a, 0x30, 0x81, 0xc5, 0x20, 0x1c, 0x2b, 0x26, 0x0b, + 0x46, 0x27, 0x93, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, 0xf0, 0x50, 0x8e, 0xb1, + 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, + 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8b, 0x47, 0x72, 0x0c, 0x1f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, + 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x49, 0x6c, 0x60, 0x8f, 0x19, 0x03, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x9e, 0xc6, 0xaf, 0xd0, 0xe8, 0x00, 0x00, 0x00, +} + func (this *TarsumBackup) Equal(that interface{}) bool { if that == nil { - if this == nil { - return true - } - return false + return this == nil } that1, ok := that.(*TarsumBackup) @@ -70,10 +107,7 @@ func (this *TarsumBackup) Equal(that interface{}) bool { } } if that1 == nil { - if this == nil { - return true - } - return false + return this == nil } else if this == nil { return false } @@ -94,7 +128,7 @@ func (this *TarsumBackup) GoString() string { s := make([]string, 0, 5) s = append(s, "&remotecontext.TarsumBackup{") keysForHashes := make([]string, 0, len(this.Hashes)) - for k := range this.Hashes { + for k, _ := range this.Hashes { keysForHashes = append(keysForHashes, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForHashes) @@ -120,7 +154,7 @@ func valueToGoStringTarsum(v interface{}, typ string) string { func (m *TarsumBackup) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -128,58 +162,52 @@ func (m *TarsumBackup) Marshal() (dAtA []byte, err error) { } func (m *TarsumBackup) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TarsumBackup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Hashes) > 0 { for k := range m.Hashes { - dAtA[i] = 0xa - i++ v := m.Hashes[k] - mapSize := 1 + len(k) + sovTarsum(uint64(len(k))) + 1 + len(v) + sovTarsum(uint64(len(v))) - i = encodeVarintTarsum(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintTarsum(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintTarsum(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintTarsum(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintTarsum(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } -func encodeFixed64Tarsum(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Tarsum(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} func encodeVarintTarsum(dAtA []byte, offset int, v uint64) int { + offset -= sovTarsum(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *TarsumBackup) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Hashes) > 0 { @@ -194,14 +222,7 @@ func (m *TarsumBackup) Size() (n int) { } func sovTarsum(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTarsum(x uint64) (n int) { return sovTarsum(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -211,7 +232,7 @@ func (this *TarsumBackup) String() string { return "nil" } keysForHashes := make([]string, 0, len(this.Hashes)) - for k := range this.Hashes { + for k, _ := range this.Hashes { keysForHashes = append(keysForHashes, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForHashes) @@ -249,7 +270,7 @@ func (m *TarsumBackup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -277,7 +298,7 @@ func (m *TarsumBackup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -286,54 +307,20 @@ func (m *TarsumBackup) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTarsum } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTarsum + } if postIndex > l { return io.ErrUnexpectedEOF } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTarsum - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTarsum - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTarsum - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey if m.Hashes == nil { m.Hashes = make(map[string]string) } - if iNdEx < postIndex { - var valuekey uint64 + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTarsum @@ -343,41 +330,86 @@ func (m *TarsumBackup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTarsum + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTarsum + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTarsum + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthTarsum + } + if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTarsum + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTarsum + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthTarsum + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTarsum(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTarsum + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTarsum - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.Hashes[mapkey] = mapvalue - } else { - var mapvalue string - m.Hashes[mapkey] = mapvalue } + m.Hashes[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -385,7 +417,7 @@ func (m *TarsumBackup) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTarsum } if (iNdEx + skippy) > l { @@ -403,6 +435,7 @@ func (m *TarsumBackup) Unmarshal(dAtA []byte) error { func skipTarsum(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -434,10 +467,8 @@ func skipTarsum(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -454,72 +485,34 @@ func skipTarsum(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthTarsum } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTarsum - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipTarsum(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTarsum + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthTarsum + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthTarsum = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTarsum = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthTarsum = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTarsum = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTarsum = fmt.Errorf("proto: unexpected end of group") ) - -func init() { proto.RegisterFile("tarsum.proto", fileDescriptorTarsum) } - -var fileDescriptorTarsum = []byte{ - // 196 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0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-} diff --git a/libnetwork/agent.pb.go b/libnetwork/agent.pb.go index 4092973c9b..f543d3e0c4 100644 --- a/libnetwork/agent.pb.go +++ b/libnetwork/agent.pb.go @@ -1,27 +1,18 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: agent.proto -/* - Package libnetwork is a generated protocol buffer package. - - It is generated from these files: - agent.proto - - It has these top-level messages: - EndpointRecord - PortConfig -*/ package libnetwork -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import strings "strings" -import reflect "reflect" - -import io "io" +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -32,7 +23,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type PortConfig_Protocol int32 @@ -47,6 +38,7 @@ var PortConfig_Protocol_name = map[int32]string{ 1: "UDP", 2: "SCTP", } + var PortConfig_Protocol_value = map[string]int32{ "TCP": 0, "UDP": 1, @@ -56,7 +48,10 @@ var PortConfig_Protocol_value = map[string]int32{ func (x PortConfig_Protocol) String() string { return proto.EnumName(PortConfig_Protocol_name, int32(x)) } -func (PortConfig_Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 0} } + +func (PortConfig_Protocol) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_56ede974c0020f77, []int{1, 0} +} // EndpointRecord specifies all the endpoint specific information that // needs to gossiped to nodes participating in the network. @@ -72,18 +67,46 @@ type EndpointRecord struct { // IP assigned to this endpoint. EndpointIP string `protobuf:"bytes,5,opt,name=endpoint_ip,json=endpointIp,proto3" json:"endpoint_ip,omitempty"` // IngressPorts exposed by the service to which this endpoint belongs. - IngressPorts []*PortConfig `protobuf:"bytes,6,rep,name=ingress_ports,json=ingressPorts" json:"ingress_ports,omitempty"` + IngressPorts []*PortConfig `protobuf:"bytes,6,rep,name=ingress_ports,json=ingressPorts,proto3" json:"ingress_ports,omitempty"` // A list of aliases which are alternate names for the service - Aliases []string `protobuf:"bytes,7,rep,name=aliases" json:"aliases,omitempty"` + Aliases []string `protobuf:"bytes,7,rep,name=aliases,proto3" json:"aliases,omitempty"` // List of aliases task specific aliases - TaskAliases []string `protobuf:"bytes,8,rep,name=task_aliases,json=taskAliases" json:"task_aliases,omitempty"` + TaskAliases []string `protobuf:"bytes,8,rep,name=task_aliases,json=taskAliases,proto3" json:"task_aliases,omitempty"` // Whether this enpoint's service has been disabled ServiceDisabled bool `protobuf:"varint,9,opt,name=service_disabled,json=serviceDisabled,proto3" json:"service_disabled,omitempty"` } -func (m *EndpointRecord) Reset() { *m = EndpointRecord{} } -func (*EndpointRecord) ProtoMessage() {} -func (*EndpointRecord) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0} } +func (m *EndpointRecord) Reset() { *m = EndpointRecord{} } +func (*EndpointRecord) ProtoMessage() {} +func (*EndpointRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_56ede974c0020f77, []int{0} +} +func (m *EndpointRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EndpointRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EndpointRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EndpointRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_EndpointRecord.Merge(m, src) +} +func (m *EndpointRecord) XXX_Size() int { + return m.Size() +} +func (m *EndpointRecord) XXX_DiscardUnknown() { + xxx_messageInfo_EndpointRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_EndpointRecord proto.InternalMessageInfo func (m *EndpointRecord) GetName() string { if m != nil { @@ -170,9 +193,37 @@ type PortConfig struct { PublishedPort uint32 `protobuf:"varint,4,opt,name=published_port,json=publishedPort,proto3" json:"published_port,omitempty"` } -func (m *PortConfig) Reset() { *m = PortConfig{} } -func (*PortConfig) ProtoMessage() {} -func (*PortConfig) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1} } +func (m *PortConfig) Reset() { *m = PortConfig{} } +func (*PortConfig) ProtoMessage() {} +func (*PortConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_56ede974c0020f77, []int{1} +} +func (m *PortConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PortConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PortConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PortConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_PortConfig.Merge(m, src) +} +func (m *PortConfig) XXX_Size() int { + return m.Size() +} +func (m *PortConfig) XXX_DiscardUnknown() { + xxx_messageInfo_PortConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_PortConfig proto.InternalMessageInfo func (m *PortConfig) GetName() string { if m != nil { @@ -203,10 +254,48 @@ func (m *PortConfig) GetPublishedPort() uint32 { } func init() { + proto.RegisterEnum("libnetwork.PortConfig_Protocol", PortConfig_Protocol_name, PortConfig_Protocol_value) proto.RegisterType((*EndpointRecord)(nil), "libnetwork.EndpointRecord") proto.RegisterType((*PortConfig)(nil), "libnetwork.PortConfig") - proto.RegisterEnum("libnetwork.PortConfig_Protocol", PortConfig_Protocol_name, PortConfig_Protocol_value) } + +func init() { proto.RegisterFile("agent.proto", fileDescriptor_56ede974c0020f77) } + +var fileDescriptor_56ede974c0020f77 = []byte{ + // 486 bytes of a gzipped FileDescriptorProto + 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xaf, 0x60, 0x90, + 0x6f, 0xa2, 0x94, 0x89, 0x73, 0x1a, 0x57, 0x4e, 0x47, 0x3b, 0xfd, 0x47, 0xaa, 0xb4, 0xc9, 0x67, + 0xe8, 0x36, 0x7f, 0x47, 0x0e, 0xb4, 0x97, 0xf3, 0x60, 0x68, 0x8c, 0x0e, 0xae, 0x6f, 0x5c, 0xbb, + 0xc1, 0xcb, 0x79, 0xa0, 0x92, 0xd3, 0x45, 0x30, 0x34, 0xff, 0x4f, 0x4e, 0x17, 0x01, 0x1a, 0x41, + 0xe7, 0x64, 0xbe, 0x0c, 0x86, 0xad, 0xd1, 0xf0, 0xfa, 0xc6, 0xed, 0x35, 0x91, 0x62, 0xa3, 0xce, + 0xf7, 0x9f, 0xd8, 0x38, 0x7e, 0x79, 0xf7, 0x80, 0x8d, 0x3f, 0x0f, 0xd8, 0xfc, 0x5a, 0x62, 0xf3, + 0x57, 0x89, 0xcd, 0xdb, 0x12, 0x9b, 0xbf, 0x4b, 0x6c, 0xfe, 0xd8, 0x62, 0xe3, 0x76, 0x8b, 0x8d, + 0xbb, 0x2d, 0x36, 0xa2, 0x3d, 0x7d, 0xb3, 0x77, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xc6, + 0x3a, 0x88, 0xfc, 0x02, 0x00, 0x00, +} + func (this *EndpointRecord) GoString() string { if this == nil { return "nil" @@ -251,7 +340,7 @@ func valueToGoStringAgent(v interface{}, typ string) string { func (m *EndpointRecord) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -259,99 +348,99 @@ func (m *EndpointRecord) Marshal() (dAtA []byte, err error) { } func (m *EndpointRecord) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EndpointRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.ServiceName) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.ServiceName))) - i += copy(dAtA[i:], m.ServiceName) - } - if len(m.ServiceID) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.ServiceID))) - i += copy(dAtA[i:], m.ServiceID) - } - if len(m.VirtualIP) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.VirtualIP))) - i += copy(dAtA[i:], m.VirtualIP) - } - if len(m.EndpointIP) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.EndpointIP))) - i += copy(dAtA[i:], m.EndpointIP) - } - if len(m.IngressPorts) > 0 { - for _, msg := range m.IngressPorts { - dAtA[i] = 0x32 - i++ - i = encodeVarintAgent(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Aliases) > 0 { - for _, s := range m.Aliases { - dAtA[i] = 0x3a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.TaskAliases) > 0 { - for _, s := range m.TaskAliases { - dAtA[i] = 0x42 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } if m.ServiceDisabled { - dAtA[i] = 0x48 - i++ + i-- if m.ServiceDisabled { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x48 } - return i, nil + if len(m.TaskAliases) > 0 { + for iNdEx := len(m.TaskAliases) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TaskAliases[iNdEx]) + copy(dAtA[i:], m.TaskAliases[iNdEx]) + i = encodeVarintAgent(dAtA, i, uint64(len(m.TaskAliases[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + if len(m.Aliases) > 0 { + for iNdEx := len(m.Aliases) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Aliases[iNdEx]) + copy(dAtA[i:], m.Aliases[iNdEx]) + i = encodeVarintAgent(dAtA, i, uint64(len(m.Aliases[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.IngressPorts) > 0 { + for iNdEx := len(m.IngressPorts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.IngressPorts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAgent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.EndpointIP) > 0 { + i -= len(m.EndpointIP) + copy(dAtA[i:], m.EndpointIP) + i = encodeVarintAgent(dAtA, i, uint64(len(m.EndpointIP))) + i-- + dAtA[i] = 0x2a + } + if len(m.VirtualIP) > 0 { + i -= len(m.VirtualIP) + copy(dAtA[i:], m.VirtualIP) + i = encodeVarintAgent(dAtA, i, uint64(len(m.VirtualIP))) + i-- + dAtA[i] = 0x22 + } + if len(m.ServiceID) > 0 { + i -= len(m.ServiceID) + copy(dAtA[i:], m.ServiceID) + i = encodeVarintAgent(dAtA, i, uint64(len(m.ServiceID))) + i-- + dAtA[i] = 0x1a + } + if len(m.ServiceName) > 0 { + i -= len(m.ServiceName) + copy(dAtA[i:], m.ServiceName) + i = encodeVarintAgent(dAtA, i, uint64(len(m.ServiceName))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintAgent(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *PortConfig) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -359,44 +448,55 @@ func (m *PortConfig) Marshal() (dAtA []byte, err error) { } func (m *PortConfig) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PortConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Protocol != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintAgent(dAtA, i, uint64(m.Protocol)) + if m.PublishedPort != 0 { + i = encodeVarintAgent(dAtA, i, uint64(m.PublishedPort)) + i-- + dAtA[i] = 0x20 } if m.TargetPort != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintAgent(dAtA, i, uint64(m.TargetPort)) + i-- + dAtA[i] = 0x18 } - if m.PublishedPort != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintAgent(dAtA, i, uint64(m.PublishedPort)) + if m.Protocol != 0 { + i = encodeVarintAgent(dAtA, i, uint64(m.Protocol)) + i-- + dAtA[i] = 0x10 } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintAgent(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintAgent(dAtA []byte, offset int, v uint64) int { + offset -= sovAgent(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *EndpointRecord) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -444,6 +544,9 @@ func (m *EndpointRecord) Size() (n int) { } func (m *PortConfig) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -463,14 +566,7 @@ func (m *PortConfig) Size() (n int) { } func sovAgent(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozAgent(x uint64) (n int) { return sovAgent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -479,13 +575,18 @@ func (this *EndpointRecord) String() string { if this == nil { return "nil" } + repeatedStringForIngressPorts := "[]*PortConfig{" + for _, f := range this.IngressPorts { + repeatedStringForIngressPorts += strings.Replace(f.String(), "PortConfig", "PortConfig", 1) + "," + } + repeatedStringForIngressPorts += "}" s := strings.Join([]string{`&EndpointRecord{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`, `ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`, `VirtualIP:` + fmt.Sprintf("%v", this.VirtualIP) + `,`, `EndpointIP:` + fmt.Sprintf("%v", this.EndpointIP) + `,`, - `IngressPorts:` + strings.Replace(fmt.Sprintf("%v", this.IngressPorts), "PortConfig", "PortConfig", 1) + `,`, + `IngressPorts:` + repeatedStringForIngressPorts + `,`, `Aliases:` + fmt.Sprintf("%v", this.Aliases) + `,`, `TaskAliases:` + fmt.Sprintf("%v", this.TaskAliases) + `,`, `ServiceDisabled:` + fmt.Sprintf("%v", this.ServiceDisabled) + `,`, @@ -529,7 +630,7 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -557,7 +658,7 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -567,6 +668,9 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgent } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgent + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -586,7 +690,7 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -596,6 +700,9 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgent } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgent + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -615,7 +722,7 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -625,6 +732,9 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgent } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgent + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -644,7 +754,7 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -654,6 +764,9 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgent } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgent + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -673,7 +786,7 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -683,6 +796,9 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgent } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgent + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -702,7 +818,7 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -711,6 +827,9 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgent } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAgent + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -733,7 +852,7 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -743,6 +862,9 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgent } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgent + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -762,7 +884,7 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -772,6 +894,9 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgent } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgent + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -791,7 +916,7 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -803,7 +928,7 @@ func (m *EndpointRecord) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgent } if (iNdEx + skippy) > l { @@ -833,7 +958,7 @@ func (m *PortConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -861,7 +986,7 @@ func (m *PortConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -871,6 +996,9 @@ func (m *PortConfig) Unmarshal(dAtA []byte) error { return ErrInvalidLengthAgent } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAgent + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -890,7 +1018,7 @@ func (m *PortConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Protocol |= (PortConfig_Protocol(b) & 0x7F) << shift + m.Protocol |= PortConfig_Protocol(b&0x7F) << shift if b < 0x80 { break } @@ -909,7 +1037,7 @@ func (m *PortConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TargetPort |= (uint32(b) & 0x7F) << shift + m.TargetPort |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -928,7 +1056,7 @@ func (m *PortConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PublishedPort |= (uint32(b) & 0x7F) << shift + m.PublishedPort |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -939,7 +1067,7 @@ func (m *PortConfig) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAgent } if (iNdEx + skippy) > l { @@ -957,6 +1085,7 @@ func (m *PortConfig) Unmarshal(dAtA []byte) error { func skipAgent(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -988,10 +1117,8 @@ func skipAgent(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1008,88 +1135,34 @@ func skipAgent(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthAgent } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAgent - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipAgent(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAgent + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthAgent + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthAgent = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAgent = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthAgent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAgent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAgent = fmt.Errorf("proto: unexpected end of group") ) - -func init() { proto.RegisterFile("agent.proto", fileDescriptorAgent) } - -var fileDescriptorAgent = []byte{ - // 459 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c,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 0x99, 0x05, 0xbd, 0xe8, 0xe8, 0xe6, 0x36, 0xf1, 0x2d, - 0x5e, 0x2f, 0x33, 0x95, 0x5c, 0xac, 0xb2, 0xc0, 0xf9, 0x37, 0xb9, 0x58, 0x65, 0x28, 0x02, 0xf7, - 0x7c, 0xb9, 0xce, 0x82, 0x7e, 0x14, 0xdc, 0xdc, 0x26, 0x23, 0x1b, 0x29, 0x16, 0xb9, 0x5f, 0xbf, - 0xc5, 0xbd, 0xb3, 0xf0, 0xe7, 0x7d, 0xdc, 0xfb, 0x7d, 0x1f, 0x3b, 0x9f, 0xdb, 0xd8, 0xf9, 0xde, - 0xc6, 0xce, 0x8f, 0x36, 0x76, 0x7e, 0xb5, 0xb1, 0xb3, 0x3d, 0xd0, 0xaf, 0x79, 0xf9, 0x37, 0x00, - 0x00, 0xff, 0xff, 0x55, 0x29, 0x75, 0x5c, 0xd7, 0x02, 0x00, 0x00, -} diff --git a/libnetwork/drivers/overlay/overlay.pb.go b/libnetwork/drivers/overlay/overlay.pb.go index 243c196541..6426a3c6a5 100644 --- a/libnetwork/drivers/overlay/overlay.pb.go +++ b/libnetwork/drivers/overlay/overlay.pb.go @@ -1,26 +1,18 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: drivers/overlay/overlay.proto +// source: overlay.proto -/* - Package overlay is a generated protocol buffer package. - - It is generated from these files: - drivers/overlay/overlay.proto - - It has these top-level messages: - PeerRecord -*/ package overlay -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import strings "strings" -import reflect "reflect" - -import io "io" +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -31,7 +23,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // PeerRecord defines the information corresponding to a peer // container in the overlay network. @@ -48,9 +40,37 @@ type PeerRecord struct { TunnelEndpointIP string `protobuf:"bytes,3,opt,name=tunnel_endpoint_ip,json=tunnelEndpointIp,proto3" json:"tunnel_endpoint_ip,omitempty"` } -func (m *PeerRecord) Reset() { *m = PeerRecord{} } -func (*PeerRecord) ProtoMessage() {} -func (*PeerRecord) Descriptor() ([]byte, []int) { return fileDescriptorOverlay, []int{0} } +func (m *PeerRecord) Reset() { *m = PeerRecord{} } +func (*PeerRecord) ProtoMessage() {} +func (*PeerRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_61fc82527fbe24ad, []int{0} +} +func (m *PeerRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PeerRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PeerRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PeerRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_PeerRecord.Merge(m, src) +} +func (m *PeerRecord) XXX_Size() int { + return m.Size() +} +func (m *PeerRecord) XXX_DiscardUnknown() { + xxx_messageInfo_PeerRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_PeerRecord proto.InternalMessageInfo func (m *PeerRecord) GetEndpointIP() string { if m != nil { @@ -76,6 +96,28 @@ func (m *PeerRecord) GetTunnelEndpointIP() string { func init() { proto.RegisterType((*PeerRecord)(nil), "overlay.PeerRecord") } + +func init() { proto.RegisterFile("overlay.proto", fileDescriptor_61fc82527fbe24ad) } + +var fileDescriptor_61fc82527fbe24ad = []byte{ + // 233 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0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x3c, 0x92, 0x63, + 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, + 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x89, 0x0d, 0xec, 0x49, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xd4, 0x37, 0x59, 0xc8, 0x2d, 0x01, 0x00, 0x00, +} + func (this *PeerRecord) GoString() string { if this == nil { return "nil" @@ -99,7 +141,7 @@ func valueToGoStringOverlay(v interface{}, typ string) string { func (m *PeerRecord) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -107,41 +149,54 @@ func (m *PeerRecord) Marshal() (dAtA []byte, err error) { } func (m *PeerRecord) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PeerRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.EndpointIP) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintOverlay(dAtA, i, uint64(len(m.EndpointIP))) - i += copy(dAtA[i:], m.EndpointIP) + if len(m.TunnelEndpointIP) > 0 { + i -= len(m.TunnelEndpointIP) + copy(dAtA[i:], m.TunnelEndpointIP) + i = encodeVarintOverlay(dAtA, i, uint64(len(m.TunnelEndpointIP))) + i-- + dAtA[i] = 0x1a } if len(m.EndpointMAC) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.EndpointMAC) + copy(dAtA[i:], m.EndpointMAC) i = encodeVarintOverlay(dAtA, i, uint64(len(m.EndpointMAC))) - i += copy(dAtA[i:], m.EndpointMAC) + i-- + dAtA[i] = 0x12 } - if len(m.TunnelEndpointIP) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintOverlay(dAtA, i, uint64(len(m.TunnelEndpointIP))) - i += copy(dAtA[i:], m.TunnelEndpointIP) + if len(m.EndpointIP) > 0 { + i -= len(m.EndpointIP) + copy(dAtA[i:], m.EndpointIP) + i = encodeVarintOverlay(dAtA, i, uint64(len(m.EndpointIP))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintOverlay(dAtA []byte, offset int, v uint64) int { + offset -= sovOverlay(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *PeerRecord) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.EndpointIP) @@ -160,14 +215,7 @@ func (m *PeerRecord) Size() (n int) { } func sovOverlay(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozOverlay(x uint64) (n int) { return sovOverlay(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -207,7 +255,7 @@ func (m *PeerRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -235,7 +283,7 @@ func (m *PeerRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -245,6 +293,9 @@ func (m *PeerRecord) Unmarshal(dAtA []byte) error { return ErrInvalidLengthOverlay } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOverlay + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -264,7 +315,7 @@ func (m *PeerRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -274,6 +325,9 @@ func (m *PeerRecord) Unmarshal(dAtA []byte) error { return ErrInvalidLengthOverlay } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOverlay + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -293,7 +347,7 @@ func (m *PeerRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -303,6 +357,9 @@ func (m *PeerRecord) Unmarshal(dAtA []byte) error { return ErrInvalidLengthOverlay } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOverlay + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -314,7 +371,7 @@ func (m *PeerRecord) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOverlay } if (iNdEx + skippy) > l { @@ -332,6 +389,7 @@ func (m *PeerRecord) Unmarshal(dAtA []byte) error { func skipOverlay(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -363,10 +421,8 @@ func skipOverlay(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -383,73 +439,34 @@ func skipOverlay(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthOverlay } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOverlay - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOverlay(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupOverlay + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthOverlay + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthOverlay = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOverlay = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthOverlay = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOverlay = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupOverlay = fmt.Errorf("proto: unexpected end of group") ) - -func init() { proto.RegisterFile("drivers/overlay/overlay.proto", fileDescriptorOverlay) } - -var fileDescriptorOverlay = []byte{ - // 212 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0x29, 0xca, 0x2c, - 0x4b, 0x2d, 0x2a, 0xd6, 0xcf, 0x2f, 0x4b, 0x2d, 0xca, 0x49, 0xac, 0x84, 0xd1, 0x7a, 0x05, 0x45, - 0xf9, 0x25, 0xf9, 0x42, 0xec, 0x50, 0xae, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x58, 0x4c, 0x1f, - 0xc4, 0x82, 0x48, 0x2b, 0x6d, 0x65, 0xe4, 0xe2, 0x0a, 0x48, 0x4d, 0x2d, 0x0a, 0x4a, 0x4d, 0xce, - 0x2f, 0x4a, 0x11, 0xd2, 0xe7, 0xe2, 0x4e, 0xcd, 0x4b, 0x29, 0xc8, 0xcf, 0xcc, 0x2b, 0x89, 0xcf, - 0x2c, 0x90, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0xe2, 0x7b, 0x74, 0x4f, 0x9e, 0xcb, 0x15, 0x2a, - 0xec, 0x19, 0x10, 0xc4, 0x05, 0x53, 0xe2, 0x59, 0x20, 0x64, 0xc4, 0xc5, 0x03, 0xd7, 0x90, 0x9b, - 0x98, 0x2c, 0xc1, 0x04, 0xd6, 0xc1, 0xff, 0xe8, 0x9e, 0x3c, 0x37, 0x4c, 0x87, 0xaf, 0xa3, 0x73, - 0x10, 0xdc, 0x54, 0xdf, 0xc4, 0x64, 0x21, 0x27, 0x2e, 0xa1, 0x92, 0xd2, 0xbc, 0xbc, 0xd4, 0x9c, - 0x78, 0x64, 0xbb, 0x98, 0xc1, 0x3a, 0x45, 0x1e, 0xdd, 0x93, 0x17, 0x08, 0x01, 0xcb, 0x22, 0xd9, - 0x28, 0x50, 0x82, 0x2a, 0x52, 0xe0, 0x24, 0x71, 0xe3, 0xa1, 0x1c, 0xc3, 0x87, 0x87, 0x72, 0x8c, - 0x0d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, - 0xc6, 0x24, 0x36, 0xb0, 0xc7, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x48, 0x07, 0xf6, 0xf3, - 0x18, 0x01, 0x00, 0x00, -} diff --git a/libnetwork/networkdb/networkdb.pb.go b/libnetwork/networkdb/networkdb.pb.go index 58faed9816..1ed69fae17 100644 --- a/libnetwork/networkdb/networkdb.pb.go +++ b/libnetwork/networkdb/networkdb.pb.go @@ -1,35 +1,19 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: networkdb/networkdb.proto +// source: networkdb.proto -/* - Package networkdb is a generated protocol buffer package. - - It is generated from these files: - networkdb/networkdb.proto - - It has these top-level messages: - GossipMessage - NodeEvent - NetworkEvent - NetworkEntry - NetworkPushPull - TableEvent - BulkSyncMessage - CompoundMessage -*/ package networkdb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import github_com_hashicorp_serf_serf "github.com/hashicorp/serf/serf" - -import strings "strings" -import reflect "reflect" - -import io "io" +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_hashicorp_serf_serf "github.com/hashicorp/serf/serf" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -40,7 +24,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MessageType enum defines all the core message types that networkdb // uses to communicate to peers. @@ -80,6 +64,7 @@ var MessageType_name = map[int32]string{ 5: "COMPOUND", 6: "NODE_EVENT", } + var MessageType_value = map[string]int32{ "INVALID": 0, "NETWORK_EVENT": 1, @@ -93,7 +78,10 @@ var MessageType_value = map[string]int32{ func (x MessageType) String() string { return proto.EnumName(MessageType_name, int32(x)) } -func (MessageType) EnumDescriptor() ([]byte, []int) { return fileDescriptorNetworkdb, []int{0} } + +func (MessageType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_51036566ca8c9782, []int{0} +} type NodeEvent_Type int32 @@ -110,6 +98,7 @@ var NodeEvent_Type_name = map[int32]string{ 1: "JOIN", 2: "LEAVE", } + var NodeEvent_Type_value = map[string]int32{ "INVALID": 0, "JOIN": 1, @@ -119,7 +108,10 @@ var NodeEvent_Type_value = map[string]int32{ func (x NodeEvent_Type) String() string { return proto.EnumName(NodeEvent_Type_name, int32(x)) } -func (NodeEvent_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorNetworkdb, []int{1, 0} } + +func (NodeEvent_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_51036566ca8c9782, []int{1, 0} +} type NetworkEvent_Type int32 @@ -136,6 +128,7 @@ var NetworkEvent_Type_name = map[int32]string{ 1: "JOIN", 2: "LEAVE", } + var NetworkEvent_Type_value = map[string]int32{ "INVALID": 0, "JOIN": 1, @@ -145,8 +138,9 @@ var NetworkEvent_Type_value = map[string]int32{ func (x NetworkEvent_Type) String() string { return proto.EnumName(NetworkEvent_Type_name, int32(x)) } + func (NetworkEvent_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptorNetworkdb, []int{2, 0} + return fileDescriptor_51036566ca8c9782, []int{2, 0} } type TableEvent_Type int32 @@ -170,6 +164,7 @@ var TableEvent_Type_name = map[int32]string{ 2: "UPDATE", 3: "DELETE", } + var TableEvent_Type_value = map[string]int32{ "INVALID": 0, "CREATE": 1, @@ -180,7 +175,10 @@ var TableEvent_Type_value = map[string]int32{ func (x TableEvent_Type) String() string { return proto.EnumName(TableEvent_Type_name, int32(x)) } -func (TableEvent_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorNetworkdb, []int{5, 0} } + +func (TableEvent_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_51036566ca8c9782, []int{5, 0} +} // GossipMessage is a basic message header used by all messages types. type GossipMessage struct { @@ -188,9 +186,37 @@ type GossipMessage struct { Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` } -func (m *GossipMessage) Reset() { *m = GossipMessage{} } -func (*GossipMessage) ProtoMessage() {} -func (*GossipMessage) Descriptor() ([]byte, []int) { return fileDescriptorNetworkdb, []int{0} } +func (m *GossipMessage) Reset() { *m = GossipMessage{} } +func (*GossipMessage) ProtoMessage() {} +func (*GossipMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_51036566ca8c9782, []int{0} +} +func (m *GossipMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GossipMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GossipMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GossipMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_GossipMessage.Merge(m, src) +} +func (m *GossipMessage) XXX_Size() int { + return m.Size() +} +func (m *GossipMessage) XXX_DiscardUnknown() { + xxx_messageInfo_GossipMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_GossipMessage proto.InternalMessageInfo func (m *GossipMessage) GetType() MessageType { if m != nil { @@ -217,9 +243,37 @@ type NodeEvent struct { NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` } -func (m *NodeEvent) Reset() { *m = NodeEvent{} } -func (*NodeEvent) ProtoMessage() {} -func (*NodeEvent) Descriptor() ([]byte, []int) { return fileDescriptorNetworkdb, []int{1} } +func (m *NodeEvent) Reset() { *m = NodeEvent{} } +func (*NodeEvent) ProtoMessage() {} +func (*NodeEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_51036566ca8c9782, []int{1} +} +func (m *NodeEvent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NodeEvent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NodeEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeEvent.Merge(m, src) +} +func (m *NodeEvent) XXX_Size() int { + return m.Size() +} +func (m *NodeEvent) XXX_DiscardUnknown() { + xxx_messageInfo_NodeEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeEvent proto.InternalMessageInfo func (m *NodeEvent) GetType() NodeEvent_Type { if m != nil { @@ -248,9 +302,37 @@ type NetworkEvent struct { NetworkID string `protobuf:"bytes,4,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` } -func (m *NetworkEvent) Reset() { *m = NetworkEvent{} } -func (*NetworkEvent) ProtoMessage() {} -func (*NetworkEvent) Descriptor() ([]byte, []int) { return fileDescriptorNetworkdb, []int{2} } +func (m *NetworkEvent) Reset() { *m = NetworkEvent{} } +func (*NetworkEvent) ProtoMessage() {} +func (*NetworkEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_51036566ca8c9782, []int{2} +} +func (m *NetworkEvent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NetworkEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NetworkEvent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NetworkEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkEvent.Merge(m, src) +} +func (m *NetworkEvent) XXX_Size() int { + return m.Size() +} +func (m *NetworkEvent) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_NetworkEvent proto.InternalMessageInfo func (m *NetworkEvent) GetType() NetworkEvent_Type { if m != nil { @@ -286,9 +368,37 @@ type NetworkEntry struct { Leaving bool `protobuf:"varint,4,opt,name=leaving,proto3" json:"leaving,omitempty"` } -func (m *NetworkEntry) Reset() { *m = NetworkEntry{} } -func (*NetworkEntry) ProtoMessage() {} -func (*NetworkEntry) Descriptor() ([]byte, []int) { return fileDescriptorNetworkdb, []int{3} } +func (m *NetworkEntry) Reset() { *m = NetworkEntry{} } +func (*NetworkEntry) ProtoMessage() {} +func (*NetworkEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_51036566ca8c9782, []int{3} +} +func (m *NetworkEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NetworkEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NetworkEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NetworkEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkEntry.Merge(m, src) +} +func (m *NetworkEntry) XXX_Size() int { + return m.Size() +} +func (m *NetworkEntry) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_NetworkEntry proto.InternalMessageInfo func (m *NetworkEntry) GetNetworkID() string { if m != nil { @@ -315,14 +425,42 @@ func (m *NetworkEntry) GetLeaving() bool { type NetworkPushPull struct { // Lamport time when this push pull was initiated. LTime github_com_hashicorp_serf_serf.LamportTime `protobuf:"varint,1,opt,name=l_time,json=lTime,proto3,customtype=github.com/hashicorp/serf/serf.LamportTime" json:"l_time"` - Networks []*NetworkEntry `protobuf:"bytes,2,rep,name=networks" json:"networks,omitempty"` + Networks []*NetworkEntry `protobuf:"bytes,2,rep,name=networks,proto3" json:"networks,omitempty"` // Name of the node sending this push pull payload. NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` } -func (m *NetworkPushPull) Reset() { *m = NetworkPushPull{} } -func (*NetworkPushPull) ProtoMessage() {} -func (*NetworkPushPull) Descriptor() ([]byte, []int) { return fileDescriptorNetworkdb, []int{4} } +func (m *NetworkPushPull) Reset() { *m = NetworkPushPull{} } +func (*NetworkPushPull) ProtoMessage() {} +func (*NetworkPushPull) Descriptor() ([]byte, []int) { + return fileDescriptor_51036566ca8c9782, []int{4} +} +func (m *NetworkPushPull) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NetworkPushPull) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NetworkPushPull.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NetworkPushPull) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkPushPull.Merge(m, src) +} +func (m *NetworkPushPull) XXX_Size() int { + return m.Size() +} +func (m *NetworkPushPull) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkPushPull.DiscardUnknown(m) +} + +var xxx_messageInfo_NetworkPushPull proto.InternalMessageInfo func (m *NetworkPushPull) GetNetworks() []*NetworkEntry { if m != nil { @@ -357,9 +495,37 @@ type TableEvent struct { ResidualReapTime int32 `protobuf:"varint,8,opt,name=residual_reap_time,json=residualReapTime,proto3" json:"residual_reap_time,omitempty"` } -func (m *TableEvent) Reset() { *m = TableEvent{} } -func (*TableEvent) ProtoMessage() {} -func (*TableEvent) Descriptor() ([]byte, []int) { return fileDescriptorNetworkdb, []int{5} } +func (m *TableEvent) Reset() { *m = TableEvent{} } +func (*TableEvent) ProtoMessage() {} +func (*TableEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_51036566ca8c9782, []int{5} +} +func (m *TableEvent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TableEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TableEvent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TableEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_TableEvent.Merge(m, src) +} +func (m *TableEvent) XXX_Size() int { + return m.Size() +} +func (m *TableEvent) XXX_DiscardUnknown() { + xxx_messageInfo_TableEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_TableEvent proto.InternalMessageInfo func (m *TableEvent) GetType() TableEvent_Type { if m != nil { @@ -421,14 +587,42 @@ type BulkSyncMessage struct { NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` // List of network names whose table entries are getting // bulksynced as part of the bulksync. - Networks []string `protobuf:"bytes,4,rep,name=networks" json:"networks,omitempty"` + Networks []string `protobuf:"bytes,4,rep,name=networks,proto3" json:"networks,omitempty"` // Bulksync payload Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` } -func (m *BulkSyncMessage) Reset() { *m = BulkSyncMessage{} } -func (*BulkSyncMessage) ProtoMessage() {} -func (*BulkSyncMessage) Descriptor() ([]byte, []int) { return fileDescriptorNetworkdb, []int{6} } +func (m *BulkSyncMessage) Reset() { *m = BulkSyncMessage{} } +func (*BulkSyncMessage) ProtoMessage() {} +func (*BulkSyncMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_51036566ca8c9782, []int{6} +} +func (m *BulkSyncMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BulkSyncMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BulkSyncMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BulkSyncMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_BulkSyncMessage.Merge(m, src) +} +func (m *BulkSyncMessage) XXX_Size() int { + return m.Size() +} +func (m *BulkSyncMessage) XXX_DiscardUnknown() { + xxx_messageInfo_BulkSyncMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_BulkSyncMessage proto.InternalMessageInfo func (m *BulkSyncMessage) GetUnsolicited() bool { if m != nil { @@ -461,12 +655,40 @@ func (m *BulkSyncMessage) GetPayload() []byte { // Compound message payload definition. type CompoundMessage struct { // A list of simple messages. - Messages []*CompoundMessage_SimpleMessage `protobuf:"bytes,1,rep,name=messages" json:"messages,omitempty"` + Messages []*CompoundMessage_SimpleMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` } -func (m *CompoundMessage) Reset() { *m = CompoundMessage{} } -func (*CompoundMessage) ProtoMessage() {} -func (*CompoundMessage) Descriptor() ([]byte, []int) { return fileDescriptorNetworkdb, []int{7} } +func (m *CompoundMessage) Reset() { *m = CompoundMessage{} } +func (*CompoundMessage) ProtoMessage() {} +func (*CompoundMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_51036566ca8c9782, []int{7} +} +func (m *CompoundMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CompoundMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CompoundMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CompoundMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompoundMessage.Merge(m, src) +} +func (m *CompoundMessage) XXX_Size() int { + return m.Size() +} +func (m *CompoundMessage) XXX_DiscardUnknown() { + xxx_messageInfo_CompoundMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_CompoundMessage proto.InternalMessageInfo func (m *CompoundMessage) GetMessages() []*CompoundMessage_SimpleMessage { if m != nil { @@ -484,8 +706,34 @@ type CompoundMessage_SimpleMessage struct { func (m *CompoundMessage_SimpleMessage) Reset() { *m = CompoundMessage_SimpleMessage{} } func (*CompoundMessage_SimpleMessage) ProtoMessage() {} func (*CompoundMessage_SimpleMessage) Descriptor() ([]byte, []int) { - return fileDescriptorNetworkdb, []int{7, 0} + return fileDescriptor_51036566ca8c9782, []int{7, 0} } +func (m *CompoundMessage_SimpleMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CompoundMessage_SimpleMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CompoundMessage_SimpleMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CompoundMessage_SimpleMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompoundMessage_SimpleMessage.Merge(m, src) +} +func (m *CompoundMessage_SimpleMessage) XXX_Size() int { + return m.Size() +} +func (m *CompoundMessage_SimpleMessage) XXX_DiscardUnknown() { + xxx_messageInfo_CompoundMessage_SimpleMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_CompoundMessage_SimpleMessage proto.InternalMessageInfo func (m *CompoundMessage_SimpleMessage) GetPayload() []byte { if m != nil { @@ -495,6 +743,10 @@ func (m *CompoundMessage_SimpleMessage) GetPayload() []byte { } func init() { + proto.RegisterEnum("networkdb.MessageType", MessageType_name, MessageType_value) + proto.RegisterEnum("networkdb.NodeEvent_Type", NodeEvent_Type_name, NodeEvent_Type_value) + proto.RegisterEnum("networkdb.NetworkEvent_Type", NetworkEvent_Type_name, NetworkEvent_Type_value) + proto.RegisterEnum("networkdb.TableEvent_Type", TableEvent_Type_name, TableEvent_Type_value) proto.RegisterType((*GossipMessage)(nil), "networkdb.GossipMessage") proto.RegisterType((*NodeEvent)(nil), "networkdb.NodeEvent") proto.RegisterType((*NetworkEvent)(nil), "networkdb.NetworkEvent") @@ -504,11 +756,75 @@ func init() { proto.RegisterType((*BulkSyncMessage)(nil), "networkdb.BulkSyncMessage") proto.RegisterType((*CompoundMessage)(nil), "networkdb.CompoundMessage") proto.RegisterType((*CompoundMessage_SimpleMessage)(nil), "networkdb.CompoundMessage.SimpleMessage") - proto.RegisterEnum("networkdb.MessageType", MessageType_name, MessageType_value) - proto.RegisterEnum("networkdb.NodeEvent_Type", NodeEvent_Type_name, NodeEvent_Type_value) - proto.RegisterEnum("networkdb.NetworkEvent_Type", NetworkEvent_Type_name, NetworkEvent_Type_value) - proto.RegisterEnum("networkdb.TableEvent_Type", TableEvent_Type_name, TableEvent_Type_value) } + +func init() { proto.RegisterFile("networkdb.proto", fileDescriptor_51036566ca8c9782) } + +var fileDescriptor_51036566ca8c9782 = []byte{ + // 975 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 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 0x7b, 0x6f, 0x2f, 0x85, 0xc4, 0xdf, + 0x97, 0x02, 0xfa, 0x6e, 0x2e, 0xa0, 0xd7, 0x73, 0x01, 0xbd, 0x99, 0x0b, 0xe8, 0xaf, 0xb9, 0x80, + 0x7e, 0xbc, 0x12, 0x12, 0x6f, 0xae, 0x84, 0xc4, 0xdb, 0x2b, 0x21, 0xd1, 0xcb, 0x92, 0xcf, 0xa8, + 0x27, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x82, 0xf0, 0x4d, 0x63, 0x93, 0x09, 0x00, 0x00, +} + func (this *GossipMessage) GoString() string { if this == nil { return "nil" @@ -636,7 +952,7 @@ func valueToGoStringNetworkdb(v interface{}, typ string) string { func (m *GossipMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -644,28 +960,34 @@ func (m *GossipMessage) Marshal() (dAtA []byte, err error) { } func (m *GossipMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GossipMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(m.Type)) - } if len(m.Data) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Data) + copy(dAtA[i:], m.Data) i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) + i-- + dAtA[i] = 0x12 } - return i, nil + if m.Type != 0 { + i = encodeVarintNetworkdb(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *NodeEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -673,33 +995,39 @@ func (m *NodeEvent) Marshal() (dAtA []byte, err error) { } func (m *NodeEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(m.Type)) + if len(m.NodeName) > 0 { + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x1a } if m.LTime != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintNetworkdb(dAtA, i, uint64(m.LTime)) + i-- + dAtA[i] = 0x10 } - if len(m.NodeName) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NodeName))) - i += copy(dAtA[i:], m.NodeName) + if m.Type != 0 { + i = encodeVarintNetworkdb(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *NetworkEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -707,39 +1035,46 @@ func (m *NetworkEvent) Marshal() (dAtA []byte, err error) { } func (m *NetworkEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NetworkEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(m.Type)) - } - if m.LTime != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(m.LTime)) + if len(m.NetworkID) > 0 { + i -= len(m.NetworkID) + copy(dAtA[i:], m.NetworkID) + i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NetworkID))) + i-- + dAtA[i] = 0x22 } if len(m.NodeName) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NodeName))) - i += copy(dAtA[i:], m.NodeName) + i-- + dAtA[i] = 0x1a } - if len(m.NetworkID) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NetworkID))) - i += copy(dAtA[i:], m.NetworkID) + if m.LTime != 0 { + i = encodeVarintNetworkdb(dAtA, i, uint64(m.LTime)) + i-- + dAtA[i] = 0x10 } - return i, nil + if m.Type != 0 { + i = encodeVarintNetworkdb(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *NetworkEntry) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -747,44 +1082,51 @@ func (m *NetworkEntry) Marshal() (dAtA []byte, err error) { } func (m *NetworkEntry) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NetworkEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.NetworkID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NetworkID))) - i += copy(dAtA[i:], m.NetworkID) - } - if m.LTime != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(m.LTime)) - } - if len(m.NodeName) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NodeName))) - i += copy(dAtA[i:], m.NodeName) - } if m.Leaving { - dAtA[i] = 0x20 - i++ + i-- if m.Leaving { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x20 } - return i, nil + if len(m.NodeName) > 0 { + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x1a + } + if m.LTime != 0 { + i = encodeVarintNetworkdb(dAtA, i, uint64(m.LTime)) + i-- + dAtA[i] = 0x10 + } + if len(m.NetworkID) > 0 { + i -= len(m.NetworkID) + copy(dAtA[i:], m.NetworkID) + i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NetworkID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *NetworkPushPull) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -792,40 +1134,48 @@ func (m *NetworkPushPull) Marshal() (dAtA []byte, err error) { } func (m *NetworkPushPull) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NetworkPushPull) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.LTime != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(m.LTime)) + if len(m.NodeName) > 0 { + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x1a } if len(m.Networks) > 0 { - for _, msg := range m.Networks { - dAtA[i] = 0x12 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Networks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Networks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNetworkdb(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x12 } } - if len(m.NodeName) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NodeName))) - i += copy(dAtA[i:], m.NodeName) + if m.LTime != 0 { + i = encodeVarintNetworkdb(dAtA, i, uint64(m.LTime)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *TableEvent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -833,62 +1183,72 @@ func (m *TableEvent) Marshal() (dAtA []byte, err error) { } func (m *TableEvent) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TableEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(m.Type)) - } - if m.LTime != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(m.LTime)) - } - if len(m.NodeName) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NodeName))) - i += copy(dAtA[i:], m.NodeName) - } - if len(m.NetworkID) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NetworkID))) - i += copy(dAtA[i:], m.NetworkID) - } - if len(m.TableName) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.TableName))) - i += copy(dAtA[i:], m.TableName) - } - if len(m.Key) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + if m.ResidualReapTime != 0 { + i = encodeVarintNetworkdb(dAtA, i, uint64(m.ResidualReapTime)) + i-- + dAtA[i] = 0x40 } if len(m.Value) > 0 { - dAtA[i] = 0x3a - i++ + i -= len(m.Value) + copy(dAtA[i:], m.Value) i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) + i-- + dAtA[i] = 0x3a } - if m.ResidualReapTime != 0 { - dAtA[i] = 0x40 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(m.ResidualReapTime)) + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x32 } - return i, nil + if len(m.TableName) > 0 { + i -= len(m.TableName) + copy(dAtA[i:], m.TableName) + i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.TableName))) + i-- + dAtA[i] = 0x2a + } + if len(m.NetworkID) > 0 { + i -= len(m.NetworkID) + copy(dAtA[i:], m.NetworkID) + i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NetworkID))) + i-- + dAtA[i] = 0x22 + } + if len(m.NodeName) > 0 { + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x1a + } + if m.LTime != 0 { + i = encodeVarintNetworkdb(dAtA, i, uint64(m.LTime)) + i-- + dAtA[i] = 0x10 + } + if m.Type != 0 { + i = encodeVarintNetworkdb(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *BulkSyncMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -896,59 +1256,60 @@ func (m *BulkSyncMessage) Marshal() (dAtA []byte, err error) { } func (m *BulkSyncMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BulkSyncMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.LTime != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(m.LTime)) + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x2a + } + if len(m.Networks) > 0 { + for iNdEx := len(m.Networks) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Networks[iNdEx]) + copy(dAtA[i:], m.Networks[iNdEx]) + i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.Networks[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.NodeName) > 0 { + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x1a } if m.Unsolicited { - dAtA[i] = 0x10 - i++ + i-- if m.Unsolicited { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if len(m.NodeName) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.NodeName))) - i += copy(dAtA[i:], m.NodeName) + if m.LTime != 0 { + i = encodeVarintNetworkdb(dAtA, i, uint64(m.LTime)) + i-- + dAtA[i] = 0x8 } - if len(m.Networks) > 0 { - for _, s := range m.Networks { - dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.Payload) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.Payload))) - i += copy(dAtA[i:], m.Payload) - } - return i, nil + return len(dAtA) - i, nil } func (m *CompoundMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -956,29 +1317,36 @@ func (m *CompoundMessage) Marshal() (dAtA []byte, err error) { } func (m *CompoundMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompoundMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Messages) > 0 { - for _, msg := range m.Messages { - dAtA[i] = 0xa - i++ - i = encodeVarintNetworkdb(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNetworkdb(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *CompoundMessage_SimpleMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -986,29 +1354,40 @@ func (m *CompoundMessage_SimpleMessage) Marshal() (dAtA []byte, err error) { } func (m *CompoundMessage_SimpleMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CompoundMessage_SimpleMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Payload) > 0 { - dAtA[i] = 0xa - i++ + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) i = encodeVarintNetworkdb(dAtA, i, uint64(len(m.Payload))) - i += copy(dAtA[i:], m.Payload) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintNetworkdb(dAtA []byte, offset int, v uint64) int { + offset -= sovNetworkdb(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *GossipMessage) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -1022,6 +1401,9 @@ func (m *GossipMessage) Size() (n int) { } func (m *NodeEvent) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -1038,6 +1420,9 @@ func (m *NodeEvent) Size() (n int) { } func (m *NetworkEvent) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -1058,6 +1443,9 @@ func (m *NetworkEvent) Size() (n int) { } func (m *NetworkEntry) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.NetworkID) @@ -1078,6 +1466,9 @@ func (m *NetworkEntry) Size() (n int) { } func (m *NetworkPushPull) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.LTime != 0 { @@ -1097,6 +1488,9 @@ func (m *NetworkPushPull) Size() (n int) { } func (m *TableEvent) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Type != 0 { @@ -1132,6 +1526,9 @@ func (m *TableEvent) Size() (n int) { } func (m *BulkSyncMessage) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.LTime != 0 { @@ -1158,6 +1555,9 @@ func (m *BulkSyncMessage) Size() (n int) { } func (m *CompoundMessage) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Messages) > 0 { @@ -1170,6 +1570,9 @@ func (m *CompoundMessage) Size() (n int) { } func (m *CompoundMessage_SimpleMessage) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Payload) @@ -1180,14 +1583,7 @@ func (m *CompoundMessage_SimpleMessage) Size() (n int) { } func sovNetworkdb(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozNetworkdb(x uint64) (n int) { return sovNetworkdb(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1245,9 +1641,14 @@ func (this *NetworkPushPull) String() string { if this == nil { return "nil" } + repeatedStringForNetworks := "[]*NetworkEntry{" + for _, f := range this.Networks { + repeatedStringForNetworks += strings.Replace(f.String(), "NetworkEntry", "NetworkEntry", 1) + "," + } + repeatedStringForNetworks += "}" s := strings.Join([]string{`&NetworkPushPull{`, `LTime:` + fmt.Sprintf("%v", this.LTime) + `,`, - `Networks:` + strings.Replace(fmt.Sprintf("%v", this.Networks), "NetworkEntry", "NetworkEntry", 1) + `,`, + `Networks:` + repeatedStringForNetworks + `,`, `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, `}`, }, "") @@ -1288,8 +1689,13 @@ func (this *CompoundMessage) String() string { if this == nil { return "nil" } + repeatedStringForMessages := "[]*CompoundMessage_SimpleMessage{" + for _, f := range this.Messages { + repeatedStringForMessages += strings.Replace(fmt.Sprintf("%v", f), "CompoundMessage_SimpleMessage", "CompoundMessage_SimpleMessage", 1) + "," + } + repeatedStringForMessages += "}" s := strings.Join([]string{`&CompoundMessage{`, - `Messages:` + strings.Replace(fmt.Sprintf("%v", this.Messages), "CompoundMessage_SimpleMessage", "CompoundMessage_SimpleMessage", 1) + `,`, + `Messages:` + repeatedStringForMessages + `,`, `}`, }, "") return s @@ -1327,7 +1733,7 @@ func (m *GossipMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1355,7 +1761,7 @@ func (m *GossipMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (MessageType(b) & 0x7F) << shift + m.Type |= MessageType(b&0x7F) << shift if b < 0x80 { break } @@ -1374,7 +1780,7 @@ func (m *GossipMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1383,6 +1789,9 @@ func (m *GossipMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1397,7 +1806,7 @@ func (m *GossipMessage) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNetworkdb } if (iNdEx + skippy) > l { @@ -1427,7 +1836,7 @@ func (m *NodeEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1455,7 +1864,7 @@ func (m *NodeEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (NodeEvent_Type(b) & 0x7F) << shift + m.Type |= NodeEvent_Type(b&0x7F) << shift if b < 0x80 { break } @@ -1474,7 +1883,7 @@ func (m *NodeEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LTime |= (github_com_hashicorp_serf_serf.LamportTime(b) & 0x7F) << shift + m.LTime |= github_com_hashicorp_serf_serf.LamportTime(b&0x7F) << shift if b < 0x80 { break } @@ -1493,7 +1902,7 @@ func (m *NodeEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1503,6 +1912,9 @@ func (m *NodeEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1514,7 +1926,7 @@ func (m *NodeEvent) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNetworkdb } if (iNdEx + skippy) > l { @@ -1544,7 +1956,7 @@ func (m *NetworkEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1572,7 +1984,7 @@ func (m *NetworkEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (NetworkEvent_Type(b) & 0x7F) << shift + m.Type |= NetworkEvent_Type(b&0x7F) << shift if b < 0x80 { break } @@ -1591,7 +2003,7 @@ func (m *NetworkEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LTime |= (github_com_hashicorp_serf_serf.LamportTime(b) & 0x7F) << shift + m.LTime |= github_com_hashicorp_serf_serf.LamportTime(b&0x7F) << shift if b < 0x80 { break } @@ -1610,7 +2022,7 @@ func (m *NetworkEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1620,6 +2032,9 @@ func (m *NetworkEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1639,7 +2054,7 @@ func (m *NetworkEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1649,6 +2064,9 @@ func (m *NetworkEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1660,7 +2078,7 @@ func (m *NetworkEvent) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNetworkdb } if (iNdEx + skippy) > l { @@ -1690,7 +2108,7 @@ func (m *NetworkEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1718,7 +2136,7 @@ func (m *NetworkEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1728,6 +2146,9 @@ func (m *NetworkEntry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1747,7 +2168,7 @@ func (m *NetworkEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LTime |= (github_com_hashicorp_serf_serf.LamportTime(b) & 0x7F) << shift + m.LTime |= github_com_hashicorp_serf_serf.LamportTime(b&0x7F) << shift if b < 0x80 { break } @@ -1766,7 +2187,7 @@ func (m *NetworkEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1776,6 +2197,9 @@ func (m *NetworkEntry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1795,7 +2219,7 @@ func (m *NetworkEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1807,7 +2231,7 @@ func (m *NetworkEntry) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNetworkdb } if (iNdEx + skippy) > l { @@ -1837,7 +2261,7 @@ func (m *NetworkPushPull) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1865,7 +2289,7 @@ func (m *NetworkPushPull) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LTime |= (github_com_hashicorp_serf_serf.LamportTime(b) & 0x7F) << shift + m.LTime |= github_com_hashicorp_serf_serf.LamportTime(b&0x7F) << shift if b < 0x80 { break } @@ -1884,7 +2308,7 @@ func (m *NetworkPushPull) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1893,6 +2317,9 @@ func (m *NetworkPushPull) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1915,7 +2342,7 @@ func (m *NetworkPushPull) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1925,6 +2352,9 @@ func (m *NetworkPushPull) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1936,7 +2366,7 @@ func (m *NetworkPushPull) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNetworkdb } if (iNdEx + skippy) > l { @@ -1966,7 +2396,7 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1994,7 +2424,7 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= (TableEvent_Type(b) & 0x7F) << shift + m.Type |= TableEvent_Type(b&0x7F) << shift if b < 0x80 { break } @@ -2013,7 +2443,7 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LTime |= (github_com_hashicorp_serf_serf.LamportTime(b) & 0x7F) << shift + m.LTime |= github_com_hashicorp_serf_serf.LamportTime(b&0x7F) << shift if b < 0x80 { break } @@ -2032,7 +2462,7 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2042,6 +2472,9 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2061,7 +2494,7 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2071,6 +2504,9 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2090,7 +2526,7 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2100,6 +2536,9 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2119,7 +2558,7 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2129,6 +2568,9 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2148,7 +2590,7 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2157,6 +2599,9 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2179,7 +2624,7 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ResidualReapTime |= (int32(b) & 0x7F) << shift + m.ResidualReapTime |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -2190,7 +2635,7 @@ func (m *TableEvent) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNetworkdb } if (iNdEx + skippy) > l { @@ -2220,7 +2665,7 @@ func (m *BulkSyncMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2248,7 +2693,7 @@ func (m *BulkSyncMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LTime |= (github_com_hashicorp_serf_serf.LamportTime(b) & 0x7F) << shift + m.LTime |= github_com_hashicorp_serf_serf.LamportTime(b&0x7F) << shift if b < 0x80 { break } @@ -2267,7 +2712,7 @@ func (m *BulkSyncMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2287,7 +2732,7 @@ func (m *BulkSyncMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2297,6 +2742,9 @@ func (m *BulkSyncMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2316,7 +2764,7 @@ func (m *BulkSyncMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2326,6 +2774,9 @@ func (m *BulkSyncMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2345,7 +2796,7 @@ func (m *BulkSyncMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2354,6 +2805,9 @@ func (m *BulkSyncMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2368,7 +2822,7 @@ func (m *BulkSyncMessage) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNetworkdb } if (iNdEx + skippy) > l { @@ -2398,7 +2852,7 @@ func (m *CompoundMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2426,7 +2880,7 @@ func (m *CompoundMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2435,6 +2889,9 @@ func (m *CompoundMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2449,7 +2906,7 @@ func (m *CompoundMessage) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNetworkdb } if (iNdEx + skippy) > l { @@ -2479,7 +2936,7 @@ func (m *CompoundMessage_SimpleMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2507,7 +2964,7 @@ func (m *CompoundMessage_SimpleMessage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2516,6 +2973,9 @@ func (m *CompoundMessage_SimpleMessage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthNetworkdb } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNetworkdb + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2530,7 +2990,7 @@ func (m *CompoundMessage_SimpleMessage) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNetworkdb } if (iNdEx + skippy) > l { @@ -2548,6 +3008,7 @@ func (m *CompoundMessage_SimpleMessage) Unmarshal(dAtA []byte) error { func skipNetworkdb(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2579,10 +3040,8 @@ func skipNetworkdb(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2599,119 +3058,34 @@ func skipNetworkdb(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthNetworkdb } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNetworkdb - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipNetworkdb(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupNetworkdb + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthNetworkdb + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthNetworkdb = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNetworkdb = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthNetworkdb = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNetworkdb = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupNetworkdb = fmt.Errorf("proto: unexpected end of group") ) - -func init() { proto.RegisterFile("networkdb/networkdb.proto", fileDescriptorNetworkdb) } - -var fileDescriptorNetworkdb = []byte{ - // 956 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0xcd, 0x6e, 0xe3, 0x54, - 0x14, 0xc7, 0x7b, 0xf3, 0xd1, 0x26, 0xa7, 0x29, 0x35, 0x77, 0x3a, 0x53, 0xd7, 0x03, 0x89, 0x31, - 0x33, 0x55, 0xa6, 0x82, 0x14, 0x75, 0x9e, 0xa0, 0x49, 0x2c, 0xc8, 0x4c, 0xc6, 0x89, 0xdc, 0xa4, - 0x88, 0x55, 0x74, 0x5b, 0x5f, 0x52, 0xab, 0x8e, 0x6d, 0xd9, 0x4e, 0x50, 0x56, 0x20, 0x56, 0xa3, - 0x2c, 0x78, 0x83, 0xac, 0x86, 0x35, 0x0f, 0x80, 0x58, 0xb2, 0x98, 0x05, 0x0b, 0xd8, 0x21, 0x16, - 0x11, 0xcd, 0x13, 0xf0, 0x08, 0xc8, 0xd7, 0x76, 0x72, 0x93, 0x56, 0x23, 0x21, 0x46, 0x82, 0x4d, - 0x72, 0x3f, 0x7e,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