Closed zbuc closed 6 years ago
@zbuc TCPReader
is just a helper class for the test cases of go-gelf and is not supposed to be exported.
Is there any way of creating a TCP reader instead of UDP? The exported method in Reader.go is only a UDP reader. The readme file for the v2 branch says TCP is supported.
On Feb 28, 2018, at 2:59 AM, Jochen Schalanda notifications@github.com wrote:
@zbuc TCPReader is just a helper class for the test cases of go-gelf and is not supposed to be exported.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@zbuc go-gelf is a GELF client library and doesn't provide any GELF server parts.
Oh. In V1 (and V2) some GELF server parts are exposed (and work fine), but only for UDP.
On Wed, Feb 28, 2018 at 10:13 AM, Jochen Schalanda <notifications@github.com
wrote:
@zbuc https://github.com/zbuc go-gelf is a GELF client library and doesn't provide any GELF server parts.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Graylog2/go-gelf/issues/21#issuecomment-369269294, or mute the thread https://github.com/notifications/unsubscribe-auth/AAiyuHhwmdoMuLEvbnfi5Xt8bKNREIJiks5tZWxdgaJpZM4SVpzV .
Maybe @mariussturm would like to add a comment here.
Like @joschi said, this is a pure client library. The reader parts you see are used exclusively for testing and should not be used in any application project.
FWIW, this code: https://github.com/Graylog2/go-gelf/blob/v2/gelf/reader.go#L24 is publicly exported and works fine for UDP GELF servers from my testing.
There is a
newTCPReader
function, however it isn't exported. There doesn't seem to be an exported method of creating TCP-based reader applications that use this library.https://github.com/Graylog2/go-gelf/blob/v2/gelf/tcpreader.go#L22