Skip to content

Commit 4b65405

Browse files
committed
expose machine status
1 parent a0540ee commit 4b65405

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/robot/client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,12 @@ export class RobotClient extends EventDispatcher implements Robot {
719719
return resp.resourceRpcSubtypes;
720720
}
721721

722+
// MACHINE STATUS
723+
724+
async getMachineStatus() {
725+
return await this.robotService.getMachineStatus({});
726+
}
727+
722728
// MODULES
723729

724730
async restartModule(moduleId?: string, moduleName?: string) {

src/robot/robot.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,13 @@ export interface Robot {
155155
*/
156156
getCloudMetadata(): Promise<CloudMetadata>;
157157

158+
/**
159+
* Get the current status of the robot.
160+
*
161+
* @alpha
162+
*/
163+
getMachineStatus(): Promise<proto.GetMachineStatusResponse>;
164+
158165
/**
159166
* Restarts a module running on the machine with the given id or name.
160167
*

0 commit comments

Comments
 (0)