b659978764
- WP-1-3: Central/site failover + dual-node recovery tests (17 tests) - WP-4: Performance testing framework for target scale (7 tests) - WP-5: Security hardening (LDAPS, JWT key length, no secrets in logs) (11 tests) - WP-6: Script sandboxing adversarial tests (28 tests, all forbidden APIs) - WP-7: Recovery drill test scaffolds (5 tests) - WP-8: Observability validation (structured logs, correlation IDs, metrics) (6 tests) - WP-9: Message contract compatibility (forward/backward compat) (18 tests) - WP-10: Deployment packaging (installation guide, production checklist, topology) - WP-11: Operational runbooks (failover, troubleshooting, maintenance) 92 new tests, all passing. Zero warnings.
28 lines
998 B
C#
28 lines
998 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using ScadaLink.Commons.Interfaces.Services;
|
|
|
|
namespace ScadaLink.NotificationService;
|
|
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
public static IServiceCollection AddNotificationService(this IServiceCollection services)
|
|
{
|
|
services.AddOptions<NotificationOptions>()
|
|
.BindConfiguration("ScadaLink:Notification");
|
|
|
|
services.AddHttpClient();
|
|
services.AddSingleton<OAuth2TokenService>();
|
|
services.AddSingleton<Func<ISmtpClientWrapper>>(_ => () => new MailKitSmtpClientWrapper());
|
|
services.AddSingleton<NotificationDeliveryService>();
|
|
services.AddSingleton<INotificationDeliveryService>(sp => sp.GetRequiredService<NotificationDeliveryService>());
|
|
|
|
return services;
|
|
}
|
|
|
|
public static IServiceCollection AddNotificationServiceActors(this IServiceCollection services)
|
|
{
|
|
// Actor registration happens in AkkaHostedService.
|
|
return services;
|
|
}
|
|
}
|