1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

persist client count history data across reboots and allow for configurable timespan

This commit is contained in:
RaidMax
2021-08-29 13:10:10 -05:00
parent a15bcf1469
commit dcf690325c
22 changed files with 213 additions and 59 deletions

View File

@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using SharedLibraryCore.Dtos;
using SharedLibraryCore.Helpers;
namespace SharedLibraryCore.Interfaces
{
@ -22,8 +25,16 @@ namespace SharedLibraryCore.Interfaces
/// 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>
/// <param name="token">CancellationToken</param>
/// <returns></returns>
Task<(int, int)> ClientCountsAsync(TimeSpan? overPeriod = null, CancellationToken token = default);
/// <summary>
/// Retrieves the client count and history over the given period
/// </summary>
/// <param name="overPeriod">how far in the past to search</param>
/// <param name="token">CancellationToken</param>
/// <returns></returns>
Task<IEnumerable<ClientHistoryInfo>> ClientHistoryAsync(TimeSpan? overPeriod = null, CancellationToken token = default);
}
}