fsouza/go-dockerclient — pull request #98 by Sirupsen (2014-05-18 04:22:30+00:00)
Title: Move eventMonitor to client

In my test suite, I create a `dockerclient` instance for each test. `dockerclient` has global state that isn't tied to the client and didn't clean up its goroutines, causing doubled events. This fixes that by moving the `eventMonitor` to the client. I also also changed the stream listener to use `JSON.decoder`.

I added the name to the Container struct returned when creating a container if it was passed via options. This is useful if you're using the name and passing it on to other methods.

I've had problems where I don't see events sometimes listening on the Unix socket, but they appear fine on TCP. Is this a known problem? I doubt it's client specific.