fix: remove duplicate gateway types from MonitorTypes.cs
GatewayzOptions, Gatewayz, RemoteGatewayz, AccountGatewayz were defined in both MonitorHelpers.cs (batch 42) and MonitorTypes.cs (batch 46). Removed duplicates from MonitorTypes.cs, keeping the versions in MonitorHelpers.cs.
This commit is contained in:
@@ -607,105 +607,8 @@ public sealed class Subsz
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Gatewayz — gateway monitoring types
|
// Gatewayz types (GatewayzOptions, Gatewayz, RemoteGatewayz, AccountGatewayz)
|
||||||
// Mirrors Go types in server/monitor.go.
|
// are defined in MonitorHelpers.cs to avoid duplication.
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
/// <summary>Options for the <c>/gatewayz</c> endpoint. Mirrors Go <c>GatewayzOptions</c>.</summary>
|
|
||||||
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; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>Top-level response for <c>/gatewayz</c>. Mirrors Go <c>Gatewayz</c>.</summary>
|
|
||||||
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<string, RemoteGatewayz> OutboundGateways { get; set; } = [];
|
|
||||||
|
|
||||||
[JsonPropertyName("inbound_gateways")]
|
|
||||||
public Dictionary<string, List<RemoteGatewayz>> InboundGateways { get; set; } = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>Remote gateway entry. Mirrors Go <c>RemoteGatewayz</c>.</summary>
|
|
||||||
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<AccountGatewayz>? Accounts { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>Per-account interest mode for gateway. Mirrors Go <c>AccountGatewayz</c>.</summary>
|
|
||||||
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<string>? Subs { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("subscriptions_list_detail")]
|
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
||||||
public List<SubDetail>? SubsDetail { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Leafz — leaf-node monitoring types
|
// Leafz — leaf-node monitoring types
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# NATS .NET Porting Status Report
|
# NATS .NET Porting Status Report
|
||||||
|
|
||||||
Generated: 2026-03-01 12:56:43 UTC
|
Generated: 2026-03-01 14:18:03 UTC
|
||||||
|
|
||||||
## Modules (12 total)
|
## Modules (12 total)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user