mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
with: #1000326585
Signed-off-by: clinx <chenlin1@oppo.com>
(cherry picked from commit e2b5003956)
94 lines
2.1 KiB
Protocol Buffer
94 lines
2.1 KiB
Protocol Buffer
// protoc --proto_path=./vendor/:./proto/ --gofast_out=./proto/ distributed_cache.proto
|
|
syntax = "proto3";
|
|
package proto;
|
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
|
|
message DataSource {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
uint64 FileOffset = 1;
|
|
uint64 PartitionID = 2;
|
|
uint64 ExtentID = 3;
|
|
uint64 ExtentOffset = 4;
|
|
uint64 Size = 5;
|
|
repeated string Hosts = 6;
|
|
}
|
|
|
|
message CacheRequest {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
string Volume = 1;
|
|
uint64 Inode = 2;
|
|
uint64 FixedFileOffset = 3;
|
|
uint32 Version = 4;
|
|
repeated DataSource Sources = 5;
|
|
int64 TTL = 6;
|
|
uint64 Slot = 7;
|
|
}
|
|
|
|
message CacheReadRequest {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
CacheRequest CacheRequest = 1;
|
|
uint64 Offset = 2;
|
|
uint64 Size = 3;
|
|
}
|
|
|
|
message CachePrepareRequest {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
CacheRequest CacheRequest = 1;
|
|
repeated string FlashNodes = 2;
|
|
}
|
|
|
|
message PutBlockHead {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
string UniKey = 1;
|
|
int64 BlockLen = 2;
|
|
uint64 TTL = 3;
|
|
}
|
|
message CacheReadRequestBase {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
string Key = 1;
|
|
int64 TTL = 2;
|
|
uint64 Slot = 3;
|
|
uint64 Offset = 4;
|
|
uint64 Size = 5;
|
|
uint64 Deadline = 6;
|
|
}
|
|
|
|
message BatchReadItem {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
string Key = 1;
|
|
uint64 Offset = 2;
|
|
uint64 Size = 3;
|
|
uint64 Slot = 4;
|
|
uint64 ReqId = 5;
|
|
string Tid = 6;
|
|
}
|
|
|
|
message BatchReadReq {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
uint64 Deadline = 1;
|
|
repeated BatchReadItem Items = 2;
|
|
}
|
|
|
|
message ReadResult {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
bytes Data = 1;
|
|
uint32 ResultCode = 2;
|
|
uint32 CRC = 3;
|
|
uint64 ReqId = 4;
|
|
}
|
|
|
|
message BatchReadResp {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
repeated ReadResult Results = 1;
|
|
} |