mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2026-02-20 13:46:36 +01:00
19 lines
710 B
C#
19 lines
710 B
C#
using System.Collections.Immutable;
|
|
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)] ImmutableArray<byte> ConnectionKey,
|
|
[property: MemoryPackOrder(3)] AgentRuntimeInfo RuntimeInfo,
|
|
[property: MemoryPackOrder(4)] AgentStats? Stats,
|
|
[property: MemoryPackOrder(5)] IAgentConnectionStatus ConnectionStatus
|
|
) {
|
|
[MemoryPackIgnore]
|
|
public RamAllocationUnits? AvailableMemory => RuntimeInfo.MaxMemory - Stats?.RunningInstanceMemory;
|
|
}
|