This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
grpc-proto/plug.proto

44 lines
1010 B
Protocol Buffer
Raw Normal View History

2024-02-20 08:47:52 +00:00
syntax = "proto3";
2024-03-05 19:59:11 +00:00
import "google/protobuf/timestamp.proto";
2024-02-20 08:47:52 +00:00
2024-02-20 08:51:06 +00:00
option go_package = "git.dragse.it/anthrove/plug-[REPLACE_ME]/api/gRPC";
2024-02-20 08:47:52 +00:00
service PlugConnector {
rpc TaskStart(PlugTaskCreation) returns (PlugTaskStatus);
rpc TaskStatus(PlugTask) returns (PlugTaskStatus);
rpc TaskCancel(PlugTask) returns (PlugTaskStatus);
2024-03-05 19:43:49 +00:00
rpc Ping(PingRequest) returns (PongResponse); // Added Ping endpoint
}
message PingRequest {
string message = 1; // Optional message field, can be removed if not needed
2024-03-05 19:59:11 +00:00
google.protobuf.Timestamp timestamp = 2;
2024-03-05 19:43:49 +00:00
}
message PongResponse {
string message = 1; // Optional message field, can be removed if not needed
2024-03-05 19:59:11 +00:00
google.protobuf.Timestamp timestamp = 2;
2024-02-20 08:47:52 +00:00
}
message PlugTaskStatus {
string task_id = 1;
PlugTaskState task_state = 2;
}
enum PlugTaskState {
UNKNOWN = 0;
STARTED = 1;
RUNNING = 2;
STOPPED = 3;
}
message PlugTask {
string task_id = 1;
}
message PlugTaskCreation {
string user_id = 1;
string user_source_name = 2;
bool deep_scrape = 3;
2024-03-05 19:43:49 +00:00
}