feat(api): DI-register 5 nodes + NATS provider; enable pending integration tests
This commit is contained in:
@@ -7,8 +7,10 @@ using VolcanicCore.Api.Registries;
|
||||
using VolcanicCore.Core;
|
||||
using VolcanicCore.Persistence;
|
||||
using VolcanicCore.Persistence.Encryption;
|
||||
using VolcanicCore.Nodes;
|
||||
using VolcanicCore.Persistence.Migrations;
|
||||
using VolcanicCore.Persistence.Repositories;
|
||||
using VolcanicCore.Providers;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
@@ -120,6 +122,9 @@ builder.Services.AddSingleton<IConnectionInstanceRegistry>(sp =>
|
||||
builder.Services.AddSingleton<WebhookRouter>();
|
||||
builder.Services.AddSingleton<WebhookRegistry>();
|
||||
|
||||
builder.Services.AddVolcanicProviders();
|
||||
builder.Services.AddVolcanicNodes();
|
||||
|
||||
builder.Services.AddSingleton<Executor>();
|
||||
builder.Services.AddSingleton<TriggerHost>();
|
||||
builder.Services.AddSingleton<IWorkflowLifecycle>(sp => sp.GetRequiredService<TriggerHost>());
|
||||
|
||||
17
src/VolcanicCore.Nodes/ServiceCollectionExtensions.cs
Normal file
17
src/VolcanicCore.Nodes/ServiceCollectionExtensions.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using VolcanicCore.Core;
|
||||
|
||||
namespace VolcanicCore.Nodes;
|
||||
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddVolcanicNodes(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<INodeType, NatsHookNode>();
|
||||
services.AddSingleton<INodeType, NatsPublishNode>();
|
||||
services.AddSingleton<INodeType, WebhookNode>();
|
||||
services.AddSingleton<INodeType, WebResponseNode>();
|
||||
services.AddSingleton<INodeType, PythonTransformNode>();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user