-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathEmbeddedRuntimeHostContracts.cs
More file actions
75 lines (58 loc) · 1.72 KB
/
EmbeddedRuntimeHostContracts.cs
File metadata and controls
75 lines (58 loc) · 1.72 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
using DotPilot.Core.Features.ControlPlaneDomain;
namespace DotPilot.Core.Features.RuntimeFoundation;
public enum EmbeddedRuntimeHostState
{
Stopped,
Starting,
Running,
}
public enum EmbeddedRuntimeClusteringMode
{
Localhost,
}
public enum EmbeddedRuntimeStorageMode
{
InMemory,
}
public sealed record EmbeddedRuntimeGrainDescriptor(
string Name,
string Summary);
public sealed record EmbeddedRuntimeHostSnapshot(
EmbeddedRuntimeHostState State,
EmbeddedRuntimeClusteringMode ClusteringMode,
EmbeddedRuntimeStorageMode GrainStorageMode,
EmbeddedRuntimeStorageMode ReminderStorageMode,
string ClusterId,
string ServiceId,
int SiloPort,
int GatewayPort,
IReadOnlyList<EmbeddedRuntimeGrainDescriptor> Grains);
public interface IEmbeddedRuntimeHostCatalog
{
EmbeddedRuntimeHostSnapshot GetSnapshot();
}
public interface ISessionGrain : IGrainWithStringKey
{
ValueTask<SessionDescriptor?> GetAsync();
ValueTask<SessionDescriptor> UpsertAsync(SessionDescriptor session);
}
public interface IWorkspaceGrain : IGrainWithStringKey
{
ValueTask<WorkspaceDescriptor?> GetAsync();
ValueTask<WorkspaceDescriptor> UpsertAsync(WorkspaceDescriptor workspace);
}
public interface IFleetGrain : IGrainWithStringKey
{
ValueTask<FleetDescriptor?> GetAsync();
ValueTask<FleetDescriptor> UpsertAsync(FleetDescriptor fleet);
}
public interface IPolicyGrain : IGrainWithStringKey
{
ValueTask<PolicyDescriptor?> GetAsync();
ValueTask<PolicyDescriptor> UpsertAsync(PolicyDescriptor policy);
}
public interface IArtifactGrain : IGrainWithStringKey
{
ValueTask<ArtifactDescriptor?> GetAsync();
ValueTask<ArtifactDescriptor> UpsertAsync(ArtifactDescriptor artifact);
}