github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/proto/resources.proto (about) 1 syntax = "proto3"; 2 3 package enginepb; 4 5 import "engine/proto/projects.proto"; 6 7 option go_package = "github.com/pingcap/tiflow/engine/enginepb"; 8 9 service ResourceManager { 10 rpc CreateResource(CreateResourceRequest) returns (CreateResourceResponse){} 11 rpc QueryResource(QueryResourceRequest) returns (QueryResourceResponse){} 12 13 // RemoveResource only cleans up the metadata of the resource. 14 // The invoker should handle the actual resource cleaning up on its own. 15 rpc RemoveResource(RemoveResourceRequest) returns (RemoveResourceResponse){} 16 } 17 18 message CreateResourceRequest { 19 ProjectInfo project_info = 1; 20 string resource_id = 2; 21 string creator_executor = 3; 22 string job_id = 4; 23 string creator_worker_id = 5; 24 } 25 26 message CreateResourceResponse {} 27 28 message ResourceKey { 29 string job_id = 1; 30 string resource_id = 2; 31 } 32 33 message QueryResourceRequest { 34 ResourceKey resource_key = 1; 35 } 36 37 message QueryResourceResponse { 38 string creator_executor = 1; 39 string job_id = 2; 40 string creator_worker_id = 3; 41 } 42 43 message RemoveResourceRequest { 44 ResourceKey resource_key = 1; 45 } 46 47 message RemoveResourceResponse {}