func NewSchedulerCommand() *cobra.Command {
	c := &cobra.Command{
		Use:   "scheduler",
		Short: "scheduler commands",
	}
	c.AddCommand(NewShowSchedulerCommand())
	c.AddCommand(NewAddSchedulerCommand())
	c.AddCommand(NewRemoveSchedulerCommand())
	c.AddCommand(NewPauseSchedulerCommand())
	c.AddCommand(NewResumeSchedulerCommand())
	c.AddCommand(NewConfigSchedulerCommand())
	return c
}
NewSchedulerCommand returns a scheduler command.
package command
import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"net/url"
	"path"
	"strconv"
	"strings"
	"github.com/pingcap/errors"
	"github.com/spf13/cobra"
	"github.com/tikv/pd/server/schedulers"
)
var (
	schedulersPrefix         = "pd/api/v1/schedulers"
	schedulerConfigPrefix    = "pd/api/v1/scheduler-config"
	evictLeaderSchedulerName = "evict-leader-scheduler"
	grantLeaderSchedulerName = "grant-leader-scheduler"
)