mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2024-11-23 19:42:51 +01:00
16 lines
546 B
C#
16 lines
546 B
C#
using MemoryPack;
|
|
using Phantom.Common.Data.Agent;
|
|
|
|
namespace Phantom.Common.Data.Web.Agent;
|
|
|
|
[MemoryPackable(GenerateType.VersionTolerant)]
|
|
public sealed partial record Agent(
|
|
[property: MemoryPackOrder(0)] Guid AgentGuid,
|
|
[property: MemoryPackOrder(1)] AgentConfiguration Configuration,
|
|
[property: MemoryPackOrder(2)] AgentStats? Stats,
|
|
[property: MemoryPackOrder(3)] IAgentConnectionStatus ConnectionStatus
|
|
) {
|
|
[MemoryPackIgnore]
|
|
public RamAllocationUnits? AvailableMemory => Configuration.MaxMemory - Stats?.RunningInstanceMemory;
|
|
}
|