mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2026-02-25 11:08:17 +01:00
18 lines
677 B
C#
18 lines
677 B
C#
using System.Collections.Immutable;
|
|
using MemoryPack;
|
|
|
|
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;
|
|
}
|