flynn/sdutil — pull request #6 by miracle2k (2014-02-05 23:53:28+00:00)
Title: Add expose command for discovery consumption.

Attempt to implement #5.

Phew. The below seems to work pretty well so far; am I doing this right in the first place?

What this code will do is start a goroutine for each service dependency. Each one will see to update its slot in a hashmap as instances of the service come and go.

The main command function will get a signal when all dependencies are found, and will then start the proc. When a dependency disappears, the proc will be terminated, and we'll wait around for the dependency to come up again.