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) (*pdpb.BootstrapResponse, error) IsBootstrapped(ctx context.Context) (bool, error) PutStore(ctx context.Context, store *metapb.Store) error GetStore(ctx context.Context, storeID uint64) (*metapb.Store, error) GetRegion(ctx context.Context, key []byte, opts ...pd.GetRegionOption) (*pd.Region, error) GetRegionByID(ctx context.Context, regionID uint64, opts ...pd.GetRegionOption) (*pd.Region, error) ReportRegion(*pdpb.RegionHeartbeatRequest) AskSplit(ctx context.Context, region *metapb.Region) (*pdpb.AskSplitResponse, error) AskBatchSplit(ctx context.Context, region *metapb.Region, count int) (*pdpb.AskBatchSplitResponse, error) ReportBatchSplit(ctx context.Context, regions []*metapb.Region) error GetGCSafePoint(ctx context.Context) (uint64, error) StoreHeartbeat(ctx context.Context, stats *pdpb.StoreStats) error GetTS(ctx context.Context) (int64, int64, error) SetRegionHeartbeatResponseHandler(h func(*pdpb.RegionHeartbeatResponse)) Close() }
Client is a PD (Placement Driver) client. It should not be used after calling Close().
Click to show internal directories.
Click to hide internal directories.