From ba8940c3c47fa3d381061a57b09f3de30196486e Mon Sep 17 00:00:00 2001 From: soxx Date: Tue, 5 Mar 2024 20:43:49 +0100 Subject: [PATCH 1/2] feat: added Ping/Pong rpc --- plug.proto | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plug.proto b/plug.proto index 6e4b8d8..b89f136 100644 --- a/plug.proto +++ b/plug.proto @@ -6,6 +6,15 @@ service PlugConnector { rpc TaskStart(PlugTaskCreation) returns (PlugTaskStatus); rpc TaskStatus(PlugTask) returns (PlugTaskStatus); rpc TaskCancel(PlugTask) returns (PlugTaskStatus); + rpc Ping(PingRequest) returns (PongResponse); // Added Ping endpoint +} + +message PingRequest { + string message = 1; // Optional message field, can be removed if not needed +} + +message PongResponse { + string message = 1; // Optional message field, can be removed if not needed } message PlugTaskStatus { @@ -28,4 +37,4 @@ message PlugTaskCreation { string user_id = 1; string user_source_name = 2; bool deep_scrape = 3; -} \ No newline at end of file +} -- 2.45.2 From 762aae73096ab6f84d9e8cf34c770ad1faef18bf Mon Sep 17 00:00:00 2001 From: soxx Date: Tue, 5 Mar 2024 20:59:11 +0100 Subject: [PATCH 2/2] feat: added timestamp --- plug.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plug.proto b/plug.proto index b89f136..064e1f3 100644 --- a/plug.proto +++ b/plug.proto @@ -1,4 +1,5 @@ syntax = "proto3"; +import "google/protobuf/timestamp.proto"; option go_package = "git.dragse.it/anthrove/plug-[REPLACE_ME]/api/gRPC"; @@ -11,10 +12,12 @@ service PlugConnector { message PingRequest { 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 { -- 2.45.2