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

Add primary hostname to /info endpoint #411

Merged
merged 1 commit into from
Oct 4, 2023
Merged

Add primary hostname to /info endpoint #411

merged 1 commit into from
Oct 4, 2023

Conversation

benbjohnson
Copy link
Collaborator

@benbjohnson benbjohnson commented Oct 4, 2023

This pull request makes a few changes to the GET /info endpoint:

  • Renames primary to isPrimary
  • Adds a primary object with a hostname field to show the current known primary node.
  • Removes the id field

Usage

$ curl http://localhost:20203/info
{
  "clusterID": "LFSC41164AE6B247A5DB",
  "isPrimary": false,
  "candidate": true,
  "path": "/var/lib/litefs",
  "primary": {
    "hostname": "node123"
  }
}

@benbjohnson benbjohnson merged commit c477633 into main Oct 4, 2023
16 checks passed
@benbjohnson benbjohnson deleted the primary-info branch October 4, 2023 17:01
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.

1 participant