Documentation ¶
Index ¶
- Variables
- func GetMembers(etcdClient *clientv3.Client) ([]*schedulerpb.Member, error)
- func InitHTTPClient(svr *Server) error
- func LogPDInfo()
- func NewTestMultiConfig(c *check.C, count int) []*config.Config
- func NewTestServer(c *check.C) (*Server, CleanupFunc, error)
- func NewTestSingleConfig(c *check.C) *config.Config
- func PrintConfigCheckMsg(cfg *config.Config)
- func PrintPDInfo()
- type CleanupFunc
- type ClusterStatus
- type RaftCluster
- func (c *RaftCluster) AllocPeer(storeID uint64) (*metapb.Peer, error)
- func (c *RaftCluster) AttachAvailableFunc(storeID uint64, f func() bool)
- func (c *RaftCluster) BlockStore(storeID uint64) error
- func (c *RaftCluster) BuryStore(storeID uint64, force bool) error
- func (c *RaftCluster) DropCacheRegion(id uint64)
- func (c *RaftCluster) GetAverageRegionSize() int64
- func (c *RaftCluster) GetConfig() *metapb.Cluster
- func (c *RaftCluster) GetCoordinator() *coordinator
- func (c *RaftCluster) GetFollowerStores(region *core.RegionInfo) []*core.StoreInfo
- func (c *RaftCluster) GetFollowersWithLock(storeID uint64, callback func(core.RegionsContainer))
- func (c *RaftCluster) GetHeartbeatStreams() *heartbeatStreams
- func (c *RaftCluster) GetLeaderScheduleLimit() uint64
- func (c *RaftCluster) GetLeaderStore(region *core.RegionInfo) *core.StoreInfo
- func (c *RaftCluster) GetLeadersWithLock(storeID uint64, callback func(core.RegionsContainer))
- func (c *RaftCluster) GetMaxReplicas() int
- func (c *RaftCluster) GetMaxStoreDownTime() time.Duration
- func (c *RaftCluster) GetMetaRegions() []*metapb.Region
- func (c *RaftCluster) GetMetaStores() []*metapb.Store
- func (c *RaftCluster) GetOperatorController() *schedule.OperatorController
- func (c *RaftCluster) GetOpt() *config.ScheduleOption
- func (c *RaftCluster) GetPatrolRegionInterval() time.Duration
- func (c *RaftCluster) GetPendingRegionsWithLock(storeID uint64, callback func(core.RegionsContainer))
- func (c *RaftCluster) GetPrevRegionByKey(regionKey []byte) (*metapb.Region, *metapb.Peer)
- func (c *RaftCluster) GetRegion(regionID uint64) *core.RegionInfo
- func (c *RaftCluster) GetRegionByID(regionID uint64) (*metapb.Region, *metapb.Peer)
- func (c *RaftCluster) GetRegionByKey(regionKey []byte) (*metapb.Region, *metapb.Peer)
- func (c *RaftCluster) GetRegionCount() int
- func (c *RaftCluster) GetRegionInfoByKey(regionKey []byte) *core.RegionInfo
- func (c *RaftCluster) GetRegionScheduleLimit() uint64
- func (c *RaftCluster) GetRegionStores(region *core.RegionInfo) []*core.StoreInfo
- func (c *RaftCluster) GetRegions() []*core.RegionInfo
- func (c *RaftCluster) GetReplicaScheduleLimit() uint64
- func (c *RaftCluster) GetStore(storeID uint64) *core.StoreInfo
- func (c *RaftCluster) GetStoreRegionCount(storeID uint64) int
- func (c *RaftCluster) GetStoreRegions(storeID uint64) []*core.RegionInfo
- func (c *RaftCluster) GetStores() []*core.StoreInfo
- func (c *RaftCluster) HandleRegionHeartbeat(region *core.RegionInfo) error
- func (c *RaftCluster) RandFollowerRegion(storeID uint64, opts ...core.RegionOption) *core.RegionInfo
- func (c *RaftCluster) RandLeaderRegion(storeID uint64, opts ...core.RegionOption) *core.RegionInfo
- func (c *RaftCluster) RandPendingRegion(storeID uint64, opts ...core.RegionOption) *core.RegionInfo
- func (c *RaftCluster) RemoveStore(storeID uint64) error
- func (c *RaftCluster) RemoveTombStoneRecords() error
- func (c *RaftCluster) ScanRegions(startKey, endKey []byte, limit int) []*core.RegionInfo
- func (c *RaftCluster) SetStoreState(storeID uint64, state metapb.StoreState) error
- func (c *RaftCluster) SetStoreWeight(storeID uint64, leaderWeight, regionWeight float64) error
- func (c *RaftCluster) UnblockStore(storeID uint64)
- type Server
- func (s *Server) AllocID(ctx context.Context, request *schedulerpb.AllocIDRequest) (*schedulerpb.AllocIDResponse, error)
- func (s *Server) AskSplit(ctx context.Context, request *schedulerpb.AskSplitRequest) (*schedulerpb.AskSplitResponse, error)
- func (s *Server) Bootstrap(ctx context.Context, request *schedulerpb.BootstrapRequest) (*schedulerpb.BootstrapResponse, error)
- func (s *Server) CheckHealth(members []*schedulerpb.Member) map[uint64]*schedulerpb.Member
- func (s *Server) Close()
- func (s *Server) ClusterID() uint64
- func (s *Server) Context() context.Context
- func (s *Server) GetAddr() string
- func (s *Server) GetAllStores(ctx context.Context, request *schedulerpb.GetAllStoresRequest) (*schedulerpb.GetAllStoresResponse, error)
- func (s *Server) GetAllocator() *id.AllocatorImpl
- func (s *Server) GetClient() *clientv3.Client
- func (s *Server) GetCluster() *metapb.Cluster
- func (s *Server) GetClusterConfig(ctx context.Context, request *schedulerpb.GetClusterConfigRequest) (*schedulerpb.GetClusterConfigResponse, error)
- func (s *Server) GetClusterStatus() (*ClusterStatus, error)
- func (s *Server) GetConfig() *config.Config
- func (s *Server) GetEndpoints() []string
- func (s *Server) GetGCSafePoint(ctx context.Context, request *schedulerpb.GetGCSafePointRequest) (*schedulerpb.GetGCSafePointResponse, error)
- func (s *Server) GetLeader() *schedulerpb.Member
- func (s *Server) GetMember() *member.Member
- func (s *Server) GetMemberInfo() *schedulerpb.Member
- func (s *Server) GetMembers(context.Context, *schedulerpb.GetMembersRequest) (*schedulerpb.GetMembersResponse, error)
- func (s *Server) GetMetaRegions() []*metapb.Region
- func (s *Server) GetOperator(ctx context.Context, request *schedulerpb.GetOperatorRequest) (*schedulerpb.GetOperatorResponse, error)
- func (s *Server) GetPrevRegion(ctx context.Context, request *schedulerpb.GetRegionRequest) (*schedulerpb.GetRegionResponse, error)
- func (s *Server) GetRaftCluster() *RaftCluster
- func (s *Server) GetRegion(ctx context.Context, request *schedulerpb.GetRegionRequest) (*schedulerpb.GetRegionResponse, error)
- func (s *Server) GetRegionByID(ctx context.Context, request *schedulerpb.GetRegionByIDRequest) (*schedulerpb.GetRegionResponse, error)
- func (s *Server) GetReplicationConfig() *config.ReplicationConfig
- func (s *Server) GetScheduleConfig() *config.ScheduleConfig
- func (s *Server) GetSecurityConfig() *config.SecurityConfig
- func (s *Server) GetStorage() *core.Storage
- func (s *Server) GetStore(ctx context.Context, request *schedulerpb.GetStoreRequest) (*schedulerpb.GetStoreResponse, error)
- func (s *Server) IsBootstrapped(ctx context.Context, request *schedulerpb.IsBootstrappedRequest) (*schedulerpb.IsBootstrappedResponse, error)
- func (s *Server) IsClosed() bool
- func (s *Server) Name() string
- func (s *Server) PutClusterConfig(ctx context.Context, request *schedulerpb.PutClusterConfigRequest) (*schedulerpb.PutClusterConfigResponse, error)
- func (s *Server) PutStore(ctx context.Context, request *schedulerpb.PutStoreRequest) (*schedulerpb.PutStoreResponse, error)
- func (s *Server) RegionHeartbeat(stream schedulerpb.Scheduler_RegionHeartbeatServer) error
- func (s *Server) ReportSplit(ctx context.Context, request *schedulerpb.ReportSplitRequest) (*schedulerpb.ReportSplitResponse, error)
- func (s *Server) Run(ctx context.Context) error
- func (s *Server) ScanRegions(ctx context.Context, request *schedulerpb.ScanRegionsRequest) (*schedulerpb.ScanRegionsResponse, error)
- func (s *Server) ScatterRegion(ctx context.Context, request *schedulerpb.ScatterRegionRequest) (*schedulerpb.ScatterRegionResponse, error)
- func (s *Server) SetLogLevel(level string)
- func (s *Server) SetReplicationConfig(cfg config.ReplicationConfig) error
- func (s *Server) StoreHeartbeat(ctx context.Context, request *schedulerpb.StoreHeartbeatRequest) (*schedulerpb.StoreHeartbeatResponse, error)
- func (s *Server) Tso(stream schedulerpb.Scheduler_TsoServer) error
- func (s *Server) UpdateGCSafePoint(ctx context.Context, request *schedulerpb.UpdateGCSafePointRequest) (*schedulerpb.UpdateGCSafePointResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotBootstrapped is error info for cluster not bootstrapped. ErrNotBootstrapped = errors.New("TiKV cluster not bootstrapped, please start TiKV first") // ErrServerNotStarted is error info for server not started. ErrServerNotStarted = errors.New("The server has not been started") // ErrOperatorNotFound is error info for operator not found. ErrOperatorNotFound = errors.New("operator not found") // ErrAddOperator is error info for already have an operator when adding operator. ErrAddOperator = errors.New("failed to add operator, maybe already have one") // ErrRegionNotAdjacent is error info for region not adjacent. ErrRegionNotAdjacent = errors.New("two regions are not adjacent") // ErrRegionNotFound is error info for region not found. ErrRegionNotFound = func(regionID uint64) error { return errors.Errorf("region %v not found", regionID) } // ErrRegionAbnormalPeer is error info for region has abonormal peer. ErrRegionAbnormalPeer = func(regionID uint64) error { return errors.Errorf("region %v has abnormal peer", regionID) } // ErrRegionIsStale is error info for region is stale. ErrRegionIsStale = func(region *metapb.Region, origin *metapb.Region) error { return errors.Errorf("region is stale: region %v origin %v", region, origin) } // ErrStoreNotFound is error info for store not found. ErrStoreNotFound = func(storeID uint64) error { return errors.Errorf("store %v not found", storeID) } )
var ( PDReleaseVersion = "None" PDBuildTS = "None" PDGitHash = "None" PDGitBranch = "None" )
Version information.
var EnableZap = false
EnableZap enable the zap logger in embed etcd.
Functions ¶
func GetMembers ¶
func GetMembers(etcdClient *clientv3.Client) ([]*schedulerpb.Member, error)
GetMembers return a slice of Members.
func NewTestMultiConfig ¶
NewTestMultiConfig is only for test to create multiple pd configurations. Because PD client also needs this, so export here.
func NewTestServer ¶
func NewTestServer(c *check.C) (*Server, CleanupFunc, error)
NewTestServer creates a pd server for testing.
func NewTestSingleConfig ¶
NewTestSingleConfig is only for test to create one pd. Because PD client also needs this, so export here.
func PrintConfigCheckMsg ¶
PrintConfigCheckMsg prints the message about configuration checks.
func PrintPDInfo ¶
func PrintPDInfo()
PrintPDInfo prints the PD version information without log info.
Types ¶
type CleanupFunc ¶
type CleanupFunc func()
CleanupFunc closes test pd server(s) and deletes any files left behind.
type ClusterStatus ¶
type ClusterStatus struct { RaftBootstrapTime time.Time `json:"raft_bootstrap_time,omitempty"` IsInitialized bool `json:"is_initialized"` }
ClusterStatus saves some state information
type RaftCluster ¶
RaftCluster is used for cluster config management. Raft cluster key format: cluster 1 -> /1/raft, value is metapb.Cluster cluster 2 -> /2/raft For cluster 1 store 1 -> /1/raft/s/1, value is metapb.Store region 1 -> /1/raft/r/1, value is metapb.Region
func (*RaftCluster) AllocPeer ¶
func (c *RaftCluster) AllocPeer(storeID uint64) (*metapb.Peer, error)
AllocPeer allocs a new peer on a store.
func (*RaftCluster) AttachAvailableFunc ¶
func (c *RaftCluster) AttachAvailableFunc(storeID uint64, f func() bool)
AttachAvailableFunc attaches an available function to a specific store.
func (*RaftCluster) BlockStore ¶
func (c *RaftCluster) BlockStore(storeID uint64) error
BlockStore stops balancer from selecting the store.
func (*RaftCluster) BuryStore ¶
func (c *RaftCluster) BuryStore(storeID uint64, force bool) error
BuryStore marks a store as tombstone in cluster. State transition: Case 1: Up -> Tombstone (if force is true); Case 2: Offline -> Tombstone.
func (*RaftCluster) DropCacheRegion ¶
func (c *RaftCluster) DropCacheRegion(id uint64)
DropCacheRegion removes a region from the cache.
func (*RaftCluster) GetAverageRegionSize ¶
func (c *RaftCluster) GetAverageRegionSize() int64
GetAverageRegionSize returns the average region approximate size.
func (*RaftCluster) GetConfig ¶
func (c *RaftCluster) GetConfig() *metapb.Cluster
GetConfig gets config from cluster.
func (*RaftCluster) GetCoordinator ¶
func (c *RaftCluster) GetCoordinator() *coordinator
GetCoordinator returns the coordinator.
func (*RaftCluster) GetFollowerStores ¶
func (c *RaftCluster) GetFollowerStores(region *core.RegionInfo) []*core.StoreInfo
GetFollowerStores returns all stores that contains the region's follower peer.
func (*RaftCluster) GetFollowersWithLock ¶
func (c *RaftCluster) GetFollowersWithLock(storeID uint64, callback func(core.RegionsContainer))
GetFollowersWithLock return leaders subtree by storeID
func (*RaftCluster) GetHeartbeatStreams ¶
func (c *RaftCluster) GetHeartbeatStreams() *heartbeatStreams
GetHeartbeatStreams returns the heartbeat streams.
func (*RaftCluster) GetLeaderScheduleLimit ¶
func (c *RaftCluster) GetLeaderScheduleLimit() uint64
GetLeaderScheduleLimit returns the limit for leader schedule.
func (*RaftCluster) GetLeaderStore ¶
func (c *RaftCluster) GetLeaderStore(region *core.RegionInfo) *core.StoreInfo
GetLeaderStore returns all stores that contains the region's leader peer.
func (*RaftCluster) GetLeadersWithLock ¶
func (c *RaftCluster) GetLeadersWithLock(storeID uint64, callback func(core.RegionsContainer))
GetLeadersWithLock return leaders subtree by storeID
func (*RaftCluster) GetMaxReplicas ¶
func (c *RaftCluster) GetMaxReplicas() int
GetMaxReplicas returns the number of replicas.
func (*RaftCluster) GetMaxStoreDownTime ¶
func (c *RaftCluster) GetMaxStoreDownTime() time.Duration
GetMaxStoreDownTime returns the max down time of a store.
func (*RaftCluster) GetMetaRegions ¶
func (c *RaftCluster) GetMetaRegions() []*metapb.Region
GetMetaRegions gets regions from cluster.
func (*RaftCluster) GetMetaStores ¶
func (c *RaftCluster) GetMetaStores() []*metapb.Store
GetMetaStores gets stores from cluster.
func (*RaftCluster) GetOperatorController ¶
func (c *RaftCluster) GetOperatorController() *schedule.OperatorController
GetOperatorController returns the operator controller.
func (*RaftCluster) GetOpt ¶
func (c *RaftCluster) GetOpt() *config.ScheduleOption
GetOpt returns the scheduling options.
func (*RaftCluster) GetPatrolRegionInterval ¶
func (c *RaftCluster) GetPatrolRegionInterval() time.Duration
GetPatrolRegionInterval returns the interval of patroling region.
func (*RaftCluster) GetPendingRegionsWithLock ¶
func (c *RaftCluster) GetPendingRegionsWithLock(storeID uint64, callback func(core.RegionsContainer))
GetPendingRegionsWithLock return pending regions subtree by storeID
func (*RaftCluster) GetPrevRegionByKey ¶
GetPrevRegionByKey gets previous region and leader peer by the region key from cluster.
func (*RaftCluster) GetRegion ¶
func (c *RaftCluster) GetRegion(regionID uint64) *core.RegionInfo
GetRegion searches for a region by ID.
func (*RaftCluster) GetRegionByID ¶
GetRegionByID gets region and leader peer by regionID from cluster.
func (*RaftCluster) GetRegionByKey ¶
GetRegionByKey gets region and leader peer by region key from cluster.
func (*RaftCluster) GetRegionCount ¶
func (c *RaftCluster) GetRegionCount() int
GetRegionCount returns total count of regions
func (*RaftCluster) GetRegionInfoByKey ¶
func (c *RaftCluster) GetRegionInfoByKey(regionKey []byte) *core.RegionInfo
GetRegionInfoByKey gets regionInfo by region key from cluster.
func (*RaftCluster) GetRegionScheduleLimit ¶
func (c *RaftCluster) GetRegionScheduleLimit() uint64
GetRegionScheduleLimit returns the limit for region schedule.
func (*RaftCluster) GetRegionStores ¶
func (c *RaftCluster) GetRegionStores(region *core.RegionInfo) []*core.StoreInfo
GetRegionStores returns all stores that contains the region's peer.
func (*RaftCluster) GetRegions ¶
func (c *RaftCluster) GetRegions() []*core.RegionInfo
GetRegions returns all regions' information in detail.
func (*RaftCluster) GetReplicaScheduleLimit ¶
func (c *RaftCluster) GetReplicaScheduleLimit() uint64
GetReplicaScheduleLimit returns the limit for replica schedule.
func (*RaftCluster) GetStore ¶
func (c *RaftCluster) GetStore(storeID uint64) *core.StoreInfo
GetStore gets store from cluster.
func (*RaftCluster) GetStoreRegionCount ¶
func (c *RaftCluster) GetStoreRegionCount(storeID uint64) int
GetStoreRegionCount returns the number of regions for a given store.
func (*RaftCluster) GetStoreRegions ¶
func (c *RaftCluster) GetStoreRegions(storeID uint64) []*core.RegionInfo
GetStoreRegions returns all regions' information with a given storeID.
func (*RaftCluster) GetStores ¶
func (c *RaftCluster) GetStores() []*core.StoreInfo
GetStores returns all stores in the cluster.
func (*RaftCluster) HandleRegionHeartbeat ¶
func (c *RaftCluster) HandleRegionHeartbeat(region *core.RegionInfo) error
HandleRegionHeartbeat processes RegionInfo reports from client.
func (*RaftCluster) RandFollowerRegion ¶
func (c *RaftCluster) RandFollowerRegion(storeID uint64, opts ...core.RegionOption) *core.RegionInfo
RandFollowerRegion returns a random region that has a follower on the store.
func (*RaftCluster) RandLeaderRegion ¶
func (c *RaftCluster) RandLeaderRegion(storeID uint64, opts ...core.RegionOption) *core.RegionInfo
RandLeaderRegion returns a random region that has leader on the store.
func (*RaftCluster) RandPendingRegion ¶
func (c *RaftCluster) RandPendingRegion(storeID uint64, opts ...core.RegionOption) *core.RegionInfo
RandPendingRegion returns a random region that has a pending peer on the store.
func (*RaftCluster) RemoveStore ¶
func (c *RaftCluster) RemoveStore(storeID uint64) error
RemoveStore marks a store as offline in cluster. State transition: Up -> Offline.
func (*RaftCluster) RemoveTombStoneRecords ¶
func (c *RaftCluster) RemoveTombStoneRecords() error
RemoveTombStoneRecords removes the tombStone Records.
func (*RaftCluster) ScanRegions ¶
func (c *RaftCluster) ScanRegions(startKey, endKey []byte, limit int) []*core.RegionInfo
ScanRegions scans region with start key, until the region contains endKey, or total number greater than limit.
func (*RaftCluster) SetStoreState ¶
func (c *RaftCluster) SetStoreState(storeID uint64, state metapb.StoreState) error
SetStoreState sets up a store's state.
func (*RaftCluster) SetStoreWeight ¶
func (c *RaftCluster) SetStoreWeight(storeID uint64, leaderWeight, regionWeight float64) error
SetStoreWeight sets up a store's leader/region balance weight.
func (*RaftCluster) UnblockStore ¶
func (c *RaftCluster) UnblockStore(storeID uint64)
UnblockStore allows balancer to select the store.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the pd server.
func CreateServer ¶
CreateServer creates the UNINITIALIZED pd server with given configuration.
func (*Server) AllocID ¶
func (s *Server) AllocID(ctx context.Context, request *schedulerpb.AllocIDRequest) (*schedulerpb.AllocIDResponse, error)
AllocID implements gRPC PDServer.
func (*Server) AskSplit ¶
func (s *Server) AskSplit(ctx context.Context, request *schedulerpb.AskSplitRequest) (*schedulerpb.AskSplitResponse, error)
AskSplit implements gRPC PDServer.
func (*Server) Bootstrap ¶
func (s *Server) Bootstrap(ctx context.Context, request *schedulerpb.BootstrapRequest) (*schedulerpb.BootstrapResponse, error)
Bootstrap implements gRPC PDServer.
func (*Server) CheckHealth ¶
func (s *Server) CheckHealth(members []*schedulerpb.Member) map[uint64]*schedulerpb.Member
CheckHealth checks if members are healthy.
func (*Server) GetAllStores ¶
func (s *Server) GetAllStores(ctx context.Context, request *schedulerpb.GetAllStoresRequest) (*schedulerpb.GetAllStoresResponse, error)
GetAllStores implements gRPC PDServer.
func (*Server) GetAllocator ¶
func (s *Server) GetAllocator() *id.AllocatorImpl
GetAllocator returns the ID allocator of server.
func (*Server) GetClusterConfig ¶
func (s *Server) GetClusterConfig(ctx context.Context, request *schedulerpb.GetClusterConfigRequest) (*schedulerpb.GetClusterConfigResponse, error)
GetClusterConfig implements gRPC PDServer.
func (*Server) GetClusterStatus ¶
func (s *Server) GetClusterStatus() (*ClusterStatus, error)
GetClusterStatus gets cluster status.
func (*Server) GetEndpoints ¶
GetEndpoints returns the etcd endpoints for outer use.
func (*Server) GetGCSafePoint ¶
func (s *Server) GetGCSafePoint(ctx context.Context, request *schedulerpb.GetGCSafePointRequest) (*schedulerpb.GetGCSafePointResponse, error)
GetGCSafePoint implements gRPC PDServer.
func (*Server) GetLeader ¶
func (s *Server) GetLeader() *schedulerpb.Member
GetLeader returns leader of etcd.
func (*Server) GetMemberInfo ¶
func (s *Server) GetMemberInfo() *schedulerpb.Member
GetMemberInfo returns the server member information.
func (*Server) GetMembers ¶
func (s *Server) GetMembers(context.Context, *schedulerpb.GetMembersRequest) (*schedulerpb.GetMembersResponse, error)
GetMembers implements gRPC PDServer.
func (*Server) GetMetaRegions ¶
GetMetaRegions gets meta regions from cluster.
func (*Server) GetOperator ¶
func (s *Server) GetOperator(ctx context.Context, request *schedulerpb.GetOperatorRequest) (*schedulerpb.GetOperatorResponse, error)
GetOperator gets information about the operator belonging to the speicfy region.
func (*Server) GetPrevRegion ¶
func (s *Server) GetPrevRegion(ctx context.Context, request *schedulerpb.GetRegionRequest) (*schedulerpb.GetRegionResponse, error)
GetPrevRegion implements gRPC PDServer
func (*Server) GetRaftCluster ¶
func (s *Server) GetRaftCluster() *RaftCluster
GetRaftCluster gets Raft cluster. If cluster has not been bootstrapped, return nil.
func (*Server) GetRegion ¶
func (s *Server) GetRegion(ctx context.Context, request *schedulerpb.GetRegionRequest) (*schedulerpb.GetRegionResponse, error)
GetRegion implements gRPC PDServer.
func (*Server) GetRegionByID ¶
func (s *Server) GetRegionByID(ctx context.Context, request *schedulerpb.GetRegionByIDRequest) (*schedulerpb.GetRegionResponse, error)
GetRegionByID implements gRPC PDServer.
func (*Server) GetReplicationConfig ¶
func (s *Server) GetReplicationConfig() *config.ReplicationConfig
GetReplicationConfig get the replication config.
func (*Server) GetScheduleConfig ¶
func (s *Server) GetScheduleConfig() *config.ScheduleConfig
GetScheduleConfig gets the balance config information.
func (*Server) GetSecurityConfig ¶
func (s *Server) GetSecurityConfig() *config.SecurityConfig
GetSecurityConfig get the security config.
func (*Server) GetStorage ¶
GetStorage returns the backend storage of server.
func (*Server) GetStore ¶
func (s *Server) GetStore(ctx context.Context, request *schedulerpb.GetStoreRequest) (*schedulerpb.GetStoreResponse, error)
GetStore implements gRPC PDServer.
func (*Server) IsBootstrapped ¶
func (s *Server) IsBootstrapped(ctx context.Context, request *schedulerpb.IsBootstrappedRequest) (*schedulerpb.IsBootstrappedResponse, error)
IsBootstrapped implements gRPC PDServer.
func (*Server) PutClusterConfig ¶
func (s *Server) PutClusterConfig(ctx context.Context, request *schedulerpb.PutClusterConfigRequest) (*schedulerpb.PutClusterConfigResponse, error)
PutClusterConfig implements gRPC PDServer.
func (*Server) PutStore ¶
func (s *Server) PutStore(ctx context.Context, request *schedulerpb.PutStoreRequest) (*schedulerpb.PutStoreResponse, error)
PutStore implements gRPC PDServer.
func (*Server) RegionHeartbeat ¶
func (s *Server) RegionHeartbeat(stream schedulerpb.Scheduler_RegionHeartbeatServer) error
RegionHeartbeat implements gRPC PDServer.
func (*Server) ReportSplit ¶
func (s *Server) ReportSplit(ctx context.Context, request *schedulerpb.ReportSplitRequest) (*schedulerpb.ReportSplitResponse, error)
ReportSplit implements gRPC PDServer.
func (*Server) ScanRegions ¶
func (s *Server) ScanRegions(ctx context.Context, request *schedulerpb.ScanRegionsRequest) (*schedulerpb.ScanRegionsResponse, error)
ScanRegions implements gRPC PDServer.
func (*Server) ScatterRegion ¶
func (s *Server) ScatterRegion(ctx context.Context, request *schedulerpb.ScatterRegionRequest) (*schedulerpb.ScatterRegionResponse, error)
ScatterRegion implements gRPC PDServer.
func (*Server) SetReplicationConfig ¶
func (s *Server) SetReplicationConfig(cfg config.ReplicationConfig) error
SetReplicationConfig sets the replication config.
func (*Server) StoreHeartbeat ¶
func (s *Server) StoreHeartbeat(ctx context.Context, request *schedulerpb.StoreHeartbeatRequest) (*schedulerpb.StoreHeartbeatResponse, error)
StoreHeartbeat implements gRPC PDServer.
func (*Server) Tso ¶
func (s *Server) Tso(stream schedulerpb.Scheduler_TsoServer) error
Tso implements gRPC PDServer.
func (*Server) UpdateGCSafePoint ¶
func (s *Server) UpdateGCSafePoint(ctx context.Context, request *schedulerpb.UpdateGCSafePointRequest) (*schedulerpb.UpdateGCSafePointResponse, error)
UpdateGCSafePoint implements gRPC PDServer.