Skip to content
New issue

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

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

Already on GitHub? # to your account

isLeader handler added #695

Merged
merged 2 commits into from
Mar 5, 2020
Merged

Conversation

andreygolev
Copy link
Contributor

This is a handler which tells if a node is a leader or not.
This is required for Dkron HA deployment in Kubernetes environment.
Example Kubernetes manifests will be in another PR

dkron/api.go Outdated
if isleader {
renderJSON(c, http.StatusOK, "I am a leader")
} else {
renderJSON(c, http.StatusNotFound, "I am not a leader")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
renderJSON(c, http.StatusNotFound, "I am not a leader")
renderJSON(c, http.StatusNotFound, "I am a follower")

@vcastellm
Copy link
Member

This will need changes in the swagger.yml spec

Copy link
Member

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

LGTM

@vcastellm vcastellm merged commit 3cb026a into distribworks:master Mar 5, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants