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

@@ -1,11 +1,11 @@
// Go reference: jetstream_api.go — advisory event publication for stream/consumer lifecycle.
// Advisory subjects use the pattern $JS.EVENT.ADVISORY.{type}.{stream}[.{consumer}].
namespace NATS.Server.Tests.JetStream.Api;
using NATS.Server.Events;
using NATS.Server.JetStream.Api;
namespace NATS.Server.Tests.JetStream.Api;
public class AdvisoryEventTests
{
private static (AdvisoryPublisher Publisher, List<(string Subject, object Body)> Published) CreatePublisher()