opened
CheneyDing
<!--
Thank you for working on PD! Please read PD's [CONTRIBUTING](https://github.com/pingcap/pd/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.
-->

### What problem does this PR solve? <!--add the issue link with summary if it exists-->
https://github.com/pingcap/pd/issues/1787
proposal: pluggable PD scheduler
issue
created
lhy1024
would you like to address the problem that ci reported?
comment
created
lhy1024
/run-all-tests
comment
created
rleungx
Mostly looks good, but can we export `baseScheduler`? I think we don't need to implement `base_scheduler.go` when writing a scheduler plugin. Furthermore, the structure of the plugin directory can be simplified, such as:
```
.
└── scheduler_example
    ├── evict_leader.go
    └── Makefile
```
comment
created
rleungx
CI failed due to some unused functions:
```
plugin/scheduler_example/evict_leader.go:79:6: `SchedulerType` is unused (deadcode)
func SchedulerType() string {
     ^
plugin/scheduler_example/evict_leader.go:84:6: `SchedulerArgs` is unused (deadcode)
func SchedulerArgs() []string {
     ^
```
comment
created
CheneyDing
we need these two functions，because we need parameters to create the scheduler,
comment
created
rleungx
I think you can try it to disable warnings: https://github.com/golangci/golangci-lint#nolint
comment
created
nolouch
I will help to add an integration Testing after this PR. PTAL @rleungx @lhy1024
comment
created
rleungx
PTAL @shafreeck
comment
created
nolouch
/merge
comment
/run-all-tests
This message directly preceded comment from bot *sre-bot* by author *nolouch*:
/merge
This message directly preceded comment from bot *sre-bot* by author *nolouch*:
/merge