github.com/m3db/m3@v1.5.0/src/cluster/generated/proto/metadatapb/metadata.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: github.com/m3db/m3/src/cluster/generated/proto/metadatapb/metadata.proto
     3  
     4  // Copyright (c) 2018 Uber Technologies, Inc.
     5  //
     6  // Permission is hereby granted, free of charge, to any person obtaining a copy
     7  // of this software and associated documentation files (the "Software"), to deal
     8  // in the Software without restriction, including without limitation the rights
     9  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    10  // copies of the Software, and to permit persons to whom the Software is
    11  // furnished to do so, subject to the following conditions:
    12  //
    13  // The above copyright notice and this permission notice shall be included in
    14  // all copies or substantial portions of the Software.
    15  //
    16  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    17  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    18  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    19  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    20  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    21  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    22  // THE SOFTWARE.
    23  
    24  /*
    25  	Package metadatapb is a generated protocol buffer package.
    26  
    27  	It is generated from these files:
    28  		github.com/m3db/m3/src/cluster/generated/proto/metadatapb/metadata.proto
    29  
    30  	It has these top-level messages:
    31  		Metadata
    32  */
    33  package metadatapb
    34  
    35  import proto "github.com/gogo/protobuf/proto"
    36  import fmt "fmt"
    37  import math "math"
    38  
    39  import io "io"
    40  
    41  // Reference imports to suppress errors if they are not otherwise used.
    42  var _ = proto.Marshal
    43  var _ = fmt.Errorf
    44  var _ = math.Inf
    45  
    46  // This is a compile-time assertion to ensure that this generated file
    47  // is compatible with the proto package it is being compiled against.
    48  // A compilation error at this line likely means your copy of the
    49  // proto package needs to be updated.
    50  const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
    51  
    52  type Metadata struct {
    53  	Port              uint32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
    54  	LivenessInterval  int64  `protobuf:"varint,2,opt,name=liveness_interval,json=livenessInterval,proto3" json:"liveness_interval,omitempty"`
    55  	HeartbeatInterval int64  `protobuf:"varint,3,opt,name=heartbeat_interval,json=heartbeatInterval,proto3" json:"heartbeat_interval,omitempty"`
    56  }
    57  
    58  func (m *Metadata) Reset()                    { *m = Metadata{} }
    59  func (m *Metadata) String() string            { return proto.CompactTextString(m) }
    60  func (*Metadata) ProtoMessage()               {}
    61  func (*Metadata) Descriptor() ([]byte, []int) { return fileDescriptorMetadata, []int{0} }
    62  
    63  func (m *Metadata) GetPort() uint32 {
    64  	if m != nil {
    65  		return m.Port
    66  	}
    67  	return 0
    68  }
    69  
    70  func (m *Metadata) GetLivenessInterval() int64 {
    71  	if m != nil {
    72  		return m.LivenessInterval
    73  	}
    74  	return 0
    75  }
    76  
    77  func (m *Metadata) GetHeartbeatInterval() int64 {
    78  	if m != nil {
    79  		return m.HeartbeatInterval
    80  	}
    81  	return 0
    82  }
    83  
    84  func init() {
    85  	proto.RegisterType((*Metadata)(nil), "metadatapb.Metadata")
    86  }
    87  func (m *Metadata) Marshal() (dAtA []byte, err error) {
    88  	size := m.Size()
    89  	dAtA = make([]byte, size)
    90  	n, err := m.MarshalTo(dAtA)
    91  	if err != nil {
    92  		return nil, err
    93  	}
    94  	return dAtA[:n], nil
    95  }
    96  
    97  func (m *Metadata) MarshalTo(dAtA []byte) (int, error) {
    98  	var i int
    99  	_ = i
   100  	var l int
   101  	_ = l
   102  	if m.Port != 0 {
   103  		dAtA[i] = 0x8
   104  		i++
   105  		i = encodeVarintMetadata(dAtA, i, uint64(m.Port))
   106  	}
   107  	if m.LivenessInterval != 0 {
   108  		dAtA[i] = 0x10
   109  		i++
   110  		i = encodeVarintMetadata(dAtA, i, uint64(m.LivenessInterval))
   111  	}
   112  	if m.HeartbeatInterval != 0 {
   113  		dAtA[i] = 0x18
   114  		i++
   115  		i = encodeVarintMetadata(dAtA, i, uint64(m.HeartbeatInterval))
   116  	}
   117  	return i, nil
   118  }
   119  
   120  func encodeVarintMetadata(dAtA []byte, offset int, v uint64) int {
   121  	for v >= 1<<7 {
   122  		dAtA[offset] = uint8(v&0x7f | 0x80)
   123  		v >>= 7
   124  		offset++
   125  	}
   126  	dAtA[offset] = uint8(v)
   127  	return offset + 1
   128  }
   129  func (m *Metadata) Size() (n int) {
   130  	var l int
   131  	_ = l
   132  	if m.Port != 0 {
   133  		n += 1 + sovMetadata(uint64(m.Port))
   134  	}
   135  	if m.LivenessInterval != 0 {
   136  		n += 1 + sovMetadata(uint64(m.LivenessInterval))
   137  	}
   138  	if m.HeartbeatInterval != 0 {
   139  		n += 1 + sovMetadata(uint64(m.HeartbeatInterval))
   140  	}
   141  	return n
   142  }
   143  
   144  func sovMetadata(x uint64) (n int) {
   145  	for {
   146  		n++
   147  		x >>= 7
   148  		if x == 0 {
   149  			break
   150  		}
   151  	}
   152  	return n
   153  }
   154  func sozMetadata(x uint64) (n int) {
   155  	return sovMetadata(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   156  }
   157  func (m *Metadata) Unmarshal(dAtA []byte) error {
   158  	l := len(dAtA)
   159  	iNdEx := 0
   160  	for iNdEx < l {
   161  		preIndex := iNdEx
   162  		var wire uint64
   163  		for shift := uint(0); ; shift += 7 {
   164  			if shift >= 64 {
   165  				return ErrIntOverflowMetadata
   166  			}
   167  			if iNdEx >= l {
   168  				return io.ErrUnexpectedEOF
   169  			}
   170  			b := dAtA[iNdEx]
   171  			iNdEx++
   172  			wire |= (uint64(b) & 0x7F) << shift
   173  			if b < 0x80 {
   174  				break
   175  			}
   176  		}
   177  		fieldNum := int32(wire >> 3)
   178  		wireType := int(wire & 0x7)
   179  		if wireType == 4 {
   180  			return fmt.Errorf("proto: Metadata: wiretype end group for non-group")
   181  		}
   182  		if fieldNum <= 0 {
   183  			return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire)
   184  		}
   185  		switch fieldNum {
   186  		case 1:
   187  			if wireType != 0 {
   188  				return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
   189  			}
   190  			m.Port = 0
   191  			for shift := uint(0); ; shift += 7 {
   192  				if shift >= 64 {
   193  					return ErrIntOverflowMetadata
   194  				}
   195  				if iNdEx >= l {
   196  					return io.ErrUnexpectedEOF
   197  				}
   198  				b := dAtA[iNdEx]
   199  				iNdEx++
   200  				m.Port |= (uint32(b) & 0x7F) << shift
   201  				if b < 0x80 {
   202  					break
   203  				}
   204  			}
   205  		case 2:
   206  			if wireType != 0 {
   207  				return fmt.Errorf("proto: wrong wireType = %d for field LivenessInterval", wireType)
   208  			}
   209  			m.LivenessInterval = 0
   210  			for shift := uint(0); ; shift += 7 {
   211  				if shift >= 64 {
   212  					return ErrIntOverflowMetadata
   213  				}
   214  				if iNdEx >= l {
   215  					return io.ErrUnexpectedEOF
   216  				}
   217  				b := dAtA[iNdEx]
   218  				iNdEx++
   219  				m.LivenessInterval |= (int64(b) & 0x7F) << shift
   220  				if b < 0x80 {
   221  					break
   222  				}
   223  			}
   224  		case 3:
   225  			if wireType != 0 {
   226  				return fmt.Errorf("proto: wrong wireType = %d for field HeartbeatInterval", wireType)
   227  			}
   228  			m.HeartbeatInterval = 0
   229  			for shift := uint(0); ; shift += 7 {
   230  				if shift >= 64 {
   231  					return ErrIntOverflowMetadata
   232  				}
   233  				if iNdEx >= l {
   234  					return io.ErrUnexpectedEOF
   235  				}
   236  				b := dAtA[iNdEx]
   237  				iNdEx++
   238  				m.HeartbeatInterval |= (int64(b) & 0x7F) << shift
   239  				if b < 0x80 {
   240  					break
   241  				}
   242  			}
   243  		default:
   244  			iNdEx = preIndex
   245  			skippy, err := skipMetadata(dAtA[iNdEx:])
   246  			if err != nil {
   247  				return err
   248  			}
   249  			if skippy < 0 {
   250  				return ErrInvalidLengthMetadata
   251  			}
   252  			if (iNdEx + skippy) > l {
   253  				return io.ErrUnexpectedEOF
   254  			}
   255  			iNdEx += skippy
   256  		}
   257  	}
   258  
   259  	if iNdEx > l {
   260  		return io.ErrUnexpectedEOF
   261  	}
   262  	return nil
   263  }
   264  func skipMetadata(dAtA []byte) (n int, err error) {
   265  	l := len(dAtA)
   266  	iNdEx := 0
   267  	for iNdEx < l {
   268  		var wire uint64
   269  		for shift := uint(0); ; shift += 7 {
   270  			if shift >= 64 {
   271  				return 0, ErrIntOverflowMetadata
   272  			}
   273  			if iNdEx >= l {
   274  				return 0, io.ErrUnexpectedEOF
   275  			}
   276  			b := dAtA[iNdEx]
   277  			iNdEx++
   278  			wire |= (uint64(b) & 0x7F) << shift
   279  			if b < 0x80 {
   280  				break
   281  			}
   282  		}
   283  		wireType := int(wire & 0x7)
   284  		switch wireType {
   285  		case 0:
   286  			for shift := uint(0); ; shift += 7 {
   287  				if shift >= 64 {
   288  					return 0, ErrIntOverflowMetadata
   289  				}
   290  				if iNdEx >= l {
   291  					return 0, io.ErrUnexpectedEOF
   292  				}
   293  				iNdEx++
   294  				if dAtA[iNdEx-1] < 0x80 {
   295  					break
   296  				}
   297  			}
   298  			return iNdEx, nil
   299  		case 1:
   300  			iNdEx += 8
   301  			return iNdEx, nil
   302  		case 2:
   303  			var length int
   304  			for shift := uint(0); ; shift += 7 {
   305  				if shift >= 64 {
   306  					return 0, ErrIntOverflowMetadata
   307  				}
   308  				if iNdEx >= l {
   309  					return 0, io.ErrUnexpectedEOF
   310  				}
   311  				b := dAtA[iNdEx]
   312  				iNdEx++
   313  				length |= (int(b) & 0x7F) << shift
   314  				if b < 0x80 {
   315  					break
   316  				}
   317  			}
   318  			iNdEx += length
   319  			if length < 0 {
   320  				return 0, ErrInvalidLengthMetadata
   321  			}
   322  			return iNdEx, nil
   323  		case 3:
   324  			for {
   325  				var innerWire uint64
   326  				var start int = iNdEx
   327  				for shift := uint(0); ; shift += 7 {
   328  					if shift >= 64 {
   329  						return 0, ErrIntOverflowMetadata
   330  					}
   331  					if iNdEx >= l {
   332  						return 0, io.ErrUnexpectedEOF
   333  					}
   334  					b := dAtA[iNdEx]
   335  					iNdEx++
   336  					innerWire |= (uint64(b) & 0x7F) << shift
   337  					if b < 0x80 {
   338  						break
   339  					}
   340  				}
   341  				innerWireType := int(innerWire & 0x7)
   342  				if innerWireType == 4 {
   343  					break
   344  				}
   345  				next, err := skipMetadata(dAtA[start:])
   346  				if err != nil {
   347  					return 0, err
   348  				}
   349  				iNdEx = start + next
   350  			}
   351  			return iNdEx, nil
   352  		case 4:
   353  			return iNdEx, nil
   354  		case 5:
   355  			iNdEx += 4
   356  			return iNdEx, nil
   357  		default:
   358  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   359  		}
   360  	}
   361  	panic("unreachable")
   362  }
   363  
   364  var (
   365  	ErrInvalidLengthMetadata = fmt.Errorf("proto: negative length found during unmarshaling")
   366  	ErrIntOverflowMetadata   = fmt.Errorf("proto: integer overflow")
   367  )
   368  
   369  func init() {
   370  	proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/metadatapb/metadata.proto", fileDescriptorMetadata)
   371  }
   372  
   373  var fileDescriptorMetadata = []byte{
   374  	// 196 bytes of a gzipped FileDescriptorProto
   375  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0x48, 0xcf, 0x2c, 0xc9,
   376  	0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f,
   377  	0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d,
   378  	0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0xcf, 0x4d, 0x2d, 0x49, 0x4c,
   379  	0x49, 0x2c, 0x49, 0x2c, 0x48, 0x82, 0x33, 0xf5, 0xc0, 0x32, 0x42, 0x5c, 0x08, 0x29, 0xa5, 0x2a,
   380  	0x2e, 0x0e, 0x5f, 0x28, 0x4f, 0x48, 0x88, 0x8b, 0xa5, 0x20, 0xbf, 0xa8, 0x44, 0x82, 0x51, 0x81,
   381  	0x51, 0x83, 0x37, 0x08, 0xcc, 0x16, 0xd2, 0xe6, 0x12, 0xcc, 0xc9, 0x2c, 0x4b, 0xcd, 0x4b, 0x2d,
   382  	0x2e, 0x8e, 0xcf, 0xcc, 0x2b, 0x49, 0x2d, 0x2a, 0x4b, 0xcc, 0x91, 0x60, 0x52, 0x60, 0xd4, 0x60,
   383  	0x0e, 0x12, 0x80, 0x49, 0x78, 0x42, 0xc5, 0x85, 0x74, 0xb9, 0x84, 0x32, 0x52, 0x13, 0x8b, 0x4a,
   384  	0x92, 0x52, 0x13, 0x4b, 0x10, 0xaa, 0x99, 0xc1, 0xaa, 0x05, 0xe1, 0x32, 0x30, 0xe5, 0x4e, 0x02,
   385  	0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72,
   386  	0x0c, 0x49, 0x6c, 0x60, 0x07, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x60, 0x70, 0xca, 0x29,
   387  	0xec, 0x00, 0x00, 0x00,
   388  }