FAQ
Please revisit test cases because I've just modified ListenUnixgram
signature. Also please provide multiple fake syslog servers which
use "tcp", "udp", "unix" and "unixgram". And it would be better
not only concurrent write test but concurrent re-connect test.
Thanks.


https://codereview.appspot.com/6782140/diff/42002/src/pkg/log/syslog/syslog.go
File src/pkg/log/syslog/syslog.go (right):

https://codereview.appspot.com/6782140/diff/42002/src/pkg/log/syslog/syslog.go#newcode89
src/pkg/log/syslog/syslog.go:89: type serverConn interface {
I think this interface is unnecessary unless you want to
use both net.Conn and net.PacketConn.

https://codereview.appspot.com/6782140/diff/42002/src/pkg/log/syslog/syslog.go#newcode94
src/pkg/log/syslog/syslog.go:94: type netConn struct {
ditto.

https://codereview.appspot.com/6782140/diff/42002/src/pkg/log/syslog/syslog.go#newcode167
src/pkg/log/syslog/syslog.go:167: func (w *Writer) Close() error {
Close is exposed so it needs comments.

https://codereview.appspot.com/6782140/diff/42002/src/pkg/log/syslog/syslog.go#newcode239
src/pkg/log/syslog/syslog.go:239: if w.conn == nil {
I'm not keen to manage a conn state with write-only lock because
the state of conn might be a single point of failure to all
syslog.Writer
users in a single go process. For example, once the conn brings down,
all users would be blocked by this state until new conn estab attempts
finished (no DialTimeout...).

I have no clue, do you have any good solution for this?
E.g., anyway syslog.Writer fails as quick as possible and wont block up
users during re-connecting.

https://codereview.appspot.com/6782140/

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedDec 16, '12 at 6:54a
activeDec 16, '12 at 6:54a
posts1
users1
websitegolang.org

1 user in discussion

Mikioh Mikioh: 1 post

People

Translate

site design / logo © 2022 Grokbase