hashicorp/consul — pull request #431 by xla (2014-10-24 02:51:03+00:00)
Title: Add multiple service definition support

This change-set adds another key to the configuration decoding called `services`, which is expected to be a list of service definitions. It follows the established convention of only allowing one of the keys:
`service`, `check`, `services`. For every entry in the list it calls the corresponding decode method and appends it to the Servics of the resulting Config.

While a similar result could be achieved with changing the Services member of the Config struct to have named mapstruct tag it lacks the proper time conversions provided by DecodeServiceDefinition.

***
For some context we have the use-case that we want our schedulers to dump their state all at once into a single file to not cope with out-dated information and run a reload on the agent.

Happy to hear concerns regarding the naive implementation, discuss extended documentation and tests.