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.
Thanks for catching that. I specifically went to meant to write mux.Get
after reading the spec, but it looks like something got lost between my
brain and the keyboard.


On Thu, Jul 31, 2014 at 10:33 AM, Bernerd Schaefer <notifications@github.com
> wrote:

> In harpoon-agent/api.go:
>
> > @@ -38,6 +38,8 @@ func newAPI(r *registry) *api {
> >  	mux.Post("/containers/:id/heartbeat", http.HandlerFunc(api.handleHeartbeat))
> >  	mux.Post("/containers/:id/start", http.HandlerFunc(api.handleStart))
> >  	mux.Post("/containers/:id/stop", http.HandlerFunc(api.handleStop))
> > +	// TODO(jmy): Uncomment this when we've decided on the interface's final from.
> > +	// mux.Post("/containers/:id/log", http.HandlerFunc(api.handleLog))
>
> mux.Get:
> https://github.com/soundcloud/harpoon/blob/master/doc/agent-api-v0.md#get-containersidloghistory10
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/soundcloud/harpoon/pull/13/files#r15631064>.
>