github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/pkg/storage/stores/series/index/caching_index_client.pb.go (about)

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