Logging api

Reviewers:  @bernerdschaefer, @peterbourgon 

First pass at the internals of the logging API.  This is two layers thick.  There is a RingBuffer for log messages, and on top of this is a data structure that implements storage for and operations for each container.  (The RingBuffer probably should have been a separate submit.)

The next piece to be worked on will be the HTTP logging interface.
You're right. We don't need it.


On Fri, Aug 1, 2014 at 9:34 AM, Peter Bourgon <notifications@github.com>
wrote:

> In harpoon-agent/logs.go:
>
> > +			// Message dropped
> > +		}
> > +	}
> > +}
> > +
> > +// addNotifier adds a listener
> > +func (cl *containerLog) addNotifier(logSink chan string) {
> > +	cl.notifications[logSink] = struct{}{}
> > +}
> > +
> > +// removeLister removes logSink from the notification list
> > +func (cl *containerLog) removeNotifier(logSink chan string) {
> > +	_, ok := cl.notifications[logSink]
> > +	if !ok {
> > +		return
> > +	}
>
> Do we actually need this check?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/soundcloud/harpoon/pull/13/files#r15684899>.
>