kontena / kontena-registrator

Other
0 stars 0 forks source link

Yield from policy #7

Closed SpComb closed 7 years ago

SpComb commented 7 years ago

For complicated policies that may register different kinds of etcd nodes depending on the Docker container, it would be useful to be able to yield from from the policy's docker_container handler.

Unfortunately, ruby lambda Procs cannot have their own yield block, so trying to implement this for the current kind of labmda func always results in a LocalJumpError..

SpComb commented 7 years ago

Commit d0a2a73 changes the Policy DSL implementation, and the policy can now have a def docker_container(container) ... end that can now also yield etcd nodes.