tikv / tikv/pd

The list of APIs used in current TiDB Operator

Open
#2,579 0 comments 4 reactions 0 assignees View on GitHub
status/TODO
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.