feat: complete remaining jetstream parity implementation plan

This commit is contained in:
Joseph Doherty
2026-02-23 10:16:16 -05:00
parent c7bbf45c8f
commit f46b331921
59 changed files with 1734 additions and 54 deletions

View File

@@ -24,6 +24,8 @@ public sealed class JszHandler
Storage = 0,
Streams = _server.JetStreamStreams,
Consumers = _server.JetStreamConsumers,
ApiTotal = (ulong)Math.Max(Interlocked.Read(ref _server.Stats.JetStreamApiTotal), 0),
ApiErrors = (ulong)Math.Max(Interlocked.Read(ref _server.Stats.JetStreamApiErrors), 0),
Config = new JetStreamConfig
{
MaxMemory = _options.JetStream?.MaxMemoryStore ?? 0,
@@ -57,6 +59,12 @@ public sealed class JszResponse
[JsonPropertyName("consumers")]
public int Consumers { get; set; }
[JsonPropertyName("api_total")]
public ulong ApiTotal { get; set; }
[JsonPropertyName("api_errors")]
public ulong ApiErrors { get; set; }
[JsonPropertyName("config")]
public JetStreamConfig Config { get; set; } = new();
}

View File

@@ -136,6 +136,11 @@ public sealed class VarzHandler : IDisposable
HaAssets = _server.JetStreamStreams,
Streams = _server.JetStreamStreams,
Consumers = _server.JetStreamConsumers,
Api = new JetStreamApiStats
{
Total = (ulong)Math.Max(Interlocked.Read(ref stats.JetStreamApiTotal), 0),
Errors = (ulong)Math.Max(Interlocked.Read(ref stats.JetStreamApiErrors), 0),
},
},
},
};