feat: add resilient reconnect and catch-up replay

This commit is contained in:
Joseph Doherty
2026-03-17 11:04:19 -04:00
parent c278f98496
commit 2f04ec9d1d
29 changed files with 3746 additions and 95 deletions

View File

@@ -0,0 +1,28 @@
namespace SuiteLink.Client;
public sealed record class SuiteLinkRuntimeOptions
{
public SuiteLinkRuntimeOptions(
SuiteLinkRetryPolicy retryPolicy,
SuiteLinkCatchUpPolicy catchUpPolicy,
TimeSpan catchUpTimeout)
{
ArgumentNullException.ThrowIfNull(retryPolicy);
if (catchUpTimeout <= TimeSpan.Zero)
{
throw new ArgumentOutOfRangeException(nameof(catchUpTimeout), catchUpTimeout, "Catch-up timeout must be positive.");
}
RetryPolicy = retryPolicy;
CatchUpPolicy = catchUpPolicy;
CatchUpTimeout = catchUpTimeout;
}
public SuiteLinkRetryPolicy RetryPolicy { get; init; }
public SuiteLinkCatchUpPolicy CatchUpPolicy { get; init; }
public TimeSpan CatchUpTimeout { get; init; }
public static SuiteLinkRuntimeOptions Default { get; } =
new(SuiteLinkRetryPolicy.Default, SuiteLinkCatchUpPolicy.None, TimeSpan.FromSeconds(2));
}