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

Method open

src/executor/shared/fifo.rs:115–132  ·  view source on GitHub ↗
(ctl_path: &Path, ack_path: &Path)

Source from the content-addressed store, hash-verified

113 }
114
115 pub fn open(ctl_path: &Path, ack_path: &Path) -> anyhow::Result<Self> {
116 create_fifo(ctl_path)?;
117 create_fifo(ack_path)?;
118
119 let ack_fifo = open_fifo_sender(ack_path)?;
120 let ctl_fifo = open_fifo_receiver(ctl_path)?;
121
122 let codec = LengthDelimitedCodec::builder()
123 .length_field_length(4)
124 .little_endian()
125 .new_codec();
126 let ctl_reader = FramedRead::new(ctl_fifo, codec);
127
128 Ok(Self {
129 ack_fifo,
130 ctl_reader,
131 })
132 }
133
134 pub async fn recv_cmd(&mut self) -> anyhow::Result<FifoCommand> {
135 let bytes = self

Callers 3

append_to_fileMethod · 0.80
open_fifo_rdwrFunction · 0.80
newMethod · 0.80

Calls 3

create_fifoFunction · 0.85
open_fifo_senderFunction · 0.85
open_fifo_receiverFunction · 0.85

Tested by

no test coverage detected