feat(adminui): driver-snapshot GetAll() + pure Hosts driver-view builder (#8)
This commit is contained in:
@@ -14,6 +14,9 @@ public interface IDriverStatusSnapshotStore
|
||||
void Upsert(DriverHealthChanged snapshot);
|
||||
bool TryGet(string driverInstanceId, out DriverHealthChanged snapshot);
|
||||
|
||||
/// <summary>Returns a point-in-time snapshot of every driver instance's last-known health.</summary>
|
||||
IReadOnlyCollection<DriverHealthChanged> GetAll();
|
||||
|
||||
/// <summary>
|
||||
/// Raised after every <see cref="Upsert"/> with the just-stored snapshot. Lets in-process
|
||||
/// consumers (the Blazor Server <c>DriverStatusPanel</c>) receive live updates by reading
|
||||
|
||||
@@ -25,4 +25,7 @@ public sealed class InMemoryDriverStatusSnapshotStore : IDriverStatusSnapshotSto
|
||||
/// <inheritdoc />
|
||||
public bool TryGet(string driverInstanceId, out DriverHealthChanged snapshot)
|
||||
=> _byInstance.TryGetValue(driverInstanceId, out snapshot!);
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyCollection<DriverHealthChanged> GetAll() => _byInstance.Values.ToArray();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user