From 4b34cf0b32fc04d66b38c25062ae91102d32daa8 Mon Sep 17 00:00:00 2001 From: David Janowski Date: Tue, 20 Feb 2024 09:47:52 +0100 Subject: [PATCH] inital commit --- plug.proto | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 plug.proto diff --git a/plug.proto b/plug.proto new file mode 100644 index 0000000..b55e5e7 --- /dev/null +++ b/plug.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +option go_package = "git.dragse.it/anthrove/orchestrator/pkg/api/gRPC"; + +service PlugConnector { + rpc TaskStart(PlugTaskCreation) returns (PlugTaskStatus); + rpc TaskStatus(PlugTask) returns (PlugTaskStatus); + rpc TaskCancel(PlugTask) returns (PlugTaskStatus); +} + +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; +} \ No newline at end of file