52 lines
2.1 KiB
C#
52 lines
2.1 KiB
C#
using System.Threading;
|
|
using Svrnty.CQRS.Events.Abstractions.Configuration;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Svrnty.CQRS.Events.Abstractions.Streaming;
|
|
|
|
/// <summary>
|
|
/// Provides effective stream configuration by merging stream-specific and global settings.
|
|
/// </summary>
|
|
public interface IStreamConfigurationProvider
|
|
{
|
|
/// <summary>
|
|
/// Gets the effective configuration for a stream (stream-specific merged with global defaults).
|
|
/// </summary>
|
|
/// <param name="streamName">The name of the stream.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
/// <returns>The effective stream configuration.</returns>
|
|
Task<StreamConfiguration> GetEffectiveConfigurationAsync(
|
|
string streamName,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Gets the retention policy for a stream.
|
|
/// </summary>
|
|
/// <param name="streamName">The name of the stream.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
/// <returns>The retention configuration if configured; otherwise null.</returns>
|
|
Task<RetentionConfiguration?> GetRetentionConfigurationAsync(
|
|
string streamName,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Gets the DLQ configuration for a stream.
|
|
/// </summary>
|
|
/// <param name="streamName">The name of the stream.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
/// <returns>The DLQ configuration if configured; otherwise null.</returns>
|
|
Task<DeadLetterQueueConfiguration?> GetDeadLetterQueueConfigurationAsync(
|
|
string streamName,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Gets the lifecycle configuration for a stream.
|
|
/// </summary>
|
|
/// <param name="streamName">The name of the stream.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
/// <returns>The lifecycle configuration if configured; otherwise null.</returns>
|
|
Task<LifecycleConfiguration?> GetLifecycleConfigurationAsync(
|
|
string streamName,
|
|
CancellationToken cancellationToken = default);
|
|
}
|