feat: added Ping/Pong rpc #2
14
plug.proto
14
plug.proto
@ -1,4 +1,5 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
|
||||||
option go_package = "git.dragse.it/anthrove/plug-[REPLACE_ME]/api/gRPC";
|
option go_package = "git.dragse.it/anthrove/plug-[REPLACE_ME]/api/gRPC";
|
||||||
|
|
||||||
@ -6,6 +7,17 @@ service PlugConnector {
|
|||||||
rpc TaskStart(PlugTaskCreation) returns (PlugTaskStatus);
|
rpc TaskStart(PlugTaskCreation) returns (PlugTaskStatus);
|
||||||
rpc TaskStatus(PlugTask) returns (PlugTaskStatus);
|
rpc TaskStatus(PlugTask) returns (PlugTaskStatus);
|
||||||
rpc TaskCancel(PlugTask) returns (PlugTaskStatus);
|
rpc TaskCancel(PlugTask) returns (PlugTaskStatus);
|
||||||
|
rpc Ping(PingRequest) returns (PongResponse); // Added Ping endpoint
|
||||||
|
}
|
||||||
|
|
||||||
|
message PingRequest {
|
||||||
fenpaws marked this conversation as resolved
|
|||||||
|
string message = 1; // Optional message field, can be removed if not needed
|
||||||
|
google.protobuf.Timestamp timestamp = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PongResponse {
|
||||||
|
string message = 1; // Optional message field, can be removed if not needed
|
||||||
|
google.protobuf.Timestamp timestamp = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message PlugTaskStatus {
|
message PlugTaskStatus {
|
||||||
@ -28,4 +40,4 @@ message PlugTaskCreation {
|
|||||||
string user_id = 1;
|
string user_id = 1;
|
||||||
string user_source_name = 2;
|
string user_source_name = 2;
|
||||||
bool deep_scrape = 3;
|
bool deep_scrape = 3;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user
When you really want to implement a real ping pong please send also time entries so you can check how long it takes to receive the message