Files
crawlab/grpc/proto/services/dependency_service.proto
2024-12-15 23:09:10 +08:00

55 lines
1.2 KiB
Protocol Buffer

syntax = "proto3";
import "entity/response.proto";
package grpc;
option go_package = ".;grpc";
message Dependency {
string name = 1;
string version = 2;
}
message DependencyServiceConnectRequest {
string node_key = 1;
}
enum DependencyServiceCode {
SYNC = 0;
INSTALL = 1;
UNINSTALL = 2;
SETUP = 3;
}
message DependencyServiceConnectResponse {
DependencyServiceCode code = 1;
string lang = 2;
string proxy = 3;
Dependency dependency = 4;
}
message DependencyServiceSyncRequest {
string node_key = 1;
string lang = 2;
repeated Dependency dependencies = 3;
}
message DependencyServiceUpdateLogsRequest {
string target_id = 1;
repeated string logs = 2;
}
message DependencyServiceSyncConfigSetupRequest {
string node_key = 1;
string lang = 2;
string status = 3;
string error = 4;
}
service DependencyService {
rpc Connect(DependencyServiceConnectRequest) returns (stream DependencyServiceConnectResponse){};
rpc Sync(DependencyServiceSyncRequest) returns (Response){};
rpc UpdateLogs(stream DependencyServiceUpdateLogsRequest) returns (Response){};
rpc SyncConfigSetup(DependencyServiceSyncConfigSetupRequest) returns (Response){};
}