mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
- Updated various dependencies in go.mod and go.sum files, including cloud.google.com/go/compute/metadata to v0.5.2, google.golang.org/grpc to v1.69.2, and google.golang.org/protobuf to v1.36.1. - Refactored gRPC service definitions to use the latest protoc-gen-go and protoc versions, ensuring compatibility with the latest gRPC-Go features. - Introduced a new logger utility in core/utils/logger.go to improve logging capabilities across the application. - Added a README.md for gRPC setup and compilation guidance, enhancing developer experience. - Improved the Python installation script to handle version listing more effectively and ensure user-specific environment setup.
64 lines
1.4 KiB
Protocol Buffer
64 lines
1.4 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_DEPS = 1;
|
|
UNINSTALL_DEPS = 2;
|
|
INSTALL_SETUP = 3;
|
|
UNINSTALL_SETUP = 4;
|
|
}
|
|
|
|
message DependencyServiceConnectResponse {
|
|
DependencyServiceCode code = 1;
|
|
string lang = 2;
|
|
string proxy = 3;
|
|
Dependency dependency = 4;
|
|
string version = 5;
|
|
}
|
|
|
|
message DependencyServiceSyncRequest {
|
|
string node_key = 1;
|
|
string lang = 2;
|
|
repeated Dependency dependencies = 3;
|
|
}
|
|
|
|
message DependencyServiceUpdateLogsRequest {
|
|
string target_id = 1;
|
|
repeated string logs = 2;
|
|
}
|
|
|
|
message DependencyDriver {
|
|
string name = 1;
|
|
string version = 2;
|
|
}
|
|
|
|
message DependencyServiceSyncConfigSetupRequest {
|
|
string node_key = 1;
|
|
string lang = 2;
|
|
string version = 3;
|
|
string status = 4;
|
|
string error = 5;
|
|
repeated DependencyDriver drivers = 6;
|
|
}
|
|
|
|
service DependencyService {
|
|
rpc Connect(DependencyServiceConnectRequest) returns (stream DependencyServiceConnectResponse){};
|
|
rpc Sync(DependencyServiceSyncRequest) returns (Response){};
|
|
rpc UpdateLogs(stream DependencyServiceUpdateLogsRequest) returns (Response){};
|
|
rpc SyncConfigSetup(DependencyServiceSyncConfigSetupRequest) returns (Response){};
|
|
}
|