Hi all,
I'd like to create a codec to decode Ion, a binary data format. I'm new to both LogStash and Ruby.
The Codec
how-to shows that I need to define a decode
method that accepts a single parameter: a variable called data
.
What type is data
? The docs for input plugins appear to indicate that data
will be a String
containing the bytes that were last read from the input. Is that right?
I'm concerned that data
might contain an incomplete Event
. That would mean that a parser would not be able to do anything with it when it was passed in.
Since the decode
method yield
s events as it decodes them, would it be possible to have some sort of InputStream
-type value instead of a String
?
Thanks for any guidance!