Creating server daemon. Added system info (not host info) and data usage endpoints

This commit is contained in:
2024-12-12 23:04:39 +01:00
parent 4168b93d61
commit 3c88b60e8d
17 changed files with 713 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
namespace MoonlightServers.DaemonShared.Http.Responses.Sys;
public class SystemDataUsageResponse
{
public long ImagesUsed { get; set; }
public long ImagesReclaimable { get; set; }
public long ContainersUsed { get; set; }
public long ContainersReclaimable { get; set; }
public long BuildCacheUsed { get; set; }
public long BuildCacheReclaimable { get; set; }
}

View File

@@ -0,0 +1,11 @@
namespace MoonlightServers.DaemonShared.Http.Responses.Sys;
public class SystemInfoResponse
{
public string DockerVersion { get; set; }
public string Version { get; set; }
public string OsName { get; set; }
public long MemoryUsage { get; set; }
public TimeSpan Uptime { get; set; }
public int CpuUsage { get; set; }
}

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Folder Include="Http\Requests\" />
</ItemGroup>
</Project>