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

Local Agent used for service list reads (#276) #277

Merged
merged 1 commit into from
Oct 31, 2017
Merged

Conversation

chemicL
Copy link
Contributor

@chemicL chemicL commented Oct 31, 2017

If defined, the local consul agent is used to read list of services.
Otherwise, a random agent is picked, but only from the cache of agents
already syncing registrations.
This change prevents situations, where contacting a random agent in the
cluster fails, because it has no ACL-DC configured.

consul/agents.go Outdated
)

type Agents interface {
GetAgent(agentAddress string) (agent *consulapi.Client, err error)
GetAgent(agentAddress string) (agent *Agent, err error)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 For making Agents interface more consitent but please do it in a separate PR.

If defined, the local consul agent is used to read list of services.
Otherwise, a random agent is picked, but only from the cache of agents
already syncing registrations.
This change prevents situations, where contacting a random agent in the
cluster fails, because it has no ACL-DC configured.
@chemicL chemicL force-pushed the 276-local-agent-reads branch from 1086e7b to 004fd46 Compare October 31, 2017 13:55
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 90.575% when pulling 004fd46 on 276-local-agent-reads into 3fb8781 on master.

@janisz janisz merged commit 72472fe into master Oct 31, 2017
@janisz janisz deleted the 276-local-agent-reads branch October 31, 2017 14:27
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.

3 participants