cubefs/proto/distributed_cache.pb.go
baihailong 97612b6b20 feat(flashnode): enable statistic slot hit rate.#1000037792
Signed-off-by: baihailong <baihailong@oppo.com>
2025-08-08 14:52:02 +08:00

1442 lines
35 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: distributed_cache.proto
package proto
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/golang/protobuf/proto"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type DataSource struct {
FileOffset uint64 `protobuf:"varint,1,opt,name=FileOffset,proto3" json:"FileOffset,omitempty"`
PartitionID uint64 `protobuf:"varint,2,opt,name=PartitionID,proto3" json:"PartitionID,omitempty"`
ExtentID uint64 `protobuf:"varint,3,opt,name=ExtentID,proto3" json:"ExtentID,omitempty"`
ExtentOffset uint64 `protobuf:"varint,4,opt,name=ExtentOffset,proto3" json:"ExtentOffset,omitempty"`
Size_ uint64 `protobuf:"varint,5,opt,name=Size,proto3" json:"Size,omitempty"`
Hosts []string `protobuf:"bytes,6,rep,name=Hosts,proto3" json:"Hosts,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DataSource) Reset() { *m = DataSource{} }
func (*DataSource) ProtoMessage() {}
func (*DataSource) Descriptor() ([]byte, []int) {
return fileDescriptor_9a29821e5022ef34, []int{0}
}
func (m *DataSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *DataSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_DataSource.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *DataSource) XXX_Merge(src proto.Message) {
xxx_messageInfo_DataSource.Merge(m, src)
}
func (m *DataSource) XXX_Size() int {
return m.Size()
}
func (m *DataSource) XXX_DiscardUnknown() {
xxx_messageInfo_DataSource.DiscardUnknown(m)
}
var xxx_messageInfo_DataSource proto.InternalMessageInfo
func (m *DataSource) GetFileOffset() uint64 {
if m != nil {
return m.FileOffset
}
return 0
}
func (m *DataSource) GetPartitionID() uint64 {
if m != nil {
return m.PartitionID
}
return 0
}
func (m *DataSource) GetExtentID() uint64 {
if m != nil {
return m.ExtentID
}
return 0
}
func (m *DataSource) GetExtentOffset() uint64 {
if m != nil {
return m.ExtentOffset
}
return 0
}
func (m *DataSource) GetSize_() uint64 {
if m != nil {
return m.Size_
}
return 0
}
func (m *DataSource) GetHosts() []string {
if m != nil {
return m.Hosts
}
return nil
}
type CacheRequest struct {
Volume string `protobuf:"bytes,1,opt,name=Volume,proto3" json:"Volume,omitempty"`
Inode uint64 `protobuf:"varint,2,opt,name=Inode,proto3" json:"Inode,omitempty"`
FixedFileOffset uint64 `protobuf:"varint,3,opt,name=FixedFileOffset,proto3" json:"FixedFileOffset,omitempty"`
Version uint32 `protobuf:"varint,4,opt,name=Version,proto3" json:"Version,omitempty"`
Sources []*DataSource `protobuf:"bytes,5,rep,name=Sources,proto3" json:"Sources,omitempty"`
TTL int64 `protobuf:"varint,6,opt,name=TTL,proto3" json:"TTL,omitempty"`
Slot uint64 `protobuf:"varint,7,opt,name=Slot,proto3" json:"Slot,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CacheRequest) Reset() { *m = CacheRequest{} }
func (*CacheRequest) ProtoMessage() {}
func (*CacheRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9a29821e5022ef34, []int{1}
}
func (m *CacheRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *CacheRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_CacheRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *CacheRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CacheRequest.Merge(m, src)
}
func (m *CacheRequest) XXX_Size() int {
return m.Size()
}
func (m *CacheRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CacheRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CacheRequest proto.InternalMessageInfo
func (m *CacheRequest) GetVolume() string {
if m != nil {
return m.Volume
}
return ""
}
func (m *CacheRequest) GetInode() uint64 {
if m != nil {
return m.Inode
}
return 0
}
func (m *CacheRequest) GetFixedFileOffset() uint64 {
if m != nil {
return m.FixedFileOffset
}
return 0
}
func (m *CacheRequest) GetVersion() uint32 {
if m != nil {
return m.Version
}
return 0
}
func (m *CacheRequest) GetSources() []*DataSource {
if m != nil {
return m.Sources
}
return nil
}
func (m *CacheRequest) GetTTL() int64 {
if m != nil {
return m.TTL
}
return 0
}
func (m *CacheRequest) GetSlot() uint64 {
if m != nil {
return m.Slot
}
return 0
}
type CacheReadRequest struct {
CacheRequest *CacheRequest `protobuf:"bytes,1,opt,name=CacheRequest,proto3" json:"CacheRequest,omitempty"`
Offset uint64 `protobuf:"varint,2,opt,name=Offset,proto3" json:"Offset,omitempty"`
Size_ uint64 `protobuf:"varint,3,opt,name=Size,proto3" json:"Size,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CacheReadRequest) Reset() { *m = CacheReadRequest{} }
func (*CacheReadRequest) ProtoMessage() {}
func (*CacheReadRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9a29821e5022ef34, []int{2}
}
func (m *CacheReadRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *CacheReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_CacheReadRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *CacheReadRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CacheReadRequest.Merge(m, src)
}
func (m *CacheReadRequest) XXX_Size() int {
return m.Size()
}
func (m *CacheReadRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CacheReadRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CacheReadRequest proto.InternalMessageInfo
func (m *CacheReadRequest) GetCacheRequest() *CacheRequest {
if m != nil {
return m.CacheRequest
}
return nil
}
func (m *CacheReadRequest) GetOffset() uint64 {
if m != nil {
return m.Offset
}
return 0
}
func (m *CacheReadRequest) GetSize_() uint64 {
if m != nil {
return m.Size_
}
return 0
}
type CachePrepareRequest struct {
CacheRequest *CacheRequest `protobuf:"bytes,1,opt,name=CacheRequest,proto3" json:"CacheRequest,omitempty"`
FlashNodes []string `protobuf:"bytes,2,rep,name=FlashNodes,proto3" json:"FlashNodes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CachePrepareRequest) Reset() { *m = CachePrepareRequest{} }
func (*CachePrepareRequest) ProtoMessage() {}
func (*CachePrepareRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9a29821e5022ef34, []int{3}
}
func (m *CachePrepareRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *CachePrepareRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_CachePrepareRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *CachePrepareRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CachePrepareRequest.Merge(m, src)
}
func (m *CachePrepareRequest) XXX_Size() int {
return m.Size()
}
func (m *CachePrepareRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CachePrepareRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CachePrepareRequest proto.InternalMessageInfo
func (m *CachePrepareRequest) GetCacheRequest() *CacheRequest {
if m != nil {
return m.CacheRequest
}
return nil
}
func (m *CachePrepareRequest) GetFlashNodes() []string {
if m != nil {
return m.FlashNodes
}
return nil
}
func init() {
proto.RegisterType((*DataSource)(nil), "proto.DataSource")
proto.RegisterType((*CacheRequest)(nil), "proto.CacheRequest")
proto.RegisterType((*CacheReadRequest)(nil), "proto.CacheReadRequest")
proto.RegisterType((*CachePrepareRequest)(nil), "proto.CachePrepareRequest")
}
func init() { proto.RegisterFile("distributed_cache.proto", fileDescriptor_9a29821e5022ef34) }
var fileDescriptor_9a29821e5022ef34 = []byte{
// 421 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0x4d, 0x6f, 0xd3, 0x40,
0x10, 0xed, 0xd6, 0xb1, 0x43, 0x27, 0x45, 0x84, 0x2d, 0x82, 0x55, 0x0f, 0xc6, 0xca, 0xc9, 0x12,
0x22, 0x95, 0xca, 0x01, 0x89, 0x23, 0x84, 0x8a, 0x48, 0x08, 0xaa, 0x6d, 0xd5, 0x2b, 0xf2, 0xc7,
0x24, 0x59, 0xc9, 0xf5, 0x16, 0xef, 0x5a, 0xaa, 0x90, 0xf8, 0x1f, 0x3d, 0xf2, 0x4b, 0x38, 0x73,
0xe4, 0xca, 0x0d, 0x85, 0x3f, 0x82, 0x3c, 0xbb, 0xa1, 0x6e, 0x39, 0xf6, 0xe4, 0x79, 0x6f, 0xc6,
0x33, 0xef, 0x3d, 0x1b, 0x9e, 0x94, 0xca, 0xd8, 0x46, 0xe5, 0xad, 0xc5, 0xf2, 0x53, 0x91, 0x15,
0x2b, 0x9c, 0x5e, 0x34, 0xda, 0x6a, 0x1e, 0xd2, 0x63, 0xff, 0xf9, 0x52, 0xd9, 0x55, 0x9b, 0x4f,
0x0b, 0x7d, 0x7e, 0xb0, 0xd4, 0x4b, 0x7d, 0x40, 0x74, 0xde, 0x2e, 0x08, 0x11, 0xa0, 0xca, 0xbd,
0x35, 0xf9, 0xce, 0x00, 0x66, 0x99, 0xcd, 0x4e, 0x74, 0xdb, 0x14, 0xc8, 0x63, 0x80, 0x23, 0x55,
0xe1, 0xc7, 0xc5, 0xc2, 0xa0, 0x15, 0x2c, 0x61, 0xe9, 0x40, 0xf6, 0x18, 0x9e, 0xc0, 0xe8, 0x38,
0x6b, 0xac, 0xb2, 0x4a, 0xd7, 0xf3, 0x99, 0xd8, 0xa6, 0x81, 0x3e, 0xc5, 0xf7, 0xe1, 0xde, 0xdb,
0x4b, 0x8b, 0xb5, 0x9d, 0xcf, 0x44, 0x40, 0xed, 0x7f, 0x98, 0x4f, 0x60, 0xd7, 0xd5, 0x7e, 0xff,
0x80, 0xfa, 0x37, 0x38, 0xce, 0x61, 0x70, 0xa2, 0xbe, 0xa0, 0x08, 0xa9, 0x47, 0x35, 0x7f, 0x04,
0xe1, 0x3b, 0x6d, 0xac, 0x11, 0x51, 0x12, 0xa4, 0x3b, 0xd2, 0x81, 0x57, 0x83, 0xab, 0x6f, 0x4f,
0xb7, 0x26, 0xbf, 0x18, 0xec, 0xbe, 0xe9, 0x62, 0x90, 0xf8, 0xb9, 0x45, 0x63, 0xf9, 0x63, 0x88,
0xce, 0x74, 0xd5, 0x9e, 0x23, 0xc9, 0xdf, 0x91, 0x1e, 0x75, 0x4b, 0xe6, 0xb5, 0x2e, 0xd1, 0x8b,
0x76, 0x80, 0xa7, 0xf0, 0xe0, 0x48, 0x5d, 0x62, 0xd9, 0x73, 0xed, 0x54, 0xdf, 0xa6, 0xb9, 0x80,
0xe1, 0x19, 0x36, 0x46, 0xe9, 0x9a, 0x74, 0xdf, 0x97, 0x1b, 0xc8, 0x9f, 0xc1, 0xd0, 0xc5, 0x67,
0x44, 0x98, 0x04, 0xe9, 0xe8, 0xf0, 0xa1, 0x0b, 0x77, 0x7a, 0x1d, 0xac, 0xdc, 0x4c, 0xf0, 0x31,
0x04, 0xa7, 0xa7, 0xef, 0x45, 0x94, 0xb0, 0x34, 0x90, 0x5d, 0x49, 0x8e, 0x2b, 0x6d, 0xc5, 0xd0,
0x3b, 0xae, 0xb4, 0xf5, 0xde, 0xbe, 0xc2, 0xd8, 0x5b, 0xcb, 0xca, 0x8d, 0xbd, 0x97, 0x37, 0xed,
0x92, 0xc9, 0xd1, 0xe1, 0x9e, 0xbf, 0xd8, 0x6f, 0xc9, 0xff, 0x72, 0xf1, 0x06, 0x5d, 0x00, 0xd1,
0xad, 0xc0, 0x83, 0xeb, 0xc0, 0xfd, 0x79, 0x0b, 0x7b, 0xb4, 0xe1, 0xb8, 0xc1, 0x8b, 0xac, 0xc1,
0x3b, 0x2b, 0xe8, 0x7e, 0xae, 0x2a, 0x33, 0xab, 0x0f, 0xba, 0x44, 0x23, 0xb6, 0xe9, 0x5b, 0xf6,
0x18, 0x77, 0xf5, 0xf5, 0xf8, 0xc7, 0x3a, 0x66, 0x3f, 0xd7, 0x31, 0xfb, 0xbd, 0x8e, 0xd9, 0xd5,
0x9f, 0x78, 0x2b, 0x8f, 0x68, 0xf3, 0x8b, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf3, 0x2e, 0xf9,
0xd8, 0xfb, 0x02, 0x00, 0x00,
}
func (m *DataSource) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *DataSource) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *DataSource) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Hosts) > 0 {
for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Hosts[iNdEx])
copy(dAtA[i:], m.Hosts[iNdEx])
i = encodeVarintDistributedCache(dAtA, i, uint64(len(m.Hosts[iNdEx])))
i--
dAtA[i] = 0x32
}
}
if m.Size_ != 0 {
i = encodeVarintDistributedCache(dAtA, i, uint64(m.Size_))
i--
dAtA[i] = 0x28
}
if m.ExtentOffset != 0 {
i = encodeVarintDistributedCache(dAtA, i, uint64(m.ExtentOffset))
i--
dAtA[i] = 0x20
}
if m.ExtentID != 0 {
i = encodeVarintDistributedCache(dAtA, i, uint64(m.ExtentID))
i--
dAtA[i] = 0x18
}
if m.PartitionID != 0 {
i = encodeVarintDistributedCache(dAtA, i, uint64(m.PartitionID))
i--
dAtA[i] = 0x10
}
if m.FileOffset != 0 {
i = encodeVarintDistributedCache(dAtA, i, uint64(m.FileOffset))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *CacheRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *CacheRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *CacheRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Slot != 0 {
i = encodeVarintDistributedCache(dAtA, i, uint64(m.Slot))
i--
dAtA[i] = 0x38
}
if m.TTL != 0 {
i = encodeVarintDistributedCache(dAtA, i, uint64(m.TTL))
i--
dAtA[i] = 0x30
}
if len(m.Sources) > 0 {
for iNdEx := len(m.Sources) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Sources[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintDistributedCache(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x2a
}
}
if m.Version != 0 {
i = encodeVarintDistributedCache(dAtA, i, uint64(m.Version))
i--
dAtA[i] = 0x20
}
if m.FixedFileOffset != 0 {
i = encodeVarintDistributedCache(dAtA, i, uint64(m.FixedFileOffset))
i--
dAtA[i] = 0x18
}
if m.Inode != 0 {
i = encodeVarintDistributedCache(dAtA, i, uint64(m.Inode))
i--
dAtA[i] = 0x10
}
if len(m.Volume) > 0 {
i -= len(m.Volume)
copy(dAtA[i:], m.Volume)
i = encodeVarintDistributedCache(dAtA, i, uint64(len(m.Volume)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *CacheReadRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *CacheReadRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *CacheReadRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Size_ != 0 {
i = encodeVarintDistributedCache(dAtA, i, uint64(m.Size_))
i--
dAtA[i] = 0x18
}
if m.Offset != 0 {
i = encodeVarintDistributedCache(dAtA, i, uint64(m.Offset))
i--
dAtA[i] = 0x10
}
if m.CacheRequest != nil {
{
size, err := m.CacheRequest.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintDistributedCache(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *CachePrepareRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *CachePrepareRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *CachePrepareRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.FlashNodes) > 0 {
for iNdEx := len(m.FlashNodes) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.FlashNodes[iNdEx])
copy(dAtA[i:], m.FlashNodes[iNdEx])
i = encodeVarintDistributedCache(dAtA, i, uint64(len(m.FlashNodes[iNdEx])))
i--
dAtA[i] = 0x12
}
}
if m.CacheRequest != nil {
{
size, err := m.CacheRequest.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintDistributedCache(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintDistributedCache(dAtA []byte, offset int, v uint64) int {
offset -= sovDistributedCache(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *DataSource) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.FileOffset != 0 {
n += 1 + sovDistributedCache(uint64(m.FileOffset))
}
if m.PartitionID != 0 {
n += 1 + sovDistributedCache(uint64(m.PartitionID))
}
if m.ExtentID != 0 {
n += 1 + sovDistributedCache(uint64(m.ExtentID))
}
if m.ExtentOffset != 0 {
n += 1 + sovDistributedCache(uint64(m.ExtentOffset))
}
if m.Size_ != 0 {
n += 1 + sovDistributedCache(uint64(m.Size_))
}
if len(m.Hosts) > 0 {
for _, s := range m.Hosts {
l = len(s)
n += 1 + l + sovDistributedCache(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *CacheRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Volume)
if l > 0 {
n += 1 + l + sovDistributedCache(uint64(l))
}
if m.Inode != 0 {
n += 1 + sovDistributedCache(uint64(m.Inode))
}
if m.FixedFileOffset != 0 {
n += 1 + sovDistributedCache(uint64(m.FixedFileOffset))
}
if m.Version != 0 {
n += 1 + sovDistributedCache(uint64(m.Version))
}
if len(m.Sources) > 0 {
for _, e := range m.Sources {
l = e.Size()
n += 1 + l + sovDistributedCache(uint64(l))
}
}
if m.TTL != 0 {
n += 1 + sovDistributedCache(uint64(m.TTL))
}
if m.Slot != 0 {
n += 1 + sovDistributedCache(uint64(m.Slot))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *CacheReadRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.CacheRequest != nil {
l = m.CacheRequest.Size()
n += 1 + l + sovDistributedCache(uint64(l))
}
if m.Offset != 0 {
n += 1 + sovDistributedCache(uint64(m.Offset))
}
if m.Size_ != 0 {
n += 1 + sovDistributedCache(uint64(m.Size_))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *CachePrepareRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.CacheRequest != nil {
l = m.CacheRequest.Size()
n += 1 + l + sovDistributedCache(uint64(l))
}
if len(m.FlashNodes) > 0 {
for _, s := range m.FlashNodes {
l = len(s)
n += 1 + l + sovDistributedCache(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovDistributedCache(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozDistributedCache(x uint64) (n int) {
return sovDistributedCache(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *DataSource) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: DataSource: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DataSource: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field FileOffset", wireType)
}
m.FileOffset = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.FileOffset |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field PartitionID", wireType)
}
m.PartitionID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.PartitionID |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ExtentID", wireType)
}
m.ExtentID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ExtentID |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ExtentOffset", wireType)
}
m.ExtentOffset = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ExtentOffset |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
}
m.Size_ = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Size_ |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthDistributedCache
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthDistributedCache
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipDistributedCache(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthDistributedCache
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *CacheRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: CacheRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CacheRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthDistributedCache
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthDistributedCache
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Volume = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Inode", wireType)
}
m.Inode = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Inode |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field FixedFileOffset", wireType)
}
m.FixedFileOffset = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.FixedFileOffset |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
}
m.Version = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Version |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Sources", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthDistributedCache
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthDistributedCache
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Sources = append(m.Sources, &DataSource{})
if err := m.Sources[len(m.Sources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType)
}
m.TTL = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.TTL |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType)
}
m.Slot = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Slot |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipDistributedCache(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthDistributedCache
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *CacheReadRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: CacheReadRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CacheReadRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CacheRequest", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthDistributedCache
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthDistributedCache
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.CacheRequest == nil {
m.CacheRequest = &CacheRequest{}
}
if err := m.CacheRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
}
m.Offset = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Offset |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
}
m.Size_ = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Size_ |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipDistributedCache(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthDistributedCache
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *CachePrepareRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: CachePrepareRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CachePrepareRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CacheRequest", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthDistributedCache
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthDistributedCache
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.CacheRequest == nil {
m.CacheRequest = &CacheRequest{}
}
if err := m.CacheRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field FlashNodes", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthDistributedCache
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthDistributedCache
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.FlashNodes = append(m.FlashNodes, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipDistributedCache(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthDistributedCache
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipDistributedCache(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowDistributedCache
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthDistributedCache
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupDistributedCache
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthDistributedCache
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthDistributedCache = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowDistributedCache = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupDistributedCache = fmt.Errorf("proto: unexpected end of group")
)