diff --git a/dotnet/src/ZB.MOM.NatsNet.Server/Monitor/MonitorTypes.cs b/dotnet/src/ZB.MOM.NatsNet.Server/Monitor/MonitorTypes.cs index 9c86828..f64d9f5 100644 --- a/dotnet/src/ZB.MOM.NatsNet.Server/Monitor/MonitorTypes.cs +++ b/dotnet/src/ZB.MOM.NatsNet.Server/Monitor/MonitorTypes.cs @@ -607,105 +607,8 @@ public sealed class Subsz } // ============================================================================ -// Gatewayz — gateway monitoring types -// Mirrors Go types in server/monitor.go. -// ============================================================================ - -/// Options for the /gatewayz endpoint. Mirrors Go GatewayzOptions. -public sealed class GatewayzOptions -{ - [JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - [JsonPropertyName("accounts")] - public bool Accounts { get; set; } - - [JsonPropertyName("account_name")] - public string AccountName { get; set; } = string.Empty; - - [JsonPropertyName("subscriptions")] - public bool AccountSubscriptions { get; set; } - - [JsonPropertyName("subscriptions_detail")] - public bool AccountSubscriptionsDetail { get; set; } -} - -/// Top-level response for /gatewayz. Mirrors Go Gatewayz. -public sealed class Gatewayz -{ - [JsonPropertyName("server_id")] - public string Id { get; set; } = string.Empty; - - [JsonPropertyName("now")] - public DateTime Now { get; set; } - - [JsonPropertyName("name")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public string? Name { get; set; } - - [JsonPropertyName("host")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public string? Host { get; set; } - - [JsonPropertyName("port")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] - public int Port { get; set; } - - [JsonPropertyName("outbound_gateways")] - public Dictionary OutboundGateways { get; set; } = []; - - [JsonPropertyName("inbound_gateways")] - public Dictionary> InboundGateways { get; set; } = []; -} - -/// Remote gateway entry. Mirrors Go RemoteGatewayz. -public sealed class RemoteGatewayz -{ - [JsonPropertyName("configured")] - public bool IsConfigured { get; set; } - - [JsonPropertyName("connection")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public ConnInfo? Connection { get; set; } - - [JsonPropertyName("accounts")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public List? Accounts { get; set; } -} - -/// Per-account interest mode for gateway. Mirrors Go AccountGatewayz. -public sealed class AccountGatewayz -{ - [JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - [JsonPropertyName("interest_mode")] - public string InterestMode { get; set; } = string.Empty; - - [JsonPropertyName("no_interest_count")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] - public int NoInterestCount { get; set; } - - [JsonPropertyName("interest_only_threshold")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] - public int InterestOnlyThreshold { get; set; } - - [JsonPropertyName("num_subs")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] - public int TotalSubscriptions { get; set; } - - [JsonPropertyName("num_queue_subs")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] - public int NumQueueSubscriptions { get; set; } - - [JsonPropertyName("subscriptions_list")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public List? Subs { get; set; } - - [JsonPropertyName("subscriptions_list_detail")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public List? SubsDetail { get; set; } -} +// Gatewayz types (GatewayzOptions, Gatewayz, RemoteGatewayz, AccountGatewayz) +// are defined in MonitorHelpers.cs to avoid duplication. // ============================================================================ // Leafz — leaf-node monitoring types diff --git a/reports/current.md b/reports/current.md index 7b333be..efd581b 100644 --- a/reports/current.md +++ b/reports/current.md @@ -1,6 +1,6 @@ # NATS .NET Porting Status Report -Generated: 2026-03-01 12:56:43 UTC +Generated: 2026-03-01 14:18:03 UTC ## Modules (12 total)