mozilla-services/heka — pull request #48 by rafrombrc (2013-03-15 01:04:35+00:00)
Title: Features/run plugins

This patch makes a subtle change to the Input and InputRunner APIs, The Input.Start() method, which was responsible for spinning up a listener goroutine and exiting, is replaced by Input.Run(), which shouldn't return until the input has shut down. This puts control of the Input's goroutine into the InputRunner, which allows us to centralize some boilerplate (including the wg.Done() call, which is easily forgotten and causes shutdown to hang) as well as provide the ability to recover from certain plugin panic situations.

If this seems a reasonable change, I propose that we change the Filter, Output, and FORunner APIs similarly.