feat: add stubs and guards for Start() parity
- Add CheckAuthForWarnings() no-op stub (NatsServer.Auth.cs) - Add StartDelayedApiResponder() no-op stub (NatsServer.JetStreamCore.cs) - Guard StartMqtt() to warn instead of throwing NotImplementedException
This commit is contained in:
@@ -133,8 +133,10 @@ internal static class MqttServerExtensions
|
|||||||
/// Start listening for MQTT client connections.
|
/// Start listening for MQTT client connections.
|
||||||
/// Mirrors Go <c>(*Server).startMQTT()</c>.
|
/// Mirrors Go <c>(*Server).startMQTT()</c>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void StartMqtt(this NatsServer server) =>
|
public static void StartMqtt(this NatsServer server)
|
||||||
throw new NotImplementedException("TODO: session 22");
|
{
|
||||||
|
server.Warnf("MQTT listener not yet implemented; skipping MQTT startup");
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Configure MQTT authentication overrides from the MQTT options block.
|
/// Configure MQTT authentication overrides from the MQTT options block.
|
||||||
|
|||||||
@@ -362,4 +362,22 @@ public sealed partial class NatsServer
|
|||||||
/// Wraps the synchronous <see cref="Shutdown"/> method.
|
/// Wraps the synchronous <see cref="Shutdown"/> method.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal Task ShutdownAsync() => Task.Run(Shutdown);
|
internal Task ShutdownAsync() => Task.Run(Shutdown);
|
||||||
|
|
||||||
|
// =========================================================================
|
||||||
|
// CheckAuthForWarnings (feature 3049 — Start parity)
|
||||||
|
// =========================================================================
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Checks for insecure auth configurations and logs warnings.
|
||||||
|
/// Mirrors Go <c>Server.checkAuthforWarnings()</c> in server/server.go.
|
||||||
|
/// Stub — full implementation deferred.
|
||||||
|
/// </summary>
|
||||||
|
internal void CheckAuthForWarnings()
|
||||||
|
{
|
||||||
|
// No-op stub. Go logs warnings about:
|
||||||
|
// - Password auth without TLS
|
||||||
|
// - Token auth without TLS
|
||||||
|
// - NKey auth without TLS
|
||||||
|
// These are informational warnings only.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -571,4 +571,23 @@ public sealed partial class NatsServer
|
|||||||
_jetStream == null ? null : new JetStreamEngine(_jetStream);
|
_jetStream == null ? null : new JetStreamEngine(_jetStream);
|
||||||
|
|
||||||
internal JetStream? GetJetStreamState() => _jetStream;
|
internal JetStream? GetJetStreamState() => _jetStream;
|
||||||
|
|
||||||
|
// =========================================================================
|
||||||
|
// Delayed API responder (feature 3049 — Start parity)
|
||||||
|
// =========================================================================
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Starts the delayed JetStream API response handler goroutine.
|
||||||
|
/// Started regardless of JetStream being enabled (can be enabled via config reload).
|
||||||
|
/// Mirrors Go <c>Server.delayedAPIResponder()</c> in server/jetstream_api.go.
|
||||||
|
/// Stub — full implementation deferred.
|
||||||
|
/// </summary>
|
||||||
|
internal void StartDelayedApiResponder()
|
||||||
|
{
|
||||||
|
StartGoRoutine(() =>
|
||||||
|
{
|
||||||
|
// No-op: exits when quit is signaled.
|
||||||
|
_quitCts.Token.WaitHandle.WaitOne();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# NATS .NET Porting Status Report
|
# NATS .NET Porting Status Report
|
||||||
|
|
||||||
Generated: 2026-03-01 19:52:36 UTC
|
Generated: 2026-03-01 20:01:24 UTC
|
||||||
|
|
||||||
## Modules (12 total)
|
## Modules (12 total)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user