Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

providing way to override default consul address #28

Closed
wants to merge 2 commits into from

Conversation

benschw
Copy link
Contributor

@benschw benschw commented Apr 13, 2017

  • Preserve default behavior of using localhost of no overrides are provided
  • if env var CONSUL_HTTP_ADDR (the var used by others clients to configure a consul address) is set, it is leveraged
  • if base_uri is provided in options array, it is leveraged

@@ -17,8 +17,15 @@ class Client

public function __construct(array $options = array(), LoggerInterface $logger = null, GuzzleClient $client = null)
{
$base_uri = 'http://127.0.0.1:8500';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$baseUri

@stevenscg
Copy link

LGTM! The Consul docs and team encourage clients to support CONSUL_HTTP_ADDR.

@lyrixx
Copy link
Member

lyrixx commented May 11, 2017

Thank you @benschw.

@lyrixx lyrixx closed this in 8ce44db May 11, 2017
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.

None yet

4 participants