Restructure solution layout by module
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using StellaOps.Concelier.Core.Jobs;
|
||||
|
||||
namespace StellaOps.Concelier.Connector.CertFr;
|
||||
|
||||
internal static class CertFrJobKinds
|
||||
{
|
||||
public const string Fetch = "source:cert-fr:fetch";
|
||||
public const string Parse = "source:cert-fr:parse";
|
||||
public const string Map = "source:cert-fr:map";
|
||||
}
|
||||
|
||||
internal sealed class CertFrFetchJob : IJob
|
||||
{
|
||||
private readonly CertFrConnector _connector;
|
||||
|
||||
public CertFrFetchJob(CertFrConnector connector)
|
||||
=> _connector = connector ?? throw new ArgumentNullException(nameof(connector));
|
||||
|
||||
public Task ExecuteAsync(JobExecutionContext context, CancellationToken cancellationToken)
|
||||
=> _connector.FetchAsync(context.Services, cancellationToken);
|
||||
}
|
||||
|
||||
internal sealed class CertFrParseJob : IJob
|
||||
{
|
||||
private readonly CertFrConnector _connector;
|
||||
|
||||
public CertFrParseJob(CertFrConnector connector)
|
||||
=> _connector = connector ?? throw new ArgumentNullException(nameof(connector));
|
||||
|
||||
public Task ExecuteAsync(JobExecutionContext context, CancellationToken cancellationToken)
|
||||
=> _connector.ParseAsync(context.Services, cancellationToken);
|
||||
}
|
||||
|
||||
internal sealed class CertFrMapJob : IJob
|
||||
{
|
||||
private readonly CertFrConnector _connector;
|
||||
|
||||
public CertFrMapJob(CertFrConnector connector)
|
||||
=> _connector = connector ?? throw new ArgumentNullException(nameof(connector));
|
||||
|
||||
public Task ExecuteAsync(JobExecutionContext context, CancellationToken cancellationToken)
|
||||
=> _connector.MapAsync(context.Services, cancellationToken);
|
||||
}
|
||||
Reference in New Issue
Block a user