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: fetch server config values via API #241

Merged
merged 3 commits into from
Jan 5, 2024
Merged

Conversation

coufalja
Copy link
Contributor

@coufalja coufalja commented Jan 5, 2024

Description

Cluster status API provides the set of server config values.

Motivation and Context

Useful for administration tools.
Example output:

{
  "id": "1",
  "version": "v0.3.2-43-gf927075-dirty",
  "tables": {
    "regatta-test": {
      "leader": "1",
      "raftTerm": "13"
    }
  },
  "config": {
    "api.address": "http://127.0.0.1:8443",
    "api.advertise-address": "http://127.0.0.1:8443",
    "api.cert-filename": "",
    "api.key-filename": "",
    "dev-mode": true,
    "log-level": "INFO",
    "maintenance.enabled": true,
    "maintenance.token": "**********",
    "memberlist.address": "0.0.0.0:7432",
    "memberlist.advertise-address": "",
    "memberlist.cluster-name": "default",
    "memberlist.members": [],
    "memberlist.node-name": "",
    "raft.address": "127.0.0.1:5012",
    "raft.compaction-overhead": "5000",
    "raft.election-rtt": 20,
    "raft.heartbeat-rtt": 1,
    "raft.initial-members": {
      "1": "127.0.0.1:5012"
    },
    "raft.listen-address": "",
    "raft.logdb": "tan",
    "raft.max-in-mem-log-size": "6291456",
    "raft.max-recv-queue-size": "0",
    "raft.max-send-queue-size": "0",
    "raft.node-host-dir": "/tmp/regatta/raft",
    "raft.node-id": "1",
    "raft.rtt": "50ms",
    "raft.snapshot-entries": "10000",
    "raft.snapshot-recovery-type": "",
    "raft.state-machine-dir": "/tmp/regatta/state-machine",
    "raft.wal-dir": "",
    "replication.address": "https://127.0.0.1:8444",
    "replication.ca-filename": "hack/replication/ca.crt",
    "replication.cert-filename": "hack/replication/server.crt",
    "replication.enabled": true,
    "replication.key-filename": "hack/replication/server.key",
    "replication.log-cache-size": 0,
    "replication.max-send-message-size-bytes": "4194304",
    "rest.address": "http://127.0.0.1:8079",
    "rest.read-timeout": "5s",
    "storage.block-cache-size": 16777216,
    "storage.table-cache-size": 1024,
    "tables.delete": [],
    "tables.names": [
      "regatta-test"
    ]
  }
}

How Has This Been Tested?

@github-actions github-actions bot added code Pull requests that update Go code docs Pull requests that update documentation proto changelog labels Jan 5, 2024
@coufalja coufalja merged commit 4852327 into master Jan 5, 2024
9 of 10 checks passed
@coufalja coufalja deleted the feature/config_values_api branch January 5, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog code Pull requests that update Go code docs Pull requests that update documentation proto
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants