mirror of
https://github.com/moghtech/komodo.git
synced 2026-09-07 08:00:54 +00:00
13 lines
354 B
Rust
13 lines
354 B
Rust
use anyhow::Context;
|
|
use types::{Command, Log, Server};
|
|
|
|
use crate::PeripheryClient;
|
|
|
|
impl PeripheryClient {
|
|
pub async fn run_command(&self, server: &Server, command: &Command) -> anyhow::Result<Log> {
|
|
self.post_json(server, &format!("/command"), command)
|
|
.await
|
|
.context("failed to run command on periphery")
|
|
}
|
|
}
|