Documentation
¶
Index ¶
- type AssignShardScheduler
- type Manager
- type ManagerImpl
- func (m *ManagerImpl) ListScheduler() []Scheduler
- func (m *ManagerImpl) Scheduler(ctx context.Context, clusterSnapshot metadata.Snapshot) []ScheduleResult
- func (m *ManagerImpl) Start(ctx context.Context) error
- func (m *ManagerImpl) Stop(ctx context.Context) error
- func (m *ManagerImpl) UpdateEnableSchedule(_ context.Context, enableSchedule bool)
- type RebalancedShardScheduler
- type ReopenShardScheduler
- type ScheduleResult
- type Scheduler
- func NewAssignShardScheduler(factory *coordinator.Factory, nodePicker coordinator.NodePicker, ...) Scheduler
- func NewRebalancedShardScheduler(logger *zap.Logger, factory *coordinator.Factory, ...) Scheduler
- func NewStaticTopologyShardScheduler(factory *coordinator.Factory, nodePicker coordinator.NodePicker, ...) Scheduler
- type StaticTopologyShardScheduler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignShardScheduler ¶
type AssignShardScheduler struct {
// contains filtered or unexported fields
}
AssignShardScheduler used to assigning shards without nodes.
func (AssignShardScheduler) Schedule ¶
func (a AssignShardScheduler) Schedule(ctx context.Context, clusterSnapshot metadata.Snapshot) (ScheduleResult, error)
type Manager ¶
type Manager interface {
ListScheduler() []Scheduler
Start(ctx context.Context) error
Stop(ctx context.Context) error
UpdateEnableSchedule(ctx context.Context, enableSchedule bool)
// Scheduler will be called when received new heartbeat, every scheduler registered in schedulerManager will be called to generate procedures.
// Scheduler cloud be schedule with fix time interval or heartbeat.
Scheduler(ctx context.Context, clusterSnapshot metadata.Snapshot) []ScheduleResult
}
Manager used to manage schedulers, it will register all schedulers when it starts.
Each registered scheduler will generate procedures if the cluster topology matches the scheduling condition.
func NewManager ¶
type ManagerImpl ¶
type ManagerImpl struct {
// contains filtered or unexported fields
}
func (*ManagerImpl) ListScheduler ¶
func (m *ManagerImpl) ListScheduler() []Scheduler
func (*ManagerImpl) Scheduler ¶
func (m *ManagerImpl) Scheduler(ctx context.Context, clusterSnapshot metadata.Snapshot) []ScheduleResult
func (*ManagerImpl) UpdateEnableSchedule ¶
func (m *ManagerImpl) UpdateEnableSchedule(_ context.Context, enableSchedule bool)
type RebalancedShardScheduler ¶
type RebalancedShardScheduler struct {
// contains filtered or unexported fields
}
func (RebalancedShardScheduler) Schedule ¶
func (r RebalancedShardScheduler) Schedule(ctx context.Context, clusterSnapshot metadata.Snapshot) (ScheduleResult, error)
type ReopenShardScheduler ¶ added in v1.2.5
type ReopenShardScheduler struct {
// contains filtered or unexported fields
}
ReopenShardScheduler used to reopen shards in status PartitionOpen.
func NewReopenShardScheduler ¶ added in v1.2.5
func NewReopenShardScheduler(factory *coordinator.Factory, procedureExecutingBatchSize uint32) ReopenShardScheduler
func (ReopenShardScheduler) Schedule ¶ added in v1.2.5
func (r ReopenShardScheduler) Schedule(ctx context.Context, clusterSnapshot metadata.Snapshot) (ScheduleResult, error)
type ScheduleResult ¶
type Scheduler ¶
type Scheduler interface {
// Schedule will generate procedure based on current cluster snapshot, which will be submitted to ProcedureManager, and whether it is actually executed depends on the current state of ProcedureManager.
Schedule(ctx context.Context, clusterSnapshot metadata.Snapshot) (ScheduleResult, error)
}
func NewAssignShardScheduler ¶
func NewAssignShardScheduler(factory *coordinator.Factory, nodePicker coordinator.NodePicker, procedureExecutingBatchSize uint32) Scheduler
func NewRebalancedShardScheduler ¶
func NewRebalancedShardScheduler(logger *zap.Logger, factory *coordinator.Factory, nodePicker coordinator.NodePicker, procedureExecutingBatchSize uint32) Scheduler
func NewStaticTopologyShardScheduler ¶
func NewStaticTopologyShardScheduler(factory *coordinator.Factory, nodePicker coordinator.NodePicker, procedureExecutingBatchSize uint32) Scheduler
type StaticTopologyShardScheduler ¶
type StaticTopologyShardScheduler struct {
// contains filtered or unexported fields
}
func (*StaticTopologyShardScheduler) Schedule ¶
func (s *StaticTopologyShardScheduler) Schedule(ctx context.Context, clusterSnapshot metadata.Snapshot) (ScheduleResult, error)
Click to show internal directories.
Click to hide internal directories.