Logging api

Refactorings to support testing logging interface. @bernerdschaefer @peterbourgon 
Peter, bernard.  Can you take a look at this when you get a chance.  I
think it's ready to go in.


On Wed, Aug 6, 2014 at 3:07 PM, Jeff Younker <jmy@soundcloud.com> wrote:

> I looked at doing it, and yeah, it's outside the scope of this PR.
>
>
> 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>.
>>
>
>