Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BootstrapCluster ¶
func BootstrapCluster(ctx context.Context, cli pdpb.PDClient, header *pdpb.RequestHeader, version string)
BootstrapCluster tries to bootstrap a cluster with the given header and version.
Types ¶
type Regions ¶
type Regions struct {
// Regions is the list of all regions to heartbeat.
Regions []*pdpb.RegionHeartbeatRequest
// AwakenRegions is the number of regions to awaken.
AwakenRegions atomic.Value
UpdateRound int
// contains filtered or unexported fields
}
Regions simulates all regions to heartbeat.
func NewRegions ¶
func NewRegions(regionCount, replicaCount, storeCount int, header *pdpb.RequestHeader) *Regions
NewRegions initializes the regions with the given region count and replica count.
func (*Regions) HandleRegionHeartbeat ¶
func (rs *Regions) HandleRegionHeartbeat(wg *sync.WaitGroup, stream pdpb.PD_RegionHeartbeatClient, storeID uint64, rep report.Report)
HandleRegionHeartbeat handles the region heartbeat for the given store.
Click to show internal directories.
Click to hide internal directories.