Always create a consul.Syncer. Use a default Consul Config if necessary.

This commit is contained in:
Sean Chittenden
2016-06-10 11:19:02 -04:00
parent 61a36a6d54
commit aff951ca4e
2 changed files with 14 additions and 0 deletions

View File

@@ -205,7 +205,14 @@ type UniversalExecutor struct {
// NewExecutor returns an Executor
func NewExecutor(logger *log.Logger) Executor {
shutdownCh := make(chan struct{})
cs, err := consul.NewSyncer(nil, shutdownCh, logger)
if err != nil {
return err
}
exec := &UniversalExecutor{
consulSyncer: cs,
logger: logger,
processExited: make(chan interface{}),
shutdownCh: make(chan struct{}),