src/Coast.Core/EventBus/EventLog/IEventLogRepository.cs

(完整代码) 1KB

namespace Coast.Core.EventBus.EventLog
{
    using System;
    using System.Collections.Generic;
    using System.Threading;
    using System.Threading.Tasks;

    public interface IEventLogRepository
    {
        Task<IEnumerable<EventLogEntry>> RetrieveEventLogsPendingToPublishAsync();

        Task<EventLogEntry> RetrieveEventLogsAsync(long eventId, CancellationToken cancellationToken = default);

        /// <summary>
        /// save the event.
        /// </summary>
        /// <param name="event">event.</param>
        /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
        Task SaveEventAsync(IntegrationEvent @event, CancellationToken cancellationToken = default);

        Task SaveEventAsync(IEnumerable<IntegrationEvent> @events, CancellationToken cancellationToken = default);

        Task MarkEventAsPublishedAsync(long eventId, CancellationToken cancellationToken = default);

        Task MarkEventAsInProgressAsync(long eventId, CancellationToken cancellationToken = default);

        Task MarkEventAsFailedAsync(long eventId, CancellationToken cancellationToken = default);
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。