1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-12 16:18:07 -05:00

Add max concurrent players over 24 hours badge to home

This commit is contained in:
RaidMax
2021-08-26 17:35:05 -05:00
parent 6cef75b5b5
commit fe140707ee
34 changed files with 4904 additions and 47 deletions

View File

@ -0,0 +1,29 @@
using System;
using System.Threading;
using System.Threading.Tasks;
namespace SharedLibraryCore.Interfaces
{
/// <summary>
/// Exposes methods to get analytical data about server(s)
/// </summary>
public interface IServerDataViewer
{
/// <summary>
/// Retrieves the max concurrent clients over a give time period for all servers or given server id
/// </summary>
/// <param name="serverId">ServerId to query on</param>
/// <param name="overPeriod">how far in the past to search</param>
/// <param name="token">CancellationToken</param>
/// <returns></returns>
Task<int> MaxConcurrentClientsAsync(long? serverId = null, TimeSpan? overPeriod = null, CancellationToken token = default);
/// <summary>
/// Gets the total number of clients connected and total clients connected in the given time frame
/// </summary>
/// <param name="overPeriod">how far in the past to search</param>
/// <param name="token"></param>
/// <returns></returns>
Task<(int, int)> ClientCountsAsync(TimeSpan? overPeriod = null, CancellationToken token = default);
}
}