Logging api

Refactorings to support testing logging interface. @bernerdschaefer @peterbourgon 
Outside the scope but pretty small.  I can roll them in.


On Tue, Aug 5, 2014 at 2:36 PM, Peter Bourgon <notifications@github.com>
wrote:

> In harpoon-agent/container.go:
>
> > @@ -24,6 +24,22 @@ import (
> >  	"github.com/soundcloud/harpoon/harpoon-agent/lib"
> >  )
> >
> > +// Container is a high level interface to an operating system container.  The api classes
> > +// interact directly with this class.  The interface was extracted so that containers could
> > +// be faked within tests.
> > +type Container interface {
> > +	Create() error
> > +	Instance() agent.ContainerInstance
> > +	Destroy() error
> > +	Heartbeat(hb agent.Heartbeat) string
> > +	Restart(t time.Duration) error
> > +	Start() error
> > +	Stop(t time.Duration) error
> > +	Subscribe(ch chan<- agent.ContainerInstance)
> > +	Unsubscribe(ch chan<- agent.ContainerInstance)
> > +	Logs() *containerLog
> > +}
>
> per the API
> <https://github.com/soundcloud/harpoon/blob/88504564ba1954296b5cdbfca502282607c4cd3e/doc/agent-api-v0.md#post-containersidaction>,
> Restart and Stop don't take duration parameters (anymore). Maybe that's
> outside the scope of this PR?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/soundcloud/harpoon/pull/21/files#r15808850>.
>