using ZB.MOM.WW.ScadaBridge.Commons.Messages.Artifacts; using ZB.MOM.WW.ScadaBridge.StoreAndForward; namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Messages; // Outbound messages — sent by local DeploymentManagerActor/S&F service // to the local SiteReplicationActor for forwarding to the peer node. /// Outbound: tell the peer to fetch+apply a deployed instance config by id (notify-and-fetch; no inline config). public record ReplicateConfigDeploy( string InstanceName, string DeploymentId, string RevisionHash, bool IsEnabled, string CentralFetchBaseUrl, string FetchToken); /// Outbound: replicate removal of a deployed instance config to the peer node. public record ReplicateConfigRemove(string InstanceName); /// Outbound: replicate an instance enabled/disabled flag change to the peer node. public record ReplicateConfigSetEnabled(string InstanceName, bool IsEnabled); /// Outbound: replicate a system-wide artifact deployment (shared scripts, external systems, etc.) to the peer node. public record ReplicateArtifacts(DeployArtifactsCommand Command); /// Outbound: replicate a store-and-forward buffer mutation (enqueue/dequeue/park/etc.) to the peer node. public record ReplicateStoreAndForward(ReplicationOperation Operation); // Inbound messages — received from the peer's SiteReplicationActor // and applied to local SQLite storage. /// Inbound: peer-replicated config deploy — the standby fetches the config by id and writes it (guarded). public record ApplyConfigDeploy( string InstanceName, string DeploymentId, string RevisionHash, bool IsEnabled, string CentralFetchBaseUrl, string FetchToken); /// Inbound: apply peer-replicated removal of a deployed instance config to local SQLite. public record ApplyConfigRemove(string InstanceName); /// Inbound: apply a peer-replicated instance enabled/disabled flag change to local SQLite. public record ApplyConfigSetEnabled(string InstanceName, bool IsEnabled); /// Inbound: apply a peer-replicated system-wide artifact deployment to local SQLite. public record ApplyArtifacts(DeployArtifactsCommand Command); /// Inbound: apply a peer-replicated store-and-forward buffer mutation to the local buffer. public record ApplyStoreAndForward(ReplicationOperation Operation);