Restructure solution into folders and fix persistence issues
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
37987a394a
commit
7c39cb5562
62 files changed
+219
-151
No files matched your search
@@ -0,0 +1,11 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Flypaper.Core.Models;
|
||||
|
||||
namespace Flypaper.Core.Abstractions;
|
||||
|
||||
public interface IConnectionGovernor
|
||||
{
|
||||
int ActiveConnections { get; }
|
||||
|
||||
bool TryAcquire(TrapSession session, [NotNullWhen(true)] out IDisposable? lease);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using Flypaper.Core.Models;
|
||||
|
||||
namespace Flypaper.Core.Abstractions;
|
||||
|
||||
public interface ITarpitStrategy
|
||||
{
|
||||
string Name { get; }
|
||||
|
||||
bool Supports(TrapProtocol protocol);
|
||||
|
||||
Task RunAsync(ITrapChannel channel, CancellationToken ct);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Flypaper.Core.Models;
|
||||
|
||||
namespace Flypaper.Core.Abstractions;
|
||||
|
||||
public interface ITrapChannel
|
||||
{
|
||||
TrapSession Session { get; }
|
||||
|
||||
ValueTask WriteAsync(ReadOnlyMemory<byte> data, CancellationToken ct);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using Flypaper.Core.Models;
|
||||
|
||||
namespace Flypaper.Core.Abstractions;
|
||||
|
||||
public interface ITrapEventSink
|
||||
{
|
||||
void Publish(TrapEvent trapEvent);
|
||||
}
|
||||
Reference in new issue
Block a user