MCPcopy Create free account
hub / github.com/Rustixir/tokio_sky / fill_buffer

Method fill_buffer

examples/kafka_processor.rs:71–84  ·  view source on GitHub ↗
(&mut self, buffer_size: usize)

Source from the content-addressed store, hash-verified

69 async fn drain(&mut self, _buffer: VecDeque<ProcKafkaMessage>) {}
70
71 async fn fill_buffer(&mut self, buffer_size: usize) -> Result<VecDeque<ProcKafkaMessage>, Terminate> {
72
73 Ok((0..buffer_size)
74 .into_iter()
75 .map(|i| {
76 ProcKafkaMessage {
77 key: format!("{}", i).into_bytes(),
78 payload: format!("payload - {}", i),
79 topic: format!("topic1"),
80 partition: 1,
81 }
82 })
83 .collect::<VecDeque<ProcKafkaMessage>>())
84 }
85}
86
87

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected