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

Method open

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

Source from the content-addressed store, hash-verified

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

Callers 3

export_run_idMethod · 0.45
open_fifo_rdwrFunction · 0.45
append_to_fileMethod · 0.45

Calls 3

create_fifoFunction · 0.85
open_fifo_senderFunction · 0.85
open_fifo_receiverFunction · 0.85

Tested by

no test coverage detected