Skip to content

Commit

Permalink
Make the elastic sink a linked transport.
Browse files Browse the repository at this point in the history
Sending error reponses via err port, success responses via out port.

Signed-off-by: Matthias Wahl <mwahl@wayfair.com>
  • Loading branch information
Matthias Wahl committed Jan 25, 2021
1 parent a6906aa commit 7617062
Show file tree
Hide file tree
Showing 27 changed files with 1,269 additions and 132 deletions.
10 changes: 7 additions & 3 deletions src/codec/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ impl Codec for JSON {
let new_len = max(self.string_buffer.capacity(), data.len()) * 2;
self.string_buffer.reserve(new_len);
}
tremor_value::to_value_with_buffers(data, &mut self.input_buffer, &mut self.string_buffer)
.map(Some)
.map_err(|e| e.into())
tremor_value::parse_to_value_with_buffers(
data,
&mut self.input_buffer,
&mut self.string_buffer,
)
.map(Some)
.map_err(|e| e.into())
}
fn encode(&self, data: &Value) -> Result<Vec<u8>> {
let mut v = Vec::with_capacity(1024);
Expand Down
Loading

0 comments on commit 7617062

Please sign in to comment.