feat(dcl): extend CreateConnectionCommand with backup config and failover retry count

Update CreateConnectionCommand to carry PrimaryConnectionDetails,
BackupConnectionDetails, and FailoverRetryCount. Update all callers:
DataConnectionManagerActor, DataConnectionActor, DeploymentManagerActor,
FlatteningService, and ConnectionConfig. The actor stores both configs
but continues using primary only — failover logic comes in Task 3.
This commit is contained in:
Joseph Doherty
2026-03-22 08:24:39 -04:00
parent 04af03980e
commit 46304678da
7 changed files with 42 additions and 10 deletions

View File

@@ -61,6 +61,9 @@ public class DataConnectionActor : UntypedActor, IWithStash, IWithTimers
private int _resolvedTags;
private readonly IDictionary<string, string> _connectionDetails;
private readonly IDictionary<string, string> _primaryConfig;
private readonly IDictionary<string, string>? _backupConfig;
private readonly int _failoverRetryCount;
/// <summary>
/// Captured Self reference for use from non-actor threads (event handlers, callbacks).
@@ -73,13 +76,18 @@ public class DataConnectionActor : UntypedActor, IWithStash, IWithTimers
IDataConnection adapter,
DataConnectionOptions options,
ISiteHealthCollector healthCollector,
IDictionary<string, string>? connectionDetails = null)
IDictionary<string, string>? primaryConfig = null,
IDictionary<string, string>? backupConfig = null,
int failoverRetryCount = 3)
{
_connectionName = connectionName;
_adapter = adapter;
_options = options;
_healthCollector = healthCollector;
_connectionDetails = connectionDetails ?? new Dictionary<string, string>();
_primaryConfig = primaryConfig ?? new Dictionary<string, string>();
_backupConfig = backupConfig;
_failoverRetryCount = failoverRetryCount;
_connectionDetails = _primaryConfig;
}
protected override void PreStart()