Method FindConfigurationFailuresAsync
- Namespace
- MailFathom.Infrastructure.Persistence.Connections
- Assembly
- MailFathom.Infrastructure.dll
FindConfigurationFailuresAsync(PostgresConnectionSettings, CancellationToken)
Finds everything that stops a reloaded candidate from being adopted.
Task<IReadOnlyList<DatabaseConnectionConfigurationFailure>> FindConfigurationFailuresAsync(PostgresConnectionSettings candidate, CancellationToken cancellationToken)
Parameters
candidatePostgresConnectionSettingsThe connection settings a reloaded configuration would publish.
cancellationTokenCancellationTokenCancels the resolution the check performs.
Returns
- Task<IReadOnlyList<DatabaseConnectionConfigurationFailure>>
One failure per problem, empty when the candidate can be adopted.
Remarks
Reports nothing before host startup has composed the connection, because startup composition validates the first settings itself and fails the host when they are unusable.
Exceptions
- ArgumentNullException
Thrown when
candidateis null.