Files
UnrealEngineUWP/Engine/Source/Programs/Horde/HordeServer/Models/Pool.cs
Ben Marsh 5abbc95b6e Add missing copyright notices.
[CL 16160939 by Ben Marsh in ue5-main branch]
2021-04-29 15:35:57 -04:00

78 lines
1.8 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using HordeServer.Api;
using HordeServer.Utilities;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Permissions;
using System.Threading.Tasks;
using PoolId = HordeServer.Utilities.StringId<HordeServer.Models.IPool>;
namespace HordeServer.Models
{
/// <summary>
/// A pool of machines
/// </summary>
public interface IPool
{
/// <summary>
/// Unique id for this pool
/// </summary>
public PoolId Id { get; }
/// <summary>
/// Name of the pool
/// </summary>
public string Name { get; }
/// <summary>
/// List of workspaces currently assigned to this pool
/// </summary>
public IReadOnlyList<AgentWorkspace> Workspaces { get; }
/// <summary>
/// Requirements for agents to be included in this pool
/// </summary>
public AgentRequirements? Requirements { get; }
/// <summary>
/// Arbitrary properties related to this pool
/// </summary>
public IReadOnlyDictionary<string, string> Properties { get; }
/// <summary>
/// Whether to enable autoscaling for this pool
/// </summary>
public bool EnableAutoscaling { get; }
/// <summary>
/// The minimum number of agents to keep in the pool
/// </summary>
public int? MinAgents { get; }
/// <summary>
/// The minimum number of idle agents to hold in reserve
/// </summary>
public int? NumReserveAgents { get; }
/// <summary>
/// Last time the pool was (auto) scaled up
/// </summary>
public DateTime? LastScaleUpTime { get; }
/// <summary>
/// Last time the pool was (auto) scaled down
/// </summary>
public DateTime? LastScaleDownTime { get; }
/// <summary>
/// Update index for this document
/// </summary>
public int UpdateIndex { get; }
}
}