github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/proto/datarw.proto (about) 1 syntax = "proto3"; 2 3 package enginepb; 4 5 option go_package = "github.com/pingcap/tiflow/engine/enginepb"; 6 7 service DataRWService { 8 rpc ReadLines(ReadLinesRequest ) returns (stream ReadLinesResponse) {} 9 rpc WriteLines(stream WriteLinesRequest) returns (WriteLinesResponse) {} 10 rpc GenerateData(GenerateDataRequest) returns (GenerateDataResponse); 11 rpc ListFiles (ListFilesReq ) returns (ListFilesResponse); 12 rpc IsReady (IsReadyRequest) returns (IsReadyResponse); 13 rpc CheckDir (CheckDirRequest) returns (CheckDirResponse); 14 } 15 16 message GenerateDataRequest { 17 int32 file_num = 1; 18 int32 record_num = 2; 19 } 20 21 message GenerateDataResponse { 22 string err_msg = 1; 23 } 24 25 message CheckDirRequest { 26 string dir = 1; 27 } 28 29 message CheckDirResponse { 30 string err_msg = 1; 31 int32 err_file_idx = 2; 32 } 33 34 message IsReadyRequest { 35 } 36 37 message IsReadyResponse { 38 bool ready = 1; 39 } 40 41 message ListFilesReq { 42 } 43 44 message ListFilesResponse{ 45 int32 fileNum =1; 46 } 47 48 message ReadLinesRequest { 49 int32 fileIdx = 1; 50 bytes lineNo = 2; 51 } 52 53 message ReadLinesResponse { 54 bytes key = 1 ; 55 bytes val = 2 ; 56 bool isEof = 3; 57 string errMsg = 4; 58 } 59 60 message WriteLinesRequest { 61 string dir = 1; 62 int32 file_idx = 2; 63 bytes key = 3; 64 bytes value = 4; 65 } 66 67 message WriteLinesResponse { 68 string err_msg = 1; 69 } 70 71 72 73 74 75