MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / send_command

Method send_command

crates/memtrack/src/ipc.rs:47–59  ·  view source on GitHub ↗
(&self, cmd: IpcCommand)

Source from the content-addressed store, hash-verified

45 }
46
47 fn send_command(&self, cmd: IpcCommand) -> Result<IpcResponse> {
48 let (response_tx, response_rx) = ipc::channel::<IpcResponse>()?;
49
50 let msg = IpcMessage {
51 command: cmd,
52 response_channel: response_tx,
53 };
54
55 self.sender.send(msg).context("Failed to send command")?;
56 let response = response_rx.recv().context("Failed to receive response")?;
57
58 Ok(response)
59 }
60
61 pub fn enable(&self) -> Result<()> {
62 let response = self.send_command(IpcCommand::Enable)?;

Callers 3

enableMethod · 0.80
disableMethod · 0.80
pingMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected