superfly / litefs

FUSE-based file system for replicating SQLite databases across a cluster of machines
Apache License 2.0
3.76k stars 89 forks source link

Add primary hostname to /info endpoint #411

Closed benbjohnson closed 9 months ago

benbjohnson commented 9 months ago

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

Usage

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