github.com/sequix/cortex@v1.1.6/pkg/chunk/storage/caching_index_client.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: caching_index_client.proto
     3  
     4  package storage
     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  	reflect "reflect"
    13  	strings "strings"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
    26  
    27  type Entry struct {
    28  	Column Bytes `protobuf:"bytes,1,opt,name=Column,json=column,proto3,customtype=Bytes" json:"Column"`
    29  	Value  Bytes `protobuf:"bytes,2,opt,name=Value,json=value,proto3,customtype=Bytes" json:"Value"`
    30  }
    31  
    32  func (m *Entry) Reset()      { *m = Entry{} }
    33  func (*Entry) ProtoMessage() {}
    34  func (*Entry) Descriptor() ([]byte, []int) {
    35  	return fileDescriptor_6a83955bbc783296, []int{0}
    36  }
    37  func (m *Entry) XXX_Unmarshal(b []byte) error {
    38  	return m.Unmarshal(b)
    39  }
    40  func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    41  	if deterministic {
    42  		return xxx_messageInfo_Entry.Marshal(b, m, deterministic)
    43  	} else {
    44  		b = b[:cap(b)]
    45  		n, err := m.MarshalTo(b)
    46  		if err != nil {
    47  			return nil, err
    48  		}
    49  		return b[:n], nil
    50  	}
    51  }
    52  func (m *Entry) XXX_Merge(src proto.Message) {
    53  	xxx_messageInfo_Entry.Merge(m, src)
    54  }
    55  func (m *Entry) XXX_Size() int {
    56  	return m.Size()
    57  }
    58  func (m *Entry) XXX_DiscardUnknown() {
    59  	xxx_messageInfo_Entry.DiscardUnknown(m)
    60  }
    61  
    62  var xxx_messageInfo_Entry proto.InternalMessageInfo
    63  
    64  type ReadBatch struct {
    65  	Entries []Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries"`
    66  	Key     string  `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
    67  	// The time at which the key expires.
    68  	Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"`
    69  	// The number of entries; used for cardinality limiting.
    70  	// entries will be empty when this is set.
    71  	Cardinality int32 `protobuf:"varint,4,opt,name=cardinality,proto3" json:"cardinality,omitempty"`
    72  }
    73  
    74  func (m *ReadBatch) Reset()      { *m = ReadBatch{} }
    75  func (*ReadBatch) ProtoMessage() {}
    76  func (*ReadBatch) Descriptor() ([]byte, []int) {
    77  	return fileDescriptor_6a83955bbc783296, []int{1}
    78  }
    79  func (m *ReadBatch) XXX_Unmarshal(b []byte) error {
    80  	return m.Unmarshal(b)
    81  }
    82  func (m *ReadBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    83  	if deterministic {
    84  		return xxx_messageInfo_ReadBatch.Marshal(b, m, deterministic)
    85  	} else {
    86  		b = b[:cap(b)]
    87  		n, err := m.MarshalTo(b)
    88  		if err != nil {
    89  			return nil, err
    90  		}
    91  		return b[:n], nil
    92  	}
    93  }
    94  func (m *ReadBatch) XXX_Merge(src proto.Message) {
    95  	xxx_messageInfo_ReadBatch.Merge(m, src)
    96  }
    97  func (m *ReadBatch) XXX_Size() int {
    98  	return m.Size()
    99  }
   100  func (m *ReadBatch) XXX_DiscardUnknown() {
   101  	xxx_messageInfo_ReadBatch.DiscardUnknown(m)
   102  }
   103  
   104  var xxx_messageInfo_ReadBatch proto.InternalMessageInfo
   105  
   106  func (m *ReadBatch) GetEntries() []Entry {
   107  	if m != nil {
   108  		return m.Entries
   109  	}
   110  	return nil
   111  }
   112  
   113  func (m *ReadBatch) GetKey() string {
   114  	if m != nil {
   115  		return m.Key
   116  	}
   117  	return ""
   118  }
   119  
   120  func (m *ReadBatch) GetExpiry() int64 {
   121  	if m != nil {
   122  		return m.Expiry
   123  	}
   124  	return 0
   125  }
   126  
   127  func (m *ReadBatch) GetCardinality() int32 {
   128  	if m != nil {
   129  		return m.Cardinality
   130  	}
   131  	return 0
   132  }
   133  
   134  func init() {
   135  	proto.RegisterType((*Entry)(nil), "storage.Entry")
   136  	proto.RegisterType((*ReadBatch)(nil), "storage.ReadBatch")
   137  }
   138  
   139  func init() { proto.RegisterFile("caching_index_client.proto", fileDescriptor_6a83955bbc783296) }
   140  
   141  var fileDescriptor_6a83955bbc783296 = []byte{
   142  	// 313 bytes of a gzipped FileDescriptorProto
   143  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4e, 0xf3, 0x30,
   144  	0x14, 0x85, 0xed, 0x3f, 0x4d, 0xaa, 0xba, 0x3f, 0x08, 0x79, 0x40, 0x51, 0x87, 0xdb, 0xa8, 0x08,
   145  	0x29, 0x0b, 0xa9, 0x04, 0x3c, 0x41, 0x10, 0x2f, 0x10, 0x24, 0xd6, 0xca, 0x75, 0x4d, 0x6a, 0x91,
   146  	0xda, 0x55, 0xea, 0xa0, 0x66, 0x63, 0x63, 0xe5, 0x31, 0x78, 0x94, 0x8e, 0x1d, 0x2b, 0x86, 0x8a,
   147  	0xba, 0x0b, 0x63, 0x1f, 0x01, 0xd5, 0x14, 0x89, 0x81, 0xed, 0x1c, 0x7f, 0xc7, 0xf7, 0x5c, 0x5d,
   148  	0xd2, 0xe1, 0x8c, 0x8f, 0xa5, 0xca, 0x07, 0x52, 0x8d, 0xc4, 0x7c, 0xc0, 0x0b, 0x29, 0x94, 0x49,
   149  	0xa6, 0xa5, 0x36, 0x9a, 0x36, 0x67, 0x46, 0x97, 0x2c, 0x17, 0x9d, 0x8b, 0x5c, 0x9a, 0x71, 0x35,
   150  	0x4c, 0xb8, 0x9e, 0xf4, 0x73, 0x9d, 0xeb, 0xbe, 0xe3, 0xc3, 0xea, 0xc1, 0x39, 0x67, 0x9c, 0xfa,
   151  	0xfe, 0xd7, 0xbb, 0x23, 0xfe, 0xad, 0x32, 0x65, 0x4d, 0xcf, 0x49, 0x70, 0xa3, 0x8b, 0x6a, 0xa2,
   152  	0x42, 0x1c, 0xe1, 0xf8, 0x7f, 0x7a, 0xb4, 0x58, 0x77, 0xd1, 0xfb, 0xba, 0xeb, 0xa7, 0xb5, 0x11,
   153  	0xb3, 0x2c, 0xe0, 0x0e, 0xd2, 0x33, 0xe2, 0xdf, 0xb3, 0xa2, 0x12, 0xe1, 0xbf, 0xbf, 0x52, 0xfe,
   154  	0xd3, 0x9e, 0xf5, 0x5e, 0x30, 0x69, 0x65, 0x82, 0x8d, 0x52, 0x66, 0xf8, 0x98, 0x26, 0xa4, 0x29,
   155  	0x94, 0x29, 0xa5, 0x98, 0x85, 0x38, 0xf2, 0xe2, 0xf6, 0xe5, 0x71, 0x72, 0x58, 0x36, 0x71, 0xd5,
   156  	0x69, 0x63, 0x3f, 0x24, 0xfb, 0x09, 0xd1, 0x13, 0xe2, 0x3d, 0x8a, 0xda, 0x15, 0xb4, 0xb2, 0xbd,
   157  	0xa4, 0xa7, 0x24, 0x10, 0xf3, 0xa9, 0x2c, 0xeb, 0xd0, 0x8b, 0x70, 0xec, 0x65, 0x07, 0x47, 0x23,
   158  	0xd2, 0xe6, 0xac, 0x1c, 0x49, 0xc5, 0x0a, 0x69, 0xea, 0xb0, 0x11, 0xe1, 0xd8, 0xcf, 0x7e, 0x3f,
   159  	0xa5, 0xd7, 0xcb, 0x0d, 0xa0, 0xd5, 0x06, 0xd0, 0x6e, 0x03, 0xf8, 0xd9, 0x02, 0x7e, 0xb3, 0x80,
   160  	0x17, 0x16, 0xf0, 0xd2, 0x02, 0xfe, 0xb0, 0x80, 0x3f, 0x2d, 0xa0, 0x9d, 0x05, 0xfc, 0xba, 0x05,
   161  	0xb4, 0xdc, 0x02, 0x5a, 0x6d, 0x01, 0x0d, 0x03, 0x77, 0x9b, 0xab, 0xaf, 0x00, 0x00, 0x00, 0xff,
   162  	0xff, 0xce, 0x7e, 0x67, 0x82, 0x71, 0x01, 0x00, 0x00,
   163  }
   164  
   165  func (this *Entry) Equal(that interface{}) bool {
   166  	if that == nil {
   167  		return this == nil
   168  	}
   169  
   170  	that1, ok := that.(*Entry)
   171  	if !ok {
   172  		that2, ok := that.(Entry)
   173  		if ok {
   174  			that1 = &that2
   175  		} else {
   176  			return false
   177  		}
   178  	}
   179  	if that1 == nil {
   180  		return this == nil
   181  	} else if this == nil {
   182  		return false
   183  	}
   184  	if !this.Column.Equal(that1.Column) {
   185  		return false
   186  	}
   187  	if !this.Value.Equal(that1.Value) {
   188  		return false
   189  	}
   190  	return true
   191  }
   192  func (this *ReadBatch) Equal(that interface{}) bool {
   193  	if that == nil {
   194  		return this == nil
   195  	}
   196  
   197  	that1, ok := that.(*ReadBatch)
   198  	if !ok {
   199  		that2, ok := that.(ReadBatch)
   200  		if ok {
   201  			that1 = &that2
   202  		} else {
   203  			return false
   204  		}
   205  	}
   206  	if that1 == nil {
   207  		return this == nil
   208  	} else if this == nil {
   209  		return false
   210  	}
   211  	if len(this.Entries) != len(that1.Entries) {
   212  		return false
   213  	}
   214  	for i := range this.Entries {
   215  		if !this.Entries[i].Equal(&that1.Entries[i]) {
   216  			return false
   217  		}
   218  	}
   219  	if this.Key != that1.Key {
   220  		return false
   221  	}
   222  	if this.Expiry != that1.Expiry {
   223  		return false
   224  	}
   225  	if this.Cardinality != that1.Cardinality {
   226  		return false
   227  	}
   228  	return true
   229  }
   230  func (this *Entry) GoString() string {
   231  	if this == nil {
   232  		return "nil"
   233  	}
   234  	s := make([]string, 0, 6)
   235  	s = append(s, "&storage.Entry{")
   236  	s = append(s, "Column: "+fmt.Sprintf("%#v", this.Column)+",\n")
   237  	s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
   238  	s = append(s, "}")
   239  	return strings.Join(s, "")
   240  }
   241  func (this *ReadBatch) GoString() string {
   242  	if this == nil {
   243  		return "nil"
   244  	}
   245  	s := make([]string, 0, 8)
   246  	s = append(s, "&storage.ReadBatch{")
   247  	if this.Entries != nil {
   248  		vs := make([]*Entry, len(this.Entries))
   249  		for i := range vs {
   250  			vs[i] = &this.Entries[i]
   251  		}
   252  		s = append(s, "Entries: "+fmt.Sprintf("%#v", vs)+",\n")
   253  	}
   254  	s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n")
   255  	s = append(s, "Expiry: "+fmt.Sprintf("%#v", this.Expiry)+",\n")
   256  	s = append(s, "Cardinality: "+fmt.Sprintf("%#v", this.Cardinality)+",\n")
   257  	s = append(s, "}")
   258  	return strings.Join(s, "")
   259  }
   260  func valueToGoStringCachingIndexClient(v interface{}, typ string) string {
   261  	rv := reflect.ValueOf(v)
   262  	if rv.IsNil() {
   263  		return "nil"
   264  	}
   265  	pv := reflect.Indirect(rv).Interface()
   266  	return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
   267  }
   268  func (m *Entry) Marshal() (dAtA []byte, err error) {
   269  	size := m.Size()
   270  	dAtA = make([]byte, size)
   271  	n, err := m.MarshalTo(dAtA)
   272  	if err != nil {
   273  		return nil, err
   274  	}
   275  	return dAtA[:n], nil
   276  }
   277  
   278  func (m *Entry) MarshalTo(dAtA []byte) (int, error) {
   279  	var i int
   280  	_ = i
   281  	var l int
   282  	_ = l
   283  	dAtA[i] = 0xa
   284  	i++
   285  	i = encodeVarintCachingIndexClient(dAtA, i, uint64(m.Column.Size()))
   286  	n1, err := m.Column.MarshalTo(dAtA[i:])
   287  	if err != nil {
   288  		return 0, err
   289  	}
   290  	i += n1
   291  	dAtA[i] = 0x12
   292  	i++
   293  	i = encodeVarintCachingIndexClient(dAtA, i, uint64(m.Value.Size()))
   294  	n2, err := m.Value.MarshalTo(dAtA[i:])
   295  	if err != nil {
   296  		return 0, err
   297  	}
   298  	i += n2
   299  	return i, nil
   300  }
   301  
   302  func (m *ReadBatch) Marshal() (dAtA []byte, err error) {
   303  	size := m.Size()
   304  	dAtA = make([]byte, size)
   305  	n, err := m.MarshalTo(dAtA)
   306  	if err != nil {
   307  		return nil, err
   308  	}
   309  	return dAtA[:n], nil
   310  }
   311  
   312  func (m *ReadBatch) MarshalTo(dAtA []byte) (int, error) {
   313  	var i int
   314  	_ = i
   315  	var l int
   316  	_ = l
   317  	if len(m.Entries) > 0 {
   318  		for _, msg := range m.Entries {
   319  			dAtA[i] = 0xa
   320  			i++
   321  			i = encodeVarintCachingIndexClient(dAtA, i, uint64(msg.Size()))
   322  			n, err := msg.MarshalTo(dAtA[i:])
   323  			if err != nil {
   324  				return 0, err
   325  			}
   326  			i += n
   327  		}
   328  	}
   329  	if len(m.Key) > 0 {
   330  		dAtA[i] = 0x12
   331  		i++
   332  		i = encodeVarintCachingIndexClient(dAtA, i, uint64(len(m.Key)))
   333  		i += copy(dAtA[i:], m.Key)
   334  	}
   335  	if m.Expiry != 0 {
   336  		dAtA[i] = 0x18
   337  		i++
   338  		i = encodeVarintCachingIndexClient(dAtA, i, uint64(m.Expiry))
   339  	}
   340  	if m.Cardinality != 0 {
   341  		dAtA[i] = 0x20
   342  		i++
   343  		i = encodeVarintCachingIndexClient(dAtA, i, uint64(m.Cardinality))
   344  	}
   345  	return i, nil
   346  }
   347  
   348  func encodeVarintCachingIndexClient(dAtA []byte, offset int, v uint64) int {
   349  	for v >= 1<<7 {
   350  		dAtA[offset] = uint8(v&0x7f | 0x80)
   351  		v >>= 7
   352  		offset++
   353  	}
   354  	dAtA[offset] = uint8(v)
   355  	return offset + 1
   356  }
   357  func (m *Entry) Size() (n int) {
   358  	if m == nil {
   359  		return 0
   360  	}
   361  	var l int
   362  	_ = l
   363  	l = m.Column.Size()
   364  	n += 1 + l + sovCachingIndexClient(uint64(l))
   365  	l = m.Value.Size()
   366  	n += 1 + l + sovCachingIndexClient(uint64(l))
   367  	return n
   368  }
   369  
   370  func (m *ReadBatch) Size() (n int) {
   371  	if m == nil {
   372  		return 0
   373  	}
   374  	var l int
   375  	_ = l
   376  	if len(m.Entries) > 0 {
   377  		for _, e := range m.Entries {
   378  			l = e.Size()
   379  			n += 1 + l + sovCachingIndexClient(uint64(l))
   380  		}
   381  	}
   382  	l = len(m.Key)
   383  	if l > 0 {
   384  		n += 1 + l + sovCachingIndexClient(uint64(l))
   385  	}
   386  	if m.Expiry != 0 {
   387  		n += 1 + sovCachingIndexClient(uint64(m.Expiry))
   388  	}
   389  	if m.Cardinality != 0 {
   390  		n += 1 + sovCachingIndexClient(uint64(m.Cardinality))
   391  	}
   392  	return n
   393  }
   394  
   395  func sovCachingIndexClient(x uint64) (n int) {
   396  	for {
   397  		n++
   398  		x >>= 7
   399  		if x == 0 {
   400  			break
   401  		}
   402  	}
   403  	return n
   404  }
   405  func sozCachingIndexClient(x uint64) (n int) {
   406  	return sovCachingIndexClient(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   407  }
   408  func (this *Entry) String() string {
   409  	if this == nil {
   410  		return "nil"
   411  	}
   412  	s := strings.Join([]string{`&Entry{`,
   413  		`Column:` + fmt.Sprintf("%v", this.Column) + `,`,
   414  		`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
   415  		`}`,
   416  	}, "")
   417  	return s
   418  }
   419  func (this *ReadBatch) String() string {
   420  	if this == nil {
   421  		return "nil"
   422  	}
   423  	s := strings.Join([]string{`&ReadBatch{`,
   424  		`Entries:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Entries), "Entry", "Entry", 1), `&`, ``, 1) + `,`,
   425  		`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
   426  		`Expiry:` + fmt.Sprintf("%v", this.Expiry) + `,`,
   427  		`Cardinality:` + fmt.Sprintf("%v", this.Cardinality) + `,`,
   428  		`}`,
   429  	}, "")
   430  	return s
   431  }
   432  func valueToStringCachingIndexClient(v interface{}) string {
   433  	rv := reflect.ValueOf(v)
   434  	if rv.IsNil() {
   435  		return "nil"
   436  	}
   437  	pv := reflect.Indirect(rv).Interface()
   438  	return fmt.Sprintf("*%v", pv)
   439  }
   440  func (m *Entry) Unmarshal(dAtA []byte) error {
   441  	l := len(dAtA)
   442  	iNdEx := 0
   443  	for iNdEx < l {
   444  		preIndex := iNdEx
   445  		var wire uint64
   446  		for shift := uint(0); ; shift += 7 {
   447  			if shift >= 64 {
   448  				return ErrIntOverflowCachingIndexClient
   449  			}
   450  			if iNdEx >= l {
   451  				return io.ErrUnexpectedEOF
   452  			}
   453  			b := dAtA[iNdEx]
   454  			iNdEx++
   455  			wire |= uint64(b&0x7F) << shift
   456  			if b < 0x80 {
   457  				break
   458  			}
   459  		}
   460  		fieldNum := int32(wire >> 3)
   461  		wireType := int(wire & 0x7)
   462  		if wireType == 4 {
   463  			return fmt.Errorf("proto: Entry: wiretype end group for non-group")
   464  		}
   465  		if fieldNum <= 0 {
   466  			return fmt.Errorf("proto: Entry: illegal tag %d (wire type %d)", fieldNum, wire)
   467  		}
   468  		switch fieldNum {
   469  		case 1:
   470  			if wireType != 2 {
   471  				return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType)
   472  			}
   473  			var byteLen int
   474  			for shift := uint(0); ; shift += 7 {
   475  				if shift >= 64 {
   476  					return ErrIntOverflowCachingIndexClient
   477  				}
   478  				if iNdEx >= l {
   479  					return io.ErrUnexpectedEOF
   480  				}
   481  				b := dAtA[iNdEx]
   482  				iNdEx++
   483  				byteLen |= int(b&0x7F) << shift
   484  				if b < 0x80 {
   485  					break
   486  				}
   487  			}
   488  			if byteLen < 0 {
   489  				return ErrInvalidLengthCachingIndexClient
   490  			}
   491  			postIndex := iNdEx + byteLen
   492  			if postIndex < 0 {
   493  				return ErrInvalidLengthCachingIndexClient
   494  			}
   495  			if postIndex > l {
   496  				return io.ErrUnexpectedEOF
   497  			}
   498  			if err := m.Column.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   499  				return err
   500  			}
   501  			iNdEx = postIndex
   502  		case 2:
   503  			if wireType != 2 {
   504  				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
   505  			}
   506  			var byteLen int
   507  			for shift := uint(0); ; shift += 7 {
   508  				if shift >= 64 {
   509  					return ErrIntOverflowCachingIndexClient
   510  				}
   511  				if iNdEx >= l {
   512  					return io.ErrUnexpectedEOF
   513  				}
   514  				b := dAtA[iNdEx]
   515  				iNdEx++
   516  				byteLen |= int(b&0x7F) << shift
   517  				if b < 0x80 {
   518  					break
   519  				}
   520  			}
   521  			if byteLen < 0 {
   522  				return ErrInvalidLengthCachingIndexClient
   523  			}
   524  			postIndex := iNdEx + byteLen
   525  			if postIndex < 0 {
   526  				return ErrInvalidLengthCachingIndexClient
   527  			}
   528  			if postIndex > l {
   529  				return io.ErrUnexpectedEOF
   530  			}
   531  			if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   532  				return err
   533  			}
   534  			iNdEx = postIndex
   535  		default:
   536  			iNdEx = preIndex
   537  			skippy, err := skipCachingIndexClient(dAtA[iNdEx:])
   538  			if err != nil {
   539  				return err
   540  			}
   541  			if skippy < 0 {
   542  				return ErrInvalidLengthCachingIndexClient
   543  			}
   544  			if (iNdEx + skippy) < 0 {
   545  				return ErrInvalidLengthCachingIndexClient
   546  			}
   547  			if (iNdEx + skippy) > l {
   548  				return io.ErrUnexpectedEOF
   549  			}
   550  			iNdEx += skippy
   551  		}
   552  	}
   553  
   554  	if iNdEx > l {
   555  		return io.ErrUnexpectedEOF
   556  	}
   557  	return nil
   558  }
   559  func (m *ReadBatch) Unmarshal(dAtA []byte) error {
   560  	l := len(dAtA)
   561  	iNdEx := 0
   562  	for iNdEx < l {
   563  		preIndex := iNdEx
   564  		var wire uint64
   565  		for shift := uint(0); ; shift += 7 {
   566  			if shift >= 64 {
   567  				return ErrIntOverflowCachingIndexClient
   568  			}
   569  			if iNdEx >= l {
   570  				return io.ErrUnexpectedEOF
   571  			}
   572  			b := dAtA[iNdEx]
   573  			iNdEx++
   574  			wire |= uint64(b&0x7F) << shift
   575  			if b < 0x80 {
   576  				break
   577  			}
   578  		}
   579  		fieldNum := int32(wire >> 3)
   580  		wireType := int(wire & 0x7)
   581  		if wireType == 4 {
   582  			return fmt.Errorf("proto: ReadBatch: wiretype end group for non-group")
   583  		}
   584  		if fieldNum <= 0 {
   585  			return fmt.Errorf("proto: ReadBatch: illegal tag %d (wire type %d)", fieldNum, wire)
   586  		}
   587  		switch fieldNum {
   588  		case 1:
   589  			if wireType != 2 {
   590  				return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType)
   591  			}
   592  			var msglen int
   593  			for shift := uint(0); ; shift += 7 {
   594  				if shift >= 64 {
   595  					return ErrIntOverflowCachingIndexClient
   596  				}
   597  				if iNdEx >= l {
   598  					return io.ErrUnexpectedEOF
   599  				}
   600  				b := dAtA[iNdEx]
   601  				iNdEx++
   602  				msglen |= int(b&0x7F) << shift
   603  				if b < 0x80 {
   604  					break
   605  				}
   606  			}
   607  			if msglen < 0 {
   608  				return ErrInvalidLengthCachingIndexClient
   609  			}
   610  			postIndex := iNdEx + msglen
   611  			if postIndex < 0 {
   612  				return ErrInvalidLengthCachingIndexClient
   613  			}
   614  			if postIndex > l {
   615  				return io.ErrUnexpectedEOF
   616  			}
   617  			m.Entries = append(m.Entries, Entry{})
   618  			if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   619  				return err
   620  			}
   621  			iNdEx = postIndex
   622  		case 2:
   623  			if wireType != 2 {
   624  				return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
   625  			}
   626  			var stringLen uint64
   627  			for shift := uint(0); ; shift += 7 {
   628  				if shift >= 64 {
   629  					return ErrIntOverflowCachingIndexClient
   630  				}
   631  				if iNdEx >= l {
   632  					return io.ErrUnexpectedEOF
   633  				}
   634  				b := dAtA[iNdEx]
   635  				iNdEx++
   636  				stringLen |= uint64(b&0x7F) << shift
   637  				if b < 0x80 {
   638  					break
   639  				}
   640  			}
   641  			intStringLen := int(stringLen)
   642  			if intStringLen < 0 {
   643  				return ErrInvalidLengthCachingIndexClient
   644  			}
   645  			postIndex := iNdEx + intStringLen
   646  			if postIndex < 0 {
   647  				return ErrInvalidLengthCachingIndexClient
   648  			}
   649  			if postIndex > l {
   650  				return io.ErrUnexpectedEOF
   651  			}
   652  			m.Key = string(dAtA[iNdEx:postIndex])
   653  			iNdEx = postIndex
   654  		case 3:
   655  			if wireType != 0 {
   656  				return fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType)
   657  			}
   658  			m.Expiry = 0
   659  			for shift := uint(0); ; shift += 7 {
   660  				if shift >= 64 {
   661  					return ErrIntOverflowCachingIndexClient
   662  				}
   663  				if iNdEx >= l {
   664  					return io.ErrUnexpectedEOF
   665  				}
   666  				b := dAtA[iNdEx]
   667  				iNdEx++
   668  				m.Expiry |= int64(b&0x7F) << shift
   669  				if b < 0x80 {
   670  					break
   671  				}
   672  			}
   673  		case 4:
   674  			if wireType != 0 {
   675  				return fmt.Errorf("proto: wrong wireType = %d for field Cardinality", wireType)
   676  			}
   677  			m.Cardinality = 0
   678  			for shift := uint(0); ; shift += 7 {
   679  				if shift >= 64 {
   680  					return ErrIntOverflowCachingIndexClient
   681  				}
   682  				if iNdEx >= l {
   683  					return io.ErrUnexpectedEOF
   684  				}
   685  				b := dAtA[iNdEx]
   686  				iNdEx++
   687  				m.Cardinality |= int32(b&0x7F) << shift
   688  				if b < 0x80 {
   689  					break
   690  				}
   691  			}
   692  		default:
   693  			iNdEx = preIndex
   694  			skippy, err := skipCachingIndexClient(dAtA[iNdEx:])
   695  			if err != nil {
   696  				return err
   697  			}
   698  			if skippy < 0 {
   699  				return ErrInvalidLengthCachingIndexClient
   700  			}
   701  			if (iNdEx + skippy) < 0 {
   702  				return ErrInvalidLengthCachingIndexClient
   703  			}
   704  			if (iNdEx + skippy) > l {
   705  				return io.ErrUnexpectedEOF
   706  			}
   707  			iNdEx += skippy
   708  		}
   709  	}
   710  
   711  	if iNdEx > l {
   712  		return io.ErrUnexpectedEOF
   713  	}
   714  	return nil
   715  }
   716  func skipCachingIndexClient(dAtA []byte) (n int, err error) {
   717  	l := len(dAtA)
   718  	iNdEx := 0
   719  	for iNdEx < l {
   720  		var wire uint64
   721  		for shift := uint(0); ; shift += 7 {
   722  			if shift >= 64 {
   723  				return 0, ErrIntOverflowCachingIndexClient
   724  			}
   725  			if iNdEx >= l {
   726  				return 0, io.ErrUnexpectedEOF
   727  			}
   728  			b := dAtA[iNdEx]
   729  			iNdEx++
   730  			wire |= (uint64(b) & 0x7F) << shift
   731  			if b < 0x80 {
   732  				break
   733  			}
   734  		}
   735  		wireType := int(wire & 0x7)
   736  		switch wireType {
   737  		case 0:
   738  			for shift := uint(0); ; shift += 7 {
   739  				if shift >= 64 {
   740  					return 0, ErrIntOverflowCachingIndexClient
   741  				}
   742  				if iNdEx >= l {
   743  					return 0, io.ErrUnexpectedEOF
   744  				}
   745  				iNdEx++
   746  				if dAtA[iNdEx-1] < 0x80 {
   747  					break
   748  				}
   749  			}
   750  			return iNdEx, nil
   751  		case 1:
   752  			iNdEx += 8
   753  			return iNdEx, nil
   754  		case 2:
   755  			var length int
   756  			for shift := uint(0); ; shift += 7 {
   757  				if shift >= 64 {
   758  					return 0, ErrIntOverflowCachingIndexClient
   759  				}
   760  				if iNdEx >= l {
   761  					return 0, io.ErrUnexpectedEOF
   762  				}
   763  				b := dAtA[iNdEx]
   764  				iNdEx++
   765  				length |= (int(b) & 0x7F) << shift
   766  				if b < 0x80 {
   767  					break
   768  				}
   769  			}
   770  			if length < 0 {
   771  				return 0, ErrInvalidLengthCachingIndexClient
   772  			}
   773  			iNdEx += length
   774  			if iNdEx < 0 {
   775  				return 0, ErrInvalidLengthCachingIndexClient
   776  			}
   777  			return iNdEx, nil
   778  		case 3:
   779  			for {
   780  				var innerWire uint64
   781  				var start int = iNdEx
   782  				for shift := uint(0); ; shift += 7 {
   783  					if shift >= 64 {
   784  						return 0, ErrIntOverflowCachingIndexClient
   785  					}
   786  					if iNdEx >= l {
   787  						return 0, io.ErrUnexpectedEOF
   788  					}
   789  					b := dAtA[iNdEx]
   790  					iNdEx++
   791  					innerWire |= (uint64(b) & 0x7F) << shift
   792  					if b < 0x80 {
   793  						break
   794  					}
   795  				}
   796  				innerWireType := int(innerWire & 0x7)
   797  				if innerWireType == 4 {
   798  					break
   799  				}
   800  				next, err := skipCachingIndexClient(dAtA[start:])
   801  				if err != nil {
   802  					return 0, err
   803  				}
   804  				iNdEx = start + next
   805  				if iNdEx < 0 {
   806  					return 0, ErrInvalidLengthCachingIndexClient
   807  				}
   808  			}
   809  			return iNdEx, nil
   810  		case 4:
   811  			return iNdEx, nil
   812  		case 5:
   813  			iNdEx += 4
   814  			return iNdEx, nil
   815  		default:
   816  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   817  		}
   818  	}
   819  	panic("unreachable")
   820  }
   821  
   822  var (
   823  	ErrInvalidLengthCachingIndexClient = fmt.Errorf("proto: negative length found during unmarshaling")
   824  	ErrIntOverflowCachingIndexClient   = fmt.Errorf("proto: integer overflow")
   825  )