using System.Threading;
using Svrnty.CQRS.Events.Abstractions.EventStore;
using System.Threading.Tasks;
namespace Svrnty.CQRS.Events.Abstractions.Notifications;
///
/// Service for notifying active subscribers about new events in real-time.
/// Implementations handle the transport layer (gRPC, SignalR, etc.).
///
public interface IEventNotifier
{
///
/// Notify all active subscribers about a new event.
/// This is called after an event is stored to push it to connected clients.
///
/// The event that was emitted.
/// The sequence number assigned to this event.
/// Cancellation token.
Task NotifyAsync(ICorrelatedEvent @event, long sequence, CancellationToken cancellationToken = default);
}