Add Flypaper solution skeleton with HTTP tarpit, SQLite event log and tests

This commit is contained in:
Tom committed 2026-11-14 13:15:57 +01:00
1 parent 20314268c6
commit f9161f48e7
55 files changed
+1331

No files matched your search

@@ -0,0 +1,17 @@
using Flypaper.Core;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
namespace Flypaper.Storage;
public static class FlypaperStorageExtensions
{
public static IServiceCollection AddFlypaperStorage(this IServiceCollection services, string connectionString)
{
services.AddDbContextFactory<FlypaperDbContext>(options => options.UseSqlite(connectionString));
services.AddSingleton<ChannelTrapEventSink>();
services.AddSingleton<ITrapEventSink>(sp => sp.GetRequiredService<ChannelTrapEventSink>());
services.AddHostedService<TrapEventWriter>();
return services;
}
}