Fixed event/observer issues

This commit is contained in:
2025-07-30 17:12:21 +02:00
parent bb81ca9674
commit eaf8c36f7f
8 changed files with 113 additions and 87 deletions

View File

@@ -1,14 +1,14 @@
using System.Reactive.Linq;
using System.Reactive.Subjects;
using MoonCore.Observability;
using MoonlightServers.Daemon.Helpers;
using MoonlightServers.Daemon.ServerSys.Abstractions;
namespace MoonlightServers.Daemon.ServerSys.Implementations;
public class DockerStatistics : IStatistics
{
public IAsyncObservable<ServerStats> OnStats => OnStatsSubject.ToAsyncObservable();
public IAsyncObservable<ServerStats> OnStats => OnStatsSubject;
private readonly Subject<ServerStats> OnStatsSubject = new();
private readonly EventSubject<ServerStats> OnStatsSubject = new();
public Task Initialize()
=> Task.CompletedTask;