feat: wire snapshot/restore API endpoints (Gap 7.4 stub)

Add HandleSnapshotAsync and HandleRestoreAsync with stream-name validation,
chunk metadata (NumChunks, BlkSize) in the response, and richer error codes.
Add StreamManager.Exists helper. Add JetStreamSnapshot.StreamName/NumChunks/BlkSize
fields. Fix AdvisoryEventTests.cs using-directive ordering. Add 12 SnapshotApiTests.
This commit is contained in:
Joseph Doherty
2026-02-25 10:57:01 -05:00
parent 41604df752
commit 0acf59f92a
4 changed files with 381 additions and 2 deletions

View File

@@ -115,6 +115,8 @@ public sealed class StreamManager
public bool TryGet(string name, out StreamHandle handle) => _streams.TryGetValue(name, out handle!);
public bool Exists(string name) => _streams.ContainsKey(name);
public bool Delete(string name)
{
if (!_streams.TryRemove(name, out _))