github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/util/admission/admissionpb/io_threshold.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: util/admission/admissionpb/io_threshold.proto
     3  
     4  package admissionpb
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	io "io"
    11  	math "math"
    12  	math_bits "math/bits"
    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  // IOThreshold wraps the raw signals that IO admission control utilizes to determine
    27  // when to introduce queueing.
    28  type IOThreshold struct {
    29  	L0NumSubLevels           int64 `protobuf:"varint,1,opt,name=l0_num_sub_levels,json=l0NumSubLevels,proto3" json:"l0_num_sub_levels,omitempty"`
    30  	L0NumSubLevelsThreshold  int64 `protobuf:"varint,2,opt,name=l0_num_sub_levels_threshold,json=l0NumSubLevelsThreshold,proto3" json:"l0_num_sub_levels_threshold,omitempty"`
    31  	L0NumFiles               int64 `protobuf:"varint,3,opt,name=l0_num_files,json=l0NumFiles,proto3" json:"l0_num_files,omitempty"`
    32  	L0NumFilesThreshold      int64 `protobuf:"varint,4,opt,name=l0_num_files_threshold,json=l0NumFilesThreshold,proto3" json:"l0_num_files_threshold,omitempty"`
    33  	L0Size                   int64 `protobuf:"varint,5,opt,name=l0_size,json=l0Size,proto3" json:"l0_size,omitempty"`
    34  	L0MinimumSizePerSubLevel int64 `protobuf:"varint,6,opt,name=l0_minimum_size_per_sub_level,json=l0MinimumSizePerSubLevel,proto3" json:"l0_minimum_size_per_sub_level,omitempty"`
    35  }
    36  
    37  func (m *IOThreshold) Reset()      { *m = IOThreshold{} }
    38  func (*IOThreshold) ProtoMessage() {}
    39  func (*IOThreshold) Descriptor() ([]byte, []int) {
    40  	return fileDescriptor_7687b2e0083e310d, []int{0}
    41  }
    42  func (m *IOThreshold) XXX_Unmarshal(b []byte) error {
    43  	return m.Unmarshal(b)
    44  }
    45  func (m *IOThreshold) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    46  	b = b[:cap(b)]
    47  	n, err := m.MarshalToSizedBuffer(b)
    48  	if err != nil {
    49  		return nil, err
    50  	}
    51  	return b[:n], nil
    52  }
    53  func (m *IOThreshold) XXX_Merge(src proto.Message) {
    54  	xxx_messageInfo_IOThreshold.Merge(m, src)
    55  }
    56  func (m *IOThreshold) XXX_Size() int {
    57  	return m.Size()
    58  }
    59  func (m *IOThreshold) XXX_DiscardUnknown() {
    60  	xxx_messageInfo_IOThreshold.DiscardUnknown(m)
    61  }
    62  
    63  var xxx_messageInfo_IOThreshold proto.InternalMessageInfo
    64  
    65  func init() {
    66  	proto.RegisterType((*IOThreshold)(nil), "cockroach.parser.util.admission.admissionpb.IOThreshold")
    67  }
    68  
    69  func init() {
    70  	proto.RegisterFile("util/admission/admissionpb/io_threshold.proto", fileDescriptor_7687b2e0083e310d)
    71  }
    72  
    73  var fileDescriptor_7687b2e0083e310d = []byte{
    74  	// 332 bytes of a gzipped FileDescriptorProto
    75  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x4f, 0x4b, 0xc3, 0x30,
    76  	0x1c, 0x86, 0xdb, 0x6d, 0x4e, 0x88, 0x22, 0x58, 0xc5, 0x15, 0xc5, 0x38, 0xc4, 0x83, 0x1e, 0x6c,
    77  	0x03, 0xbb, 0x89, 0x30, 0xf0, 0x20, 0x08, 0xfe, 0xc3, 0x79, 0xf2, 0x12, 0x96, 0x2e, 0xb6, 0x61,
    78  	0xc9, 0x52, 0x9a, 0xc6, 0xc3, 0x3e, 0x85, 0x47, 0x8f, 0x7e, 0x01, 0xbf, 0xc7, 0x8e, 0x3b, 0xee,
    79  	0xa8, 0xdd, 0x17, 0x91, 0x66, 0x6e, 0x99, 0x88, 0xb7, 0x1f, 0xe1, 0x79, 0xde, 0xbc, 0xf0, 0x82,
    80  	0x53, 0x9d, 0x33, 0x1e, 0x76, 0x7b, 0x82, 0x29, 0xc5, 0xe4, 0xc0, 0x5e, 0x29, 0x09, 0x99, 0xc4,
    81  	0x79, 0x92, 0x51, 0x95, 0x48, 0xde, 0x0b, 0xd2, 0x4c, 0xe6, 0xd2, 0x3b, 0x8a, 0x64, 0xd4, 0xcf,
    82  	0x64, 0x37, 0x4a, 0x82, 0x52, 0x0c, 0x16, 0x78, 0xb0, 0x24, 0xee, 0x6e, 0xc7, 0x32, 0x96, 0x46,
    83  	0x08, 0xcb, 0x6b, 0xe6, 0x1e, 0x7e, 0x54, 0xc0, 0xda, 0xd5, 0xdd, 0xe3, 0x3c, 0xd1, 0x3b, 0x01,
    84  	0x9b, 0x1c, 0xe1, 0x81, 0x16, 0x58, 0x69, 0x82, 0x39, 0x7d, 0xa1, 0x5c, 0xf9, 0x6e, 0xd3, 0x3d,
    85  	0xae, 0x3e, 0x6c, 0x70, 0x74, 0xab, 0x45, 0x47, 0x93, 0x6b, 0xf3, 0xea, 0x9d, 0x83, 0xbd, 0x3f,
    86  	0xa8, 0xed, 0xe6, 0x57, 0x8c, 0xd4, 0xf8, 0x2d, 0xd9, 0x8f, 0x9a, 0x60, 0xfd, 0xc7, 0x7e, 0x66,
    87  	0x9c, 0x2a, 0xbf, 0x6a, 0x70, 0x60, 0xf0, 0xcb, 0xf2, 0xc5, 0x6b, 0x81, 0x9d, 0x65, 0x62, 0x29,
    88  	0xba, 0x66, 0xd8, 0x2d, 0xcb, 0xda, 0xd8, 0x06, 0x58, 0xe5, 0x08, 0x2b, 0x36, 0xa4, 0xfe, 0x8a,
    89  	0xa1, 0xea, 0x1c, 0x75, 0xd8, 0x90, 0x7a, 0x6d, 0xb0, 0xcf, 0x11, 0x16, 0x6c, 0xc0, 0x44, 0xd9,
    90  	0x98, 0x0d, 0x29, 0x4e, 0x69, 0x66, 0xab, 0xfb, 0x75, 0x83, 0xfb, 0x1c, 0xdd, 0xcc, 0x98, 0xd2,
    91  	0xba, 0xa7, 0xd9, 0xbc, 0xfa, 0x59, 0xed, 0xed, 0xfd, 0xc0, 0xb9, 0xe8, 0x8e, 0xbe, 0xa0, 0x33,
    92  	0x2a, 0xa0, 0x3b, 0x2e, 0xa0, 0x3b, 0x29, 0xa0, 0xfb, 0x59, 0x40, 0xf7, 0x75, 0x0a, 0x9d, 0xf1,
    93  	0x14, 0x3a, 0x93, 0x29, 0x74, 0x9e, 0xda, 0x31, 0xcb, 0x13, 0x4d, 0x82, 0x48, 0x8a, 0x70, 0x31,
    94  	0x4c, 0x8f, 0xd8, 0x3b, 0x4c, 0xfb, 0x71, 0xf8, 0xff, 0xc2, 0xa4, 0x6e, 0x96, 0x69, 0x7d, 0x07,
    95  	0x00, 0x00, 0xff, 0xff, 0x7a, 0x9b, 0x58, 0x7b, 0x06, 0x02, 0x00, 0x00,
    96  }
    97  
    98  func (m *IOThreshold) Marshal() (dAtA []byte, err error) {
    99  	size := m.Size()
   100  	dAtA = make([]byte, size)
   101  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   102  	if err != nil {
   103  		return nil, err
   104  	}
   105  	return dAtA[:n], nil
   106  }
   107  
   108  func (m *IOThreshold) MarshalTo(dAtA []byte) (int, error) {
   109  	size := m.Size()
   110  	return m.MarshalToSizedBuffer(dAtA[:size])
   111  }
   112  
   113  func (m *IOThreshold) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   114  	i := len(dAtA)
   115  	_ = i
   116  	var l int
   117  	_ = l
   118  	if m.L0MinimumSizePerSubLevel != 0 {
   119  		i = encodeVarintIoThreshold(dAtA, i, uint64(m.L0MinimumSizePerSubLevel))
   120  		i--
   121  		dAtA[i] = 0x30
   122  	}
   123  	if m.L0Size != 0 {
   124  		i = encodeVarintIoThreshold(dAtA, i, uint64(m.L0Size))
   125  		i--
   126  		dAtA[i] = 0x28
   127  	}
   128  	if m.L0NumFilesThreshold != 0 {
   129  		i = encodeVarintIoThreshold(dAtA, i, uint64(m.L0NumFilesThreshold))
   130  		i--
   131  		dAtA[i] = 0x20
   132  	}
   133  	if m.L0NumFiles != 0 {
   134  		i = encodeVarintIoThreshold(dAtA, i, uint64(m.L0NumFiles))
   135  		i--
   136  		dAtA[i] = 0x18
   137  	}
   138  	if m.L0NumSubLevelsThreshold != 0 {
   139  		i = encodeVarintIoThreshold(dAtA, i, uint64(m.L0NumSubLevelsThreshold))
   140  		i--
   141  		dAtA[i] = 0x10
   142  	}
   143  	if m.L0NumSubLevels != 0 {
   144  		i = encodeVarintIoThreshold(dAtA, i, uint64(m.L0NumSubLevels))
   145  		i--
   146  		dAtA[i] = 0x8
   147  	}
   148  	return len(dAtA) - i, nil
   149  }
   150  
   151  func encodeVarintIoThreshold(dAtA []byte, offset int, v uint64) int {
   152  	offset -= sovIoThreshold(v)
   153  	base := offset
   154  	for v >= 1<<7 {
   155  		dAtA[offset] = uint8(v&0x7f | 0x80)
   156  		v >>= 7
   157  		offset++
   158  	}
   159  	dAtA[offset] = uint8(v)
   160  	return base
   161  }
   162  func (m *IOThreshold) Size() (n int) {
   163  	if m == nil {
   164  		return 0
   165  	}
   166  	var l int
   167  	_ = l
   168  	if m.L0NumSubLevels != 0 {
   169  		n += 1 + sovIoThreshold(uint64(m.L0NumSubLevels))
   170  	}
   171  	if m.L0NumSubLevelsThreshold != 0 {
   172  		n += 1 + sovIoThreshold(uint64(m.L0NumSubLevelsThreshold))
   173  	}
   174  	if m.L0NumFiles != 0 {
   175  		n += 1 + sovIoThreshold(uint64(m.L0NumFiles))
   176  	}
   177  	if m.L0NumFilesThreshold != 0 {
   178  		n += 1 + sovIoThreshold(uint64(m.L0NumFilesThreshold))
   179  	}
   180  	if m.L0Size != 0 {
   181  		n += 1 + sovIoThreshold(uint64(m.L0Size))
   182  	}
   183  	if m.L0MinimumSizePerSubLevel != 0 {
   184  		n += 1 + sovIoThreshold(uint64(m.L0MinimumSizePerSubLevel))
   185  	}
   186  	return n
   187  }
   188  
   189  func sovIoThreshold(x uint64) (n int) {
   190  	return (math_bits.Len64(x|1) + 6) / 7
   191  }
   192  func sozIoThreshold(x uint64) (n int) {
   193  	return sovIoThreshold(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   194  }
   195  func (m *IOThreshold) Unmarshal(dAtA []byte) error {
   196  	l := len(dAtA)
   197  	iNdEx := 0
   198  	for iNdEx < l {
   199  		preIndex := iNdEx
   200  		var wire uint64
   201  		for shift := uint(0); ; shift += 7 {
   202  			if shift >= 64 {
   203  				return ErrIntOverflowIoThreshold
   204  			}
   205  			if iNdEx >= l {
   206  				return io.ErrUnexpectedEOF
   207  			}
   208  			b := dAtA[iNdEx]
   209  			iNdEx++
   210  			wire |= uint64(b&0x7F) << shift
   211  			if b < 0x80 {
   212  				break
   213  			}
   214  		}
   215  		fieldNum := int32(wire >> 3)
   216  		wireType := int(wire & 0x7)
   217  		if wireType == 4 {
   218  			return fmt.Errorf("proto: IOThreshold: wiretype end group for non-group")
   219  		}
   220  		if fieldNum <= 0 {
   221  			return fmt.Errorf("proto: IOThreshold: illegal tag %d (wire type %d)", fieldNum, wire)
   222  		}
   223  		switch fieldNum {
   224  		case 1:
   225  			if wireType != 0 {
   226  				return fmt.Errorf("proto: wrong wireType = %d for field L0NumSubLevels", wireType)
   227  			}
   228  			m.L0NumSubLevels = 0
   229  			for shift := uint(0); ; shift += 7 {
   230  				if shift >= 64 {
   231  					return ErrIntOverflowIoThreshold
   232  				}
   233  				if iNdEx >= l {
   234  					return io.ErrUnexpectedEOF
   235  				}
   236  				b := dAtA[iNdEx]
   237  				iNdEx++
   238  				m.L0NumSubLevels |= int64(b&0x7F) << shift
   239  				if b < 0x80 {
   240  					break
   241  				}
   242  			}
   243  		case 2:
   244  			if wireType != 0 {
   245  				return fmt.Errorf("proto: wrong wireType = %d for field L0NumSubLevelsThreshold", wireType)
   246  			}
   247  			m.L0NumSubLevelsThreshold = 0
   248  			for shift := uint(0); ; shift += 7 {
   249  				if shift >= 64 {
   250  					return ErrIntOverflowIoThreshold
   251  				}
   252  				if iNdEx >= l {
   253  					return io.ErrUnexpectedEOF
   254  				}
   255  				b := dAtA[iNdEx]
   256  				iNdEx++
   257  				m.L0NumSubLevelsThreshold |= int64(b&0x7F) << shift
   258  				if b < 0x80 {
   259  					break
   260  				}
   261  			}
   262  		case 3:
   263  			if wireType != 0 {
   264  				return fmt.Errorf("proto: wrong wireType = %d for field L0NumFiles", wireType)
   265  			}
   266  			m.L0NumFiles = 0
   267  			for shift := uint(0); ; shift += 7 {
   268  				if shift >= 64 {
   269  					return ErrIntOverflowIoThreshold
   270  				}
   271  				if iNdEx >= l {
   272  					return io.ErrUnexpectedEOF
   273  				}
   274  				b := dAtA[iNdEx]
   275  				iNdEx++
   276  				m.L0NumFiles |= int64(b&0x7F) << shift
   277  				if b < 0x80 {
   278  					break
   279  				}
   280  			}
   281  		case 4:
   282  			if wireType != 0 {
   283  				return fmt.Errorf("proto: wrong wireType = %d for field L0NumFilesThreshold", wireType)
   284  			}
   285  			m.L0NumFilesThreshold = 0
   286  			for shift := uint(0); ; shift += 7 {
   287  				if shift >= 64 {
   288  					return ErrIntOverflowIoThreshold
   289  				}
   290  				if iNdEx >= l {
   291  					return io.ErrUnexpectedEOF
   292  				}
   293  				b := dAtA[iNdEx]
   294  				iNdEx++
   295  				m.L0NumFilesThreshold |= int64(b&0x7F) << shift
   296  				if b < 0x80 {
   297  					break
   298  				}
   299  			}
   300  		case 5:
   301  			if wireType != 0 {
   302  				return fmt.Errorf("proto: wrong wireType = %d for field L0Size", wireType)
   303  			}
   304  			m.L0Size = 0
   305  			for shift := uint(0); ; shift += 7 {
   306  				if shift >= 64 {
   307  					return ErrIntOverflowIoThreshold
   308  				}
   309  				if iNdEx >= l {
   310  					return io.ErrUnexpectedEOF
   311  				}
   312  				b := dAtA[iNdEx]
   313  				iNdEx++
   314  				m.L0Size |= int64(b&0x7F) << shift
   315  				if b < 0x80 {
   316  					break
   317  				}
   318  			}
   319  		case 6:
   320  			if wireType != 0 {
   321  				return fmt.Errorf("proto: wrong wireType = %d for field L0MinimumSizePerSubLevel", wireType)
   322  			}
   323  			m.L0MinimumSizePerSubLevel = 0
   324  			for shift := uint(0); ; shift += 7 {
   325  				if shift >= 64 {
   326  					return ErrIntOverflowIoThreshold
   327  				}
   328  				if iNdEx >= l {
   329  					return io.ErrUnexpectedEOF
   330  				}
   331  				b := dAtA[iNdEx]
   332  				iNdEx++
   333  				m.L0MinimumSizePerSubLevel |= int64(b&0x7F) << shift
   334  				if b < 0x80 {
   335  					break
   336  				}
   337  			}
   338  		default:
   339  			iNdEx = preIndex
   340  			skippy, err := skipIoThreshold(dAtA[iNdEx:])
   341  			if err != nil {
   342  				return err
   343  			}
   344  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   345  				return ErrInvalidLengthIoThreshold
   346  			}
   347  			if (iNdEx + skippy) > l {
   348  				return io.ErrUnexpectedEOF
   349  			}
   350  			iNdEx += skippy
   351  		}
   352  	}
   353  
   354  	if iNdEx > l {
   355  		return io.ErrUnexpectedEOF
   356  	}
   357  	return nil
   358  }
   359  func skipIoThreshold(dAtA []byte) (n int, err error) {
   360  	l := len(dAtA)
   361  	iNdEx := 0
   362  	depth := 0
   363  	for iNdEx < l {
   364  		var wire uint64
   365  		for shift := uint(0); ; shift += 7 {
   366  			if shift >= 64 {
   367  				return 0, ErrIntOverflowIoThreshold
   368  			}
   369  			if iNdEx >= l {
   370  				return 0, io.ErrUnexpectedEOF
   371  			}
   372  			b := dAtA[iNdEx]
   373  			iNdEx++
   374  			wire |= (uint64(b) & 0x7F) << shift
   375  			if b < 0x80 {
   376  				break
   377  			}
   378  		}
   379  		wireType := int(wire & 0x7)
   380  		switch wireType {
   381  		case 0:
   382  			for shift := uint(0); ; shift += 7 {
   383  				if shift >= 64 {
   384  					return 0, ErrIntOverflowIoThreshold
   385  				}
   386  				if iNdEx >= l {
   387  					return 0, io.ErrUnexpectedEOF
   388  				}
   389  				iNdEx++
   390  				if dAtA[iNdEx-1] < 0x80 {
   391  					break
   392  				}
   393  			}
   394  		case 1:
   395  			iNdEx += 8
   396  		case 2:
   397  			var length int
   398  			for shift := uint(0); ; shift += 7 {
   399  				if shift >= 64 {
   400  					return 0, ErrIntOverflowIoThreshold
   401  				}
   402  				if iNdEx >= l {
   403  					return 0, io.ErrUnexpectedEOF
   404  				}
   405  				b := dAtA[iNdEx]
   406  				iNdEx++
   407  				length |= (int(b) & 0x7F) << shift
   408  				if b < 0x80 {
   409  					break
   410  				}
   411  			}
   412  			if length < 0 {
   413  				return 0, ErrInvalidLengthIoThreshold
   414  			}
   415  			iNdEx += length
   416  		case 3:
   417  			depth++
   418  		case 4:
   419  			if depth == 0 {
   420  				return 0, ErrUnexpectedEndOfGroupIoThreshold
   421  			}
   422  			depth--
   423  		case 5:
   424  			iNdEx += 4
   425  		default:
   426  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   427  		}
   428  		if iNdEx < 0 {
   429  			return 0, ErrInvalidLengthIoThreshold
   430  		}
   431  		if depth == 0 {
   432  			return iNdEx, nil
   433  		}
   434  	}
   435  	return 0, io.ErrUnexpectedEOF
   436  }
   437  
   438  var (
   439  	ErrInvalidLengthIoThreshold        = fmt.Errorf("proto: negative length found during unmarshaling")
   440  	ErrIntOverflowIoThreshold          = fmt.Errorf("proto: integer overflow")
   441  	ErrUnexpectedEndOfGroupIoThreshold = fmt.Errorf("proto: unexpected end of group")
   442  )
   443