diff --git a/internal/flow.proto b/internal/flow.proto index 5d306c8..e5e0118 100644 --- a/internal/flow.proto +++ b/internal/flow.proto @@ -5,12 +5,11 @@ option ruby_package = "Tucana::Internal"; package internal; import "node.proto"; -import "flow_type.proto"; +import "flow_definition.proto"; message Flow { - int64 flow_id = 1; Node starting_node = 2; - FlowType type = 3; + FlowDefinition definition = 3; } enum FlowCommandType { @@ -18,15 +17,14 @@ enum FlowCommandType { DELETE = 1; } -//Sagittarius sends flow to be updated -message FlowRequest { - Flow updated_flow = 1; - FlowCommandType type = 2; +//Aquila sends a request to initialise stream to Sagittarius +message FlowLogonRequest { } -//Aquila response with success or failure +//Sagittarius sends flow to be updated message FlowResponse { - bool success = 1; + Flow updated_flow = 1; + FlowCommandType type = 2; } //All ids of flows that Aquila holds @@ -42,10 +40,7 @@ message FlowGetResponse { repeated int64 deleted_flow_ids = 2; } -service FlowAquilaService { - rpc Update (stream FlowRequest) returns (stream FlowResponse) {} -} - -service FlowSagittariusService { +service FlowService { rpc Get (FlowGetRequest) returns (FlowGetResponse) {} + rpc Update (FlowLogonRequest) returns (stream FlowResponse) {} } \ No newline at end of file diff --git a/internal/flow_definition.proto b/internal/flow_definition.proto index 8f2f9fb..a1af7fe 100644 --- a/internal/flow_definition.proto +++ b/internal/flow_definition.proto @@ -5,5 +5,4 @@ option ruby_package = "Tucana::Internal"; package internal; message FlowDefinition { - int32 id = 1; } \ No newline at end of file diff --git a/internal/flow_type.proto b/internal/flow_type.proto deleted file mode 100644 index e9a4642..0000000 --- a/internal/flow_type.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; - -option ruby_package = "Tucana::Internal"; - -package internal; - -import "flow_definition.proto"; - -message FlowType { - int32 id = 1; - string name = 2; - FlowDefinition flow_definition = 3; -} \ No newline at end of file diff --git a/internal/function_definition.proto b/internal/function_definition.proto deleted file mode 100644 index bf61447..0000000 --- a/internal/function_definition.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; - -option ruby_package = "Tucana::Internal"; - -import "definitions.proto"; -import "runtime_function_definition.proto"; - -package internal; - -message FunctionDefinition { - int32 id = 1; - RuntimeFunctionDefinition runtime_function_definition = 2; - shared.DataType return_type = 3; -} \ No newline at end of file diff --git a/internal/node.proto b/internal/node.proto index 37ae5a3..d51f46b 100644 --- a/internal/node.proto +++ b/internal/node.proto @@ -4,19 +4,17 @@ option ruby_package = "Tucana::Internal"; package internal; -import "function_definition.proto"; -import "parameter_definition.proto"; +import "runtime_function_definition.proto"; +import "runtime_parameter_definition.proto"; message Node { - int64 node_id = 1; - FunctionDefinition function_definition = 2; - optional Node next_node = 3; + RuntimeFunctionDefinition definition = 1; + optional Node next_node = 2; + repeated Parameter parameters = 3; } message Parameter { - int64 id = 1; - Node parent = 2; - ParameterDefinition parameter_definition = 3; - string name = 4; - optional Node sub_node = 5; + RuntimeParameterDefinition definition = 1; + optional string value = 2; + optional Node sub_node = 3; } \ No newline at end of file diff --git a/internal/parameter_definition.proto b/internal/parameter_definition.proto deleted file mode 100644 index 1da3abb..0000000 --- a/internal/parameter_definition.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -import "function_definition.proto"; - -option ruby_package = "Tucana::Internal"; - -package internal; - -import "definitions.proto"; - -message ParameterDefinition { - int32 id = 1; - FunctionDefinition function_definition = 2; - shared.DataType type = 3; - string name = 4; -} \ No newline at end of file diff --git a/internal/rule.proto b/internal/rule.proto deleted file mode 100644 index d7305d0..0000000 --- a/internal/rule.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; - -option ruby_package = "Tucana::Internal"; - -package internal; - -enum RuleType { - REGEX = 0; - NUMBER_RANGE = 1; - ITEM_OF_COLLECTION = 2; -} - -message Rule { - RuleType type = 1; - string config = 2; -} \ No newline at end of file diff --git a/internal/runtime_function_definition.proto b/internal/runtime_function_definition.proto index 7fe851d..148070e 100644 --- a/internal/runtime_function_definition.proto +++ b/internal/runtime_function_definition.proto @@ -2,11 +2,8 @@ syntax = "proto3"; option ruby_package = "Tucana::Internal"; -import "definitions.proto"; - package internal; message RuntimeFunctionDefinition { - int32 id = 1; - shared.DataType return_type = 2; + string id = 1; } \ No newline at end of file diff --git a/internal/variable.proto b/internal/runtime_parameter_definition.proto similarity index 72% rename from internal/variable.proto rename to internal/runtime_parameter_definition.proto index e2867f0..aad221d 100644 --- a/internal/variable.proto +++ b/internal/runtime_parameter_definition.proto @@ -4,7 +4,6 @@ option ruby_package = "Tucana::Internal"; package internal; -message Variable { +message RuntimeParameterDefinition { string name = 1; - string type = 2; } \ No newline at end of file