voidkitty/VoidCat/Services/Abstractions/IStatsCollector.cs

20 lines
436 B
C#
Raw Normal View History

2022-02-16 16:33:00 +00:00
namespace VoidCat.Services.Abstractions;
2022-02-16 23:19:31 +00:00
public interface IAggregateStatsCollector : IStatsCollector
{
}
2022-02-16 16:33:00 +00:00
public interface IStatsCollector
{
ValueTask TrackIngress(Guid id, ulong amount);
ValueTask TrackEgress(Guid id, ulong amount);
2022-02-16 23:19:31 +00:00
}
2022-02-16 16:33:00 +00:00
2022-02-16 23:19:31 +00:00
public interface IStatsReporter
{
2022-02-16 16:33:00 +00:00
ValueTask<Bandwidth> GetBandwidth();
ValueTask<Bandwidth> GetBandwidth(Guid id);
}
2022-02-16 23:19:31 +00:00
public sealed record Bandwidth(ulong Ingress, ulong Egress);