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.
Cool. Just like Python.

-jeff


On Tue, Jul 29, 2014 at 4:59 PM, Peter Bourgon <notifications@github.com>
wrote:

> In harpoon-agent/logs.go:
>
> > +		if prev.Value == nil {
> > +			break;
> > +		}
> > +		results = append(results, prev.Value.(string))
> > +	}
> > +	return reverse(results)
> > +}
> > +
> > +func reverse(x []string) []string {
> > +	for i := 0; i < len(x)/2; i++ {
> > +		t := x[i]
> > +		x[i] = x[len(x)-i-1]
> > +		x[len(x)-i-1] = t
> > +	}
> > +	return x
> > +}
>
> func reverse(a []string) []string {
>     for i := 0; i < len(a)/2; i++ {
>         a[i], a[len(a)-i-1] = a[len(a)-i-1], a[i]
>     }
>     return a}
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/soundcloud/harpoon/pull/13/files#r15528234>.
>