Versions in this module Expand all Collapse all v0 v0.1.0 Mar 12, 2021 Changes in this version + var ErrClosed = errors.New("client is closed") + var ErrTimeout = errors.New("rpc timeout") + func StartMonitor(ctx context.Context, now func() time.Time, systimeErrHandler func()) + type Client interface + AllocID func() (uint64, error) + AskBatchSplit func(res metadata.Resource, count uint32) ([]rpcpb.SplitID, error) + AskSplit func(res metadata.Resource) (rpcpb.SplitID, error) + Close func() error + ContainerHeartbeat func(hb rpcpb.ContainerHeartbeatReq) (rpcpb.ContainerHeartbeatRsp, error) + GetContainer func(containerID uint64) (metadata.Container, error) + GetResourceHeartbeatRspNotifier func() (chan rpcpb.ResourceHeartbeatRsp, error) + NewWatcher func(flag uint32) (Watcher, error) + ReportBatchSplit func(results ...metadata.Resource) error + ReportSplit func(left, right metadata.Resource) error + ResourceHeartbeat func(meta metadata.Resource, hb rpcpb.ResourceHeartbeatReq) error + func NewClient(adapter metadata.Adapter, opts ...Option) Client + type Option func(*options) + func WithLeaderGetter(value func() *metapb.Member) Option + func WithRPCTimeout(value time.Duration) Option + type Prophet interface + GetClient func() Client + GetClusterID func() uint64 + GetConfig func() *config.Config + GetLeader func() *metapb.Member + GetMember func() *member.Member + GetStorage func() storage.Storage + Start func() + Stop func() + func NewProphet(cfg *config.Config) Prophet + type Watcher interface + Close func() + GetNotify func() chan rpcpb.EventNotify