/
loginsight.thrift
152 lines (128 loc) · 3.07 KB
/
loginsight.thrift
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
struct RepoImportCommand {
1: string path;
2: i32 interval;
3: bool monitor;
4: string parserName;
5: string inclusion;
6: string exclusion
}
struct ShutdownCommand {
1: bool immediately;
2: bool waitForQueued
}
struct RestartCommand {
1: bool waitForQueued
}
struct PhoneHomeFeedbackCommand {
1: bool enable
}
struct HostSyncCommand {
1: string ntpModeAttributeString
}
struct NtpSyncCommand {
1: bool test;
2: list<string> ntpServers
}
struct SupportBundleCommand {
1: string uuid
}
struct PakUpgradeCommand {
1: string fileName;
2: bool eulaOnly;
3: string outputFile;
4: bool outputOnly;
5: string locale;
6: bool forceInstall
}
struct RemotePakDownloadCommand {
1: string sourceNodeToken;
2: string requestUrl;
3: string fileName
}
struct ConfigLolCommand {
1: string operation;
2: string destination;
3: string protocol;
4: string port;
5: string force
}
struct CommandWithTimeout {
1: Command command;
2: i64 timeoutMillis
}
struct Command {
1: i32 commandType;
2: RepoImportCommand repoImportCommand;
3: ShutdownCommand shutdownCommand;
4: RestartCommand restartCommand;
5: PhoneHomeFeedbackCommand phoneHomeFeedbackCommand;
6: HostSyncCommand hostSyncCommand;
7: NtpSyncCommand ntpSyncCommand;
8: SupportBundleCommand supportBundleCommand;
9: PakUpgradeCommand pakUpgradeCommand;
10: RemotePakDownloadCommand remotePakDownloadCommand;
11: ConfigLolCommand configLolCommand;
}
struct CommandStatusWithHandle {
1: CommandStatus commandStatus;
2: CommandHandle commandHandle
}
struct CommandStatus {
1: i32 commandStatusType;
2: QueuedCommandStatus queuedCommandStatus;
3: RunningCommandStatus runningCommandStatus;
4: ExitedCommandStatus exitedCommandStatus
}
struct CommandHandle {
1: i64 commandHandle;
2: string error
}
struct QueuedCommandStatus {
1: Command command;
2: Timestamp timeRequested
}
struct RunningCommandStatus {
1: Command command;
2: Timestamp timeRequested;
3: Timestamp timeStartedRunning;
4: StatusUpdate lastStatusUpdate
}
struct ExitedCommandStatus {
1: Command command;
2: Timestamp timeRequested;
3: Timestamp timeStartedRunning;
4: StatusUpdate lastStatusUpdate;
5: Timestamp exitTime;
6: bool wasCancelled;
}
struct StatusUpdate {
1: string statusMessage;
2: Timestamp timestamp;
3: bool error;
4: i32 exitCode
}
struct Timestamp {
1: i64 timestamp
}
enum StrataNodeType {
STANDALONE = 1,
WORKER = 2,
UNKNOWN = 3
}
struct GetConfigRequest {
1: string clusterGuid;
2: string workerToken;
3: i32 lastKnownConfigGeneration;
4: bool includeBlobInResponseIFFNewerVersion
}
struct GetConfigResult {
1: string masterToken;
2: i32 configGeneration;
3: string configBlob;
4: string error
}
service DaemonCommands {
StrataNodeType getNodeType()
GetConfigResult getConfig(1:GetConfigRequest request)
CommandStatusWithHandle runCommand(1:CommandWithTimeout commandWithTimeout)
}