MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / send_data

Method send_data

crates/hyperqueue/src/worker/streamer.rs:138–157  ·  view source on GitHub ↗
(&self, channel: ChannelId, data: Vec<u8>)

Source from the content-addressed store, hash-verified

136 }
137
138 pub async fn send_data(&self, channel: ChannelId, data: Vec<u8>) -> tako::Result<()> {
139 if self
140 .sender
141 .send(StreamerMessage::Write {
142 header: StreamChunkHeader {
143 time: Utc::now(),
144 task: self.task_id,
145 instance: self.instance_id,
146 channel,
147 size: data.len() as u64,
148 },
149 data,
150 })
151 .await
152 .is_err()
153 {
154 return Err("Sending streamer message failed".into());
155 }
156 Ok(())
157 }
158}
159
160async fn stream_writer(

Callers 1

resend_stdioFunction · 0.80

Calls 4

intoMethod · 0.80
nowFunction · 0.50
sendMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected