-
Notifications
You must be signed in to change notification settings - Fork 35
/
orchestrator.proto
77 lines (61 loc) · 1.95 KB
/
orchestrator.proto
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
76
77
syntax = "proto3";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
option go_package = "https://github.com/e2b-dev/infra/orchestrator";
message SandboxConfig {
string templateID = 1;
string buildID = 2;
string kernelVersion = 3;
string firecrackerVersion = 4;
bool hugePages = 5;
string teamID = 6;
// Maximum length of the instance in Hours
int64 maxInstanceLength = 7;
optional string alias = 8;
string sandboxID = 9;
map<string, string> metadata = 10;
string envdVersion = 11;
map<string, string> envVars = 12;
int32 memoryMB = 13;
int32 vCpuCount = 14;
}
// Data required for creating a new sandbox.
message SandboxCreateRequest {
SandboxConfig sandbox = 1;
google.protobuf.Timestamp startTime = 2;
google.protobuf.Timestamp endTime = 3;
}
// Data about the sandbox.
message SandboxCreateResponse {
string clientID = 1;
}
// Data required for creating a new sandbox.
message SandboxUpdateRequest {
string sandboxID = 1;
google.protobuf.Timestamp endTime = 2;
}
// Data required for action on a specified sandbox.
message SandboxRequest {
string sandboxID = 1;
}
message RunningSandbox {
SandboxConfig config = 1;
string clientID = 2;
google.protobuf.Timestamp startTime = 9;
google.protobuf.Timestamp endTime = 10;
}
// Data returned after listing all the sandboxes.
message SandboxListResponse {
repeated RunningSandbox sandboxes = 1;
}
// Interface exported by the server.
service Sandbox {
// Create is a gRPC service that creates a new sandbox.
rpc Create(SandboxCreateRequest) returns (SandboxCreateResponse);
// Update is a gRPC service that updates a sandbox.
rpc Update(SandboxUpdateRequest) returns (google.protobuf.Empty);
// List is a gRPC service that returns a list of all the sandboxes.
rpc List(google.protobuf.Empty) returns (SandboxListResponse);
// Delete is a gRPC service that kills a sandbox.
rpc Delete(SandboxRequest) returns (google.protobuf.Empty);
}