-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathRpcModel.cs
More file actions
42 lines (34 loc) · 827 Bytes
/
Copy pathRpcModel.cs
File metadata and controls
42 lines (34 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System.Collections.Generic;
using Coder.Desktop.Vpn.Proto;
namespace Coder.Desktop.App.Models;
public enum RpcLifecycle
{
Disconnected,
Connecting,
Connected,
}
public enum VpnLifecycle
{
Unknown,
Stopped,
Starting,
Started,
Stopping,
}
public class RpcModel
{
public RpcLifecycle RpcLifecycle { get; set; } = RpcLifecycle.Disconnected;
public VpnLifecycle VpnLifecycle { get; set; } = VpnLifecycle.Unknown;
public IReadOnlyList<Workspace> Workspaces { get; set; } = [];
public IReadOnlyList<Agent> Agents { get; set; } = [];
public RpcModel Clone()
{
return new RpcModel
{
RpcLifecycle = RpcLifecycle,
VpnLifecycle = VpnLifecycle,
Workspaces = Workspaces,
Agents = Agents,
};
}
}