Added function that marshals message into a given byte buffer.#3
Added function that marshals message into a given byte buffer.#3altenhof wants to merge 1 commit intocrewjam:masterfrom
Conversation
Should alllow us to pool byte buffers across multiple calls.
|
Thanks for your PR. This looks like it should be named WriteTo and implement the io.WriterTo interface, eh? |
|
Unfortunately, So, what about |
|
I'm hesitant to use a "wrong" name for a function that has a standard defined interface like WriterTo. Perhaps a solution is to change the existing stream format WriteTo() to a different name, or attach it to a helper struct. That way the function you wrote can be (correctly) named |
|
I'm not sure what the "right" name for such a function would be, but maybe I just shortly recap what my initial idea was: I'm using the library within a component that does "log forwarding", i.e. get log messages in syslog format, transforms them and then forwards them to another syslog endpoint. As I'm expecting fairly heavy loads (several thousand msg/sec), I wanted to have a way to "reuse" So, I'm not that much looking for a So how shall we proceed? |
|
Any update on this? |
Should alllow us to pool byte buffers across multiple calls.