The list of APIs used in current TiDB Operator
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
[Suggested by @nolouch](https://github.com/pingcap/tidb-operator/issues/2805#issuecomment-648677730), I open this issue and list the APIs used in the current TiDB Operator.
```go
var (
healthPrefix = "pd/health"
membersPrefix = "pd/api/v1/members"
storesPrefix = "pd/api/v1/stores"
storePrefix = "pd/api/v1/store"
configPrefix = "pd/api/v1/config"
clusterIDPrefix = "pd/api/v1/cluster"
schedulersPrefix = "pd/api/v1/schedulers"
pdLeaderPrefix = "pd/api/v1/leader"
pdLeaderTransferPrefix = "pd/api/v1/leader/transfer"
pdReplicationPrefix = "pd/api/v1/config/replicate"
// evictLeaderSchedulerConfigPrefix is the prefix of evict-leader-scheduler
// config API, available since PD v3.1.0.
evictLeaderSchedulerConfigPrefix = "pd/api/v1/scheduler-config/evict-leader-scheduler/list"
)
```
In the future, I would suggest PD can treat public API as versioned API and bump the version when the schema changes or add new API or fields instead of breaking backward compatibility.
The old version or fields can be deprecated first and the final removal can be made in the major version (or after a few minor versions). This gives TiDB Operator time to migrate to the new API or fields.
Contributor guide
Assessment
This issue has not been assessed yet.