Documentation ¶
Index ¶
- func InitMetrics(registry *prometheus.Registry)
- type Manager
- func (sm *Manager) CleanMetrics()
- func (sm *Manager) CollectMetrics()
- func (sm *Manager) DrainCapture(target model.CaptureID) bool
- func (sm *Manager) DrainingTarget() model.CaptureID
- func (sm *Manager) MoveTable(span tablepb.Span, target model.CaptureID)
- func (sm *Manager) Rebalance()
- func (sm *Manager) Schedule(checkpointTs model.Ts, currentSpans []tablepb.Span, ...) []*replication.ScheduleTask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitMetrics ¶
func InitMetrics(registry *prometheus.Registry)
InitMetrics registers all metrics used in scheduler
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages schedulers and generates schedule tasks.
func NewSchedulerManager ¶
func NewSchedulerManager( changefeedID model.ChangeFeedID, cfg *config.SchedulerConfig, ) *Manager
NewSchedulerManager returns a new scheduler manager.
func (*Manager) CollectMetrics ¶
func (sm *Manager) CollectMetrics()
CollectMetrics collects metrics.
func (*Manager) DrainCapture ¶
DrainCapture drains all tables in the target capture.
func (*Manager) DrainingTarget ¶
DrainingTarget returns a capture id that is currently been draining.
func (*Manager) Schedule ¶
func (sm *Manager) Schedule( checkpointTs model.Ts, currentSpans []tablepb.Span, aliveCaptures map[model.CaptureID]*member.CaptureStatus, replications *spanz.BtreeMap[*replication.ReplicationSet], runTasking *spanz.BtreeMap[*replication.ScheduleTask], ) []*replication.ScheduleTask
Schedule generates schedule tasks based on the inputs.
Click to show internal directories.
Click to hide internal directories.