2026-08-11 23:03:55 +08:00
|
|
|
namespace LanMountainDesktop.AirAppIsolation.Contracts;
|
2026-04-22 10:25:46 +08:00
|
|
|
|
2026-08-11 23:03:55 +08:00
|
|
|
public sealed record AirAppInitializeRequest(
|
|
|
|
|
string AirAppId,
|
2026-04-22 10:25:46 +08:00
|
|
|
string SessionId,
|
|
|
|
|
string HostPipeName,
|
|
|
|
|
string DataDirectory,
|
|
|
|
|
IReadOnlyDictionary<string, string>? StartupProperties = null);
|
|
|
|
|
|
2026-08-11 23:03:55 +08:00
|
|
|
public sealed record AirAppInitializeResponse(
|
2026-04-22 10:25:46 +08:00
|
|
|
bool Succeeded,
|
|
|
|
|
string? ErrorCode = null,
|
|
|
|
|
string? ErrorMessage = null);
|
|
|
|
|
|
2026-08-11 23:03:55 +08:00
|
|
|
public sealed record AirAppStopRequest(
|
2026-04-22 10:25:46 +08:00
|
|
|
string Reason,
|
|
|
|
|
bool RestartRequested = false);
|
|
|
|
|
|
2026-08-11 23:03:55 +08:00
|
|
|
public sealed record AirAppRestartRequest(string Reason);
|
2026-04-22 10:25:46 +08:00
|
|
|
|
2026-08-11 23:03:55 +08:00
|
|
|
public sealed record AirAppLifecycleStateChanged(
|
2026-04-22 10:25:46 +08:00
|
|
|
string State,
|
|
|
|
|
string? Detail = null);
|
|
|
|
|
|
2026-08-11 23:03:55 +08:00
|
|
|
public static class AirAppLifecycleStates
|
2026-04-22 10:25:46 +08:00
|
|
|
{
|
|
|
|
|
public const string Starting = "starting";
|
|
|
|
|
public const string Ready = "ready";
|
|
|
|
|
public const string Degraded = "degraded";
|
|
|
|
|
public const string Stopping = "stopping";
|
|
|
|
|
public const string Stopped = "stopped";
|
|
|
|
|
public const string Faulted = "faulted";
|
|
|
|
|
}
|