Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No exported method for creating TCPReaders #21

Closed
zbuc opened this issue Feb 27, 2018 · 7 comments
Closed

No exported method for creating TCPReaders #21

zbuc opened this issue Feb 27, 2018 · 7 comments

Comments

@zbuc
Copy link

zbuc commented Feb 27, 2018

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

@joschi
Copy link

joschi commented Feb 28, 2018

@zbuc TCPReader is just a helper class for the test cases of go-gelf and is not supposed to be exported.

r, _, _, err := newTCPReader("127.0.0.1:0")

@joschi joschi closed this as completed Feb 28, 2018
@zbuc
Copy link
Author

zbuc commented Feb 28, 2018 via email

@joschi
Copy link

joschi commented Feb 28, 2018

@zbuc go-gelf is a GELF client library and doesn't provide any GELF server parts.

@zbuc
Copy link
Author

zbuc commented Feb 28, 2018 via email

@joschi
Copy link

joschi commented Feb 28, 2018

Maybe @mariussturm would like to add a comment here.

@mariussturm
Copy link

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.

@zbuc
Copy link
Author

zbuc commented Feb 28, 2018

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.

@Graylog2 Graylog2 locked as resolved and limited conversation to collaborators Feb 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants