tikv / tikv/pd

Get more information about config by one HTTP interface

Open
#7,446 0 comments 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Enhancement Task
Now, pd supports `/config` and `/config/default` interfaces to get configurations' current value and default value. I would like to propose one interface to get details of all configurations.

**Route Path**: `/config/detail`
**Method**: GET
**Response Body**: []ConfigDetail
```
// ConfigDetail is the detail of config option with current value and default value.
type ConfigDetail struct {
// config name
Name string `json:"name"`
// current config value
Value any `json:"value"`
// default config value
DefaultValue any `json:"default_value"`
}
```
What's more, we can then refine the interface by adding new fields to the structure, such as maximum, minimum, type, enumeration, and so on.

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing `/config` and `/config/default` HTTP handlers and their tests. Add the `/config/detail` GET endpoint so it returns a `[]ConfigDetail` containing each configuration's name, current value, and default value; done means the response matches the specified JSON shape.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.