Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
GetClusterID(ctx context.Context) uint64
AllocID(ctx context.Context) (uint64, error)
Bootstrap(ctx context.Context, store *metapb.Store, region *metapb.Region) error
PutStore(ctx context.Context, store *metapb.Store) error
StoreHeartbeat(ctx context.Context, stats *pdpb.StoreStats) error
RegionHeartbeat(ctx context.Context, region *core.RegionInfo) error
Close()
}
Client is a PD (Placement Driver) client. It should not be used after calling Close().
type ClusterInfo ¶
type ClusterInfo struct {
*core.RegionsInfo
Nodes map[uint64]*Node
// contains filtered or unexported fields
}
ClusterInfo records all cluster information.
func NewClusterInfo ¶
func NewClusterInfo(pdAddr string, conf *cases.Conf) (*ClusterInfo, error)
NewClusterInfo creates the initialized cluster with config.
func (*ClusterInfo) AddTask ¶
func (c *ClusterInfo) AddTask(task Task)
AddTask adds task in specify node.
func (*ClusterInfo) GetBootstrapInfo ¶
GetBootstrapInfo returns a valid bootstrap store and region.
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver promotes the cluster status change.
Click to show internal directories.
Click to hide internal directories.