-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathIJobEventPublisher.cs
21 lines (19 loc) · 1.1 KB
/
IJobEventPublisher.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;
using System.Threading;
using System.Threading.Tasks;
using Jobba.Core.Events;
namespace Jobba.Core.Interfaces;
/// <summary>
/// Encapsulates logic for publishing job events.
/// </summary>
public interface IJobEventPublisher
{
Task PublishJobCancellationRequestAsync(CancelJobEvent cancelJobEvent, CancellationToken cancellationToken);
Task PublishJobCancelledEventAsync(JobCancelledEvent jobCancelledEvent, CancellationToken cancellationToken);
Task PublishJobCompletedEventAsync(JobCompletedEvent jobCompletedEvent, CancellationToken cancellationToken);
Task PublishJobFaultedEventAsync(JobFaultedEvent jobFaultedEvent, CancellationToken cancellationToken);
Task PublishJobProgressEventAsync(JobProgressEvent jobProgressEvent, CancellationToken cancellationToken);
Task PublishWatchJobEventAsync(JobWatchEvent jobWatchEvent, TimeSpan delay, CancellationToken cancellationToken);
Task PublishJobStartedEvent(JobStartedEvent jobStartedEvent, CancellationToken cancellationToken);
Task PublishJobRestartEvent(JobRestartEvent jobRestartEvent, CancellationToken cancellationToken);
}