aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Core/State.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/slskd/Core/State.cs b/src/slskd/Core/State.cs
index 86b628b5..4f7876de 100644
--- a/src/slskd/Core/State.cs
+++ b/src/slskd/Core/State.cs
@@ -37,6 +37,7 @@ namespace slskd
public ServerState Server { get; init; } = new ServerState();
public ServerConnectionWatchdogState ConnectionWatchdog { get; init; } = new ServerConnectionWatchdogState();
public RelayState Relay { get; init; } = new RelayState();
+ public HealthState Health { get; init; } = new HealthState();
public UserState User { get; init; } = new UserState();
public DistributedNetworkState DistributedNetwork { get; init; } = new DistributedNetworkState();
public ShareState Shares { get; init; } = new ShareState();
@@ -44,6 +45,23 @@ namespace slskd
public User[] Users { get; init; } = Array.Empty<User>();
}
+ public record HealthState
+ {
+ public SearchHealthState Search { get; init; } = new();
+
+ public record SearchHealthState
+ {
+ public IncomingSearchHealthState Incoming { get; init; } = new();
+
+ public record IncomingSearchHealthState
+ {
+ public double Latency { get; init; }
+ public int QueueDepth { get; init; }
+ public double DropRate { get; init; }
+ }
+ }
+ }
+
public record VersionState
{
public string Full { get; init; } = Program.FullVersion;