From ecc91d874789e39e7ca27d26a334117f65afd82c Mon Sep 17 00:00:00 2001 From: Kevin Biju Date: Wed, 3 Jan 2024 22:05:56 +0530 Subject: [PATCH] laying groundwork for dynamic updates via protos --- protos/flow.proto | 13 +++++++++++++ protos/route.proto | 9 ++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/protos/flow.proto b/protos/flow.proto index 2a8f08b6b9..f2f94fe463 100644 --- a/protos/flow.proto +++ b/protos/flow.proto @@ -419,3 +419,16 @@ enum FlowStatus { // neither button should be enabled STATUS_TERMINATED = 7; } + +message CDCFlowStateUpdate { +} + +message QRepFlowStateUpdate { +} + +message FlowStateUpdate { + oneof update { + CDCFlowStateUpdate cdc_flow_state_update = 1; + QRepFlowStateUpdate qrep_flow_state_update = 2; + } +} diff --git a/protos/route.proto b/protos/route.proto index 126c97c154..6598769824 100644 --- a/protos/route.proto +++ b/protos/route.proto @@ -182,18 +182,13 @@ message MirrorStatusResponse { peerdb_flow.FlowStatus current_flow_state = 5; } -// in the future, consider moving DropFlow to this and reduce route surface -enum FlowState { - STATE_UNKNOWN = 0; - STATE_RUNNING = 1; - STATE_PAUSED = 2; -} - message FlowStateChangeRequest { string flow_job_name = 1; peerdb_flow.FlowStatus requested_flow_state = 2; peerdb_peers.Peer source_peer = 3; peerdb_peers.Peer destination_peer = 4; + // only can be sent in certain situations + peerdb_flow.FlowStateUpdate flow_state_update = 5; } message FlowStateChangeResponse {