2using System.Collections.Concurrent;
3using System.Collections.Generic;
5using Microsoft.Extensions.Logging;
40 readonly ILogger<RemoteDeploymentManagerFactory>
logger;
60 ILogger<RemoteDeploymentManagerFactory>
logger)
66 this.logger =
logger ??
throw new ArgumentNullException(nameof(
logger));
74 ArgumentNullException.ThrowIfNull(metadata);
76 logger.LogTrace(
"Creating remote deployment manager for remote git provider {remoteGitProvider}...", remoteGitProvider);
77 return remoteGitProvider
switch
93 _ =>
throw new InvalidOperationException($
"Invalid RemoteGitProvider: {remoteGitProvider}!"),
100 ArgumentNullException.ThrowIfNull(compileJob);
105 if (compileJob.RepositoryOrigin ==
null)
110 compileJob.RepositoryOrigin));
118 ArgumentNullException.ThrowIfNull(compileJobIds);
120 foreach (var compileJobId
in compileJobIds)
IRemoteDeploymentManager for GitHub.com.
IRemoteDeploymentManager for GitLab.com.
No-op implementation of IRemoteDeploymentManager.
void ForgetLocalStateForCompileJobs(IEnumerable< long > compileJobIds)
Cause the IRemoteDeploymentManagerFactory to drop any local state is has for the given compileJobsIds...
RemoteDeploymentManagerFactory(IDatabaseContextFactory databaseContextFactory, IGitHubServiceFactory gitHubServiceFactory, IGitRemoteFeaturesFactory gitRemoteFeaturesFactory, ILoggerFactory loggerFactory, ILogger< RemoteDeploymentManagerFactory > logger)
Initializes a new instance of the RemoteDeploymentManagerFactory class.
readonly ILogger< RemoteDeploymentManagerFactory > logger
The IDatabaseContextFactory for the RemoteDeploymentManagerFactory.
readonly IGitRemoteFeaturesFactory gitRemoteFeaturesFactory
The IGitRemoteFeaturesFactory for the RemoteDeploymentManagerFactory.
readonly ConcurrentDictionary< long, Action< bool > > activationCallbacks
A map of Models.CompileJob EntityId.Ids to activation callback Action<T1>s.
readonly IGitHubServiceFactory gitHubServiceFactory
The IDatabaseContextFactory for the RemoteDeploymentManagerFactory.
readonly IDatabaseContextFactory databaseContextFactory
The IDatabaseContextFactory for the RemoteDeploymentManagerFactory.
IRemoteDeploymentManager CreateRemoteDeploymentManager(Api.Models.Instance metadata, Models.CompileJob compileJob)
Create a IRemoteDeploymentManager for a given compileJob .A new IRemoteDeploymentManager.
readonly ILoggerFactory loggerFactory
The IDatabaseContextFactory for the RemoteDeploymentManagerFactory.
IRemoteDeploymentManager CreateRemoteDeploymentManager(Api.Models.Instance metadata, RemoteGitProvider remoteGitProvider)
Creates a IRemoteDeploymentManager for a given remoteGitProvider .A new IRemoteDeploymentManager base...
Factory for creating IRemoteDeploymentManagers.
Creates and updates remote deployments.
Factory for creating IGitRemoteFeatures.
RemoteGitProvider ParseRemoteGitProviderFromOrigin(Uri origin)
Gets the RemoteGitProvider for a given origin .
Factory for scoping usage of IDatabaseContexts. Meant for use by Components.
Factory for IGitHubServices.
RemoteGitProvider
Indicates the remote git host.