Skip to content

Conversation

@colebrumley
Copy link

This PR adds support for socket-based Consul connections. This would be especially convenient in overlay network environments where it could be difficult to tell whether you're talking to the local Consul node or a remote one. It'd also be useful in Docker-in-Docker use cases like RancherOS where you may want to run Registrator in system-docker so that it's available immediately on boot.

I piggy-backed onto the existing consul and consulkv Factories by adding a -unix suffix to the schemes and then doing a little additional parsing in New().

The service backend works as expected, but the KV backend looks a little funky. Since we can't rely on slashes for the path (and thus the KV prefix), there's an extra colon to delimit the prefix i.e. consulkv-unix:///var/run/consul.sock:/base/key.

Commits are squashed and docs are added, let me know what you think!

@progrium
Copy link
Contributor

progrium commented Feb 9, 2016

Seems like a weird special case, but also doesn't seem unreasonable.

progrium added a commit that referenced this pull request Feb 9, 2016
Add support for Consul unix sockets
@progrium progrium merged commit 1f9fa9e into gliderlabs:master Feb 9, 2016
This was referenced Jun 25, 2018
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants