github.com/matrixorigin/matrixone@v1.2.0/pkg/pb/timestamp/timestamp.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: timestamp.proto
     3  
     4  package timestamp
     5  
     6  import (
     7  	fmt "fmt"
     8  	io "io"
     9  	math "math"
    10  	math_bits "math/bits"
    11  
    12  	proto "github.com/gogo/protobuf/proto"
    13  )
    14  
    15  // Reference imports to suppress errors if they are not otherwise used.
    16  var _ = proto.Marshal
    17  var _ = fmt.Errorf
    18  var _ = math.Inf
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the proto package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // proto package needs to be updated.
    24  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    25  
    26  // Timestamp is a HLC time value. All its field should never be accessed
    27  // directly by its users.
    28  type Timestamp struct {
    29  	// PhysicalTime is the physical component of the HLC, it is read from a node's
    30  	// wall clock time as Unix epoch time in nanoseconds. HLC requires this field
    31  	// to be monotonically increase on each node.
    32  	PhysicalTime int64 `protobuf:"varint,1,opt,name=PhysicalTime,proto3" json:"PhysicalTime,omitempty"`
    33  	// LogicalTime is the logical component of the HLC, its value is maintained
    34  	// according to the HLC algorithm. The HLC paper further establishes that its
    35  	// value will not overflow in a real production environment.
    36  	LogicalTime uint32 `protobuf:"varint,2,opt,name=LogicalTime,proto3" json:"LogicalTime,omitempty"`
    37  	// NodeID just used to compatible with TAE some constraint to guaranteed unique
    38  	// timestamp. uint16 is not defined, so use uint32, but only 2 bytes. The field
    39  	// is not used for comparing the timestamps.
    40  	NodeID               uint32   `protobuf:"varint,3,opt,name=NodeID,proto3" json:"NodeID,omitempty"`
    41  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    42  	XXX_unrecognized     []byte   `json:"-"`
    43  	XXX_sizecache        int32    `json:"-"`
    44  }
    45  
    46  func (m *Timestamp) Reset()         { *m = Timestamp{} }
    47  func (m *Timestamp) String() string { return proto.CompactTextString(m) }
    48  func (*Timestamp) ProtoMessage()    {}
    49  func (*Timestamp) Descriptor() ([]byte, []int) {
    50  	return fileDescriptor_edac929d8ae1e24f, []int{0}
    51  }
    52  func (m *Timestamp) XXX_Unmarshal(b []byte) error {
    53  	return m.Unmarshal(b)
    54  }
    55  func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    56  	if deterministic {
    57  		return xxx_messageInfo_Timestamp.Marshal(b, m, deterministic)
    58  	} else {
    59  		b = b[:cap(b)]
    60  		n, err := m.MarshalToSizedBuffer(b)
    61  		if err != nil {
    62  			return nil, err
    63  		}
    64  		return b[:n], nil
    65  	}
    66  }
    67  func (m *Timestamp) XXX_Merge(src proto.Message) {
    68  	xxx_messageInfo_Timestamp.Merge(m, src)
    69  }
    70  func (m *Timestamp) XXX_Size() int {
    71  	return m.Size()
    72  }
    73  func (m *Timestamp) XXX_DiscardUnknown() {
    74  	xxx_messageInfo_Timestamp.DiscardUnknown(m)
    75  }
    76  
    77  var xxx_messageInfo_Timestamp proto.InternalMessageInfo
    78  
    79  func (m *Timestamp) GetPhysicalTime() int64 {
    80  	if m != nil {
    81  		return m.PhysicalTime
    82  	}
    83  	return 0
    84  }
    85  
    86  func (m *Timestamp) GetLogicalTime() uint32 {
    87  	if m != nil {
    88  		return m.LogicalTime
    89  	}
    90  	return 0
    91  }
    92  
    93  func (m *Timestamp) GetNodeID() uint32 {
    94  	if m != nil {
    95  		return m.NodeID
    96  	}
    97  	return 0
    98  }
    99  
   100  func init() {
   101  	proto.RegisterType((*Timestamp)(nil), "timestamp.Timestamp")
   102  }
   103  
   104  func init() { proto.RegisterFile("timestamp.proto", fileDescriptor_edac929d8ae1e24f) }
   105  
   106  var fileDescriptor_edac929d8ae1e24f = []byte{
   107  	// 166 bytes of a gzipped FileDescriptorProto
   108  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0xc9, 0xcc, 0x4d,
   109  	0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x28,
   110  	0x65, 0x72, 0x71, 0x86, 0xc0, 0x38, 0x42, 0x4a, 0x5c, 0x3c, 0x01, 0x19, 0x95, 0xc5, 0x99, 0xc9,
   111  	0x89, 0x39, 0x20, 0x41, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xe6, 0x20, 0x14, 0x31, 0x21, 0x05, 0x2e,
   112  	0x6e, 0x9f, 0xfc, 0x74, 0xb8, 0x12, 0x26, 0x05, 0x46, 0x0d, 0xde, 0x20, 0x64, 0x21, 0x21, 0x31,
   113  	0x2e, 0x36, 0xbf, 0xfc, 0x94, 0x54, 0x4f, 0x17, 0x09, 0x66, 0xb0, 0x24, 0x94, 0xe7, 0xe4, 0x70,
   114  	0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x46, 0x19, 0xa5, 0x67,
   115  	0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xe7, 0x26, 0x96, 0x14, 0x65, 0x56, 0xe4,
   116  	0x17, 0x65, 0xa6, 0x67, 0xe6, 0xc1, 0x38, 0x79, 0xa9, 0xfa, 0x05, 0xd9, 0xe9, 0xfa, 0x05, 0x49,
   117  	0xfa, 0x70, 0xc7, 0x26, 0xb1, 0x81, 0x9d, 0x6f, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x04, 0x01,
   118  	0x63, 0xe4, 0xd1, 0x00, 0x00, 0x00,
   119  }
   120  
   121  func (m *Timestamp) Marshal() (dAtA []byte, err error) {
   122  	size := m.Size()
   123  	dAtA = make([]byte, size)
   124  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	return dAtA[:n], nil
   129  }
   130  
   131  func (m *Timestamp) MarshalTo(dAtA []byte) (int, error) {
   132  	size := m.Size()
   133  	return m.MarshalToSizedBuffer(dAtA[:size])
   134  }
   135  
   136  func (m *Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   137  	i := len(dAtA)
   138  	_ = i
   139  	var l int
   140  	_ = l
   141  	if m.XXX_unrecognized != nil {
   142  		i -= len(m.XXX_unrecognized)
   143  		copy(dAtA[i:], m.XXX_unrecognized)
   144  	}
   145  	if m.NodeID != 0 {
   146  		i = encodeVarintTimestamp(dAtA, i, uint64(m.NodeID))
   147  		i--
   148  		dAtA[i] = 0x18
   149  	}
   150  	if m.LogicalTime != 0 {
   151  		i = encodeVarintTimestamp(dAtA, i, uint64(m.LogicalTime))
   152  		i--
   153  		dAtA[i] = 0x10
   154  	}
   155  	if m.PhysicalTime != 0 {
   156  		i = encodeVarintTimestamp(dAtA, i, uint64(m.PhysicalTime))
   157  		i--
   158  		dAtA[i] = 0x8
   159  	}
   160  	return len(dAtA) - i, nil
   161  }
   162  
   163  func encodeVarintTimestamp(dAtA []byte, offset int, v uint64) int {
   164  	offset -= sovTimestamp(v)
   165  	base := offset
   166  	for v >= 1<<7 {
   167  		dAtA[offset] = uint8(v&0x7f | 0x80)
   168  		v >>= 7
   169  		offset++
   170  	}
   171  	dAtA[offset] = uint8(v)
   172  	return base
   173  }
   174  func (m *Timestamp) Size() (n int) {
   175  	if m == nil {
   176  		return 0
   177  	}
   178  	var l int
   179  	_ = l
   180  	if m.PhysicalTime != 0 {
   181  		n += 1 + sovTimestamp(uint64(m.PhysicalTime))
   182  	}
   183  	if m.LogicalTime != 0 {
   184  		n += 1 + sovTimestamp(uint64(m.LogicalTime))
   185  	}
   186  	if m.NodeID != 0 {
   187  		n += 1 + sovTimestamp(uint64(m.NodeID))
   188  	}
   189  	if m.XXX_unrecognized != nil {
   190  		n += len(m.XXX_unrecognized)
   191  	}
   192  	return n
   193  }
   194  
   195  func sovTimestamp(x uint64) (n int) {
   196  	return (math_bits.Len64(x|1) + 6) / 7
   197  }
   198  func sozTimestamp(x uint64) (n int) {
   199  	return sovTimestamp(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   200  }
   201  func (m *Timestamp) Unmarshal(dAtA []byte) error {
   202  	l := len(dAtA)
   203  	iNdEx := 0
   204  	for iNdEx < l {
   205  		preIndex := iNdEx
   206  		var wire uint64
   207  		for shift := uint(0); ; shift += 7 {
   208  			if shift >= 64 {
   209  				return ErrIntOverflowTimestamp
   210  			}
   211  			if iNdEx >= l {
   212  				return io.ErrUnexpectedEOF
   213  			}
   214  			b := dAtA[iNdEx]
   215  			iNdEx++
   216  			wire |= uint64(b&0x7F) << shift
   217  			if b < 0x80 {
   218  				break
   219  			}
   220  		}
   221  		fieldNum := int32(wire >> 3)
   222  		wireType := int(wire & 0x7)
   223  		if wireType == 4 {
   224  			return fmt.Errorf("proto: Timestamp: wiretype end group for non-group")
   225  		}
   226  		if fieldNum <= 0 {
   227  			return fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire)
   228  		}
   229  		switch fieldNum {
   230  		case 1:
   231  			if wireType != 0 {
   232  				return fmt.Errorf("proto: wrong wireType = %d for field PhysicalTime", wireType)
   233  			}
   234  			m.PhysicalTime = 0
   235  			for shift := uint(0); ; shift += 7 {
   236  				if shift >= 64 {
   237  					return ErrIntOverflowTimestamp
   238  				}
   239  				if iNdEx >= l {
   240  					return io.ErrUnexpectedEOF
   241  				}
   242  				b := dAtA[iNdEx]
   243  				iNdEx++
   244  				m.PhysicalTime |= int64(b&0x7F) << shift
   245  				if b < 0x80 {
   246  					break
   247  				}
   248  			}
   249  		case 2:
   250  			if wireType != 0 {
   251  				return fmt.Errorf("proto: wrong wireType = %d for field LogicalTime", wireType)
   252  			}
   253  			m.LogicalTime = 0
   254  			for shift := uint(0); ; shift += 7 {
   255  				if shift >= 64 {
   256  					return ErrIntOverflowTimestamp
   257  				}
   258  				if iNdEx >= l {
   259  					return io.ErrUnexpectedEOF
   260  				}
   261  				b := dAtA[iNdEx]
   262  				iNdEx++
   263  				m.LogicalTime |= uint32(b&0x7F) << shift
   264  				if b < 0x80 {
   265  					break
   266  				}
   267  			}
   268  		case 3:
   269  			if wireType != 0 {
   270  				return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
   271  			}
   272  			m.NodeID = 0
   273  			for shift := uint(0); ; shift += 7 {
   274  				if shift >= 64 {
   275  					return ErrIntOverflowTimestamp
   276  				}
   277  				if iNdEx >= l {
   278  					return io.ErrUnexpectedEOF
   279  				}
   280  				b := dAtA[iNdEx]
   281  				iNdEx++
   282  				m.NodeID |= uint32(b&0x7F) << shift
   283  				if b < 0x80 {
   284  					break
   285  				}
   286  			}
   287  		default:
   288  			iNdEx = preIndex
   289  			skippy, err := skipTimestamp(dAtA[iNdEx:])
   290  			if err != nil {
   291  				return err
   292  			}
   293  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   294  				return ErrInvalidLengthTimestamp
   295  			}
   296  			if (iNdEx + skippy) > l {
   297  				return io.ErrUnexpectedEOF
   298  			}
   299  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
   300  			iNdEx += skippy
   301  		}
   302  	}
   303  
   304  	if iNdEx > l {
   305  		return io.ErrUnexpectedEOF
   306  	}
   307  	return nil
   308  }
   309  func skipTimestamp(dAtA []byte) (n int, err error) {
   310  	l := len(dAtA)
   311  	iNdEx := 0
   312  	depth := 0
   313  	for iNdEx < l {
   314  		var wire uint64
   315  		for shift := uint(0); ; shift += 7 {
   316  			if shift >= 64 {
   317  				return 0, ErrIntOverflowTimestamp
   318  			}
   319  			if iNdEx >= l {
   320  				return 0, io.ErrUnexpectedEOF
   321  			}
   322  			b := dAtA[iNdEx]
   323  			iNdEx++
   324  			wire |= (uint64(b) & 0x7F) << shift
   325  			if b < 0x80 {
   326  				break
   327  			}
   328  		}
   329  		wireType := int(wire & 0x7)
   330  		switch wireType {
   331  		case 0:
   332  			for shift := uint(0); ; shift += 7 {
   333  				if shift >= 64 {
   334  					return 0, ErrIntOverflowTimestamp
   335  				}
   336  				if iNdEx >= l {
   337  					return 0, io.ErrUnexpectedEOF
   338  				}
   339  				iNdEx++
   340  				if dAtA[iNdEx-1] < 0x80 {
   341  					break
   342  				}
   343  			}
   344  		case 1:
   345  			iNdEx += 8
   346  		case 2:
   347  			var length int
   348  			for shift := uint(0); ; shift += 7 {
   349  				if shift >= 64 {
   350  					return 0, ErrIntOverflowTimestamp
   351  				}
   352  				if iNdEx >= l {
   353  					return 0, io.ErrUnexpectedEOF
   354  				}
   355  				b := dAtA[iNdEx]
   356  				iNdEx++
   357  				length |= (int(b) & 0x7F) << shift
   358  				if b < 0x80 {
   359  					break
   360  				}
   361  			}
   362  			if length < 0 {
   363  				return 0, ErrInvalidLengthTimestamp
   364  			}
   365  			iNdEx += length
   366  		case 3:
   367  			depth++
   368  		case 4:
   369  			if depth == 0 {
   370  				return 0, ErrUnexpectedEndOfGroupTimestamp
   371  			}
   372  			depth--
   373  		case 5:
   374  			iNdEx += 4
   375  		default:
   376  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   377  		}
   378  		if iNdEx < 0 {
   379  			return 0, ErrInvalidLengthTimestamp
   380  		}
   381  		if depth == 0 {
   382  			return iNdEx, nil
   383  		}
   384  	}
   385  	return 0, io.ErrUnexpectedEOF
   386  }
   387  
   388  var (
   389  	ErrInvalidLengthTimestamp        = fmt.Errorf("proto: negative length found during unmarshaling")
   390  	ErrIntOverflowTimestamp          = fmt.Errorf("proto: integer overflow")
   391  	ErrUnexpectedEndOfGroupTimestamp = fmt.Errorf("proto: unexpected end of group")
   392  )