Documentation
ΒΆ
Index ΒΆ
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
This section is empty.
Types ΒΆ
type Scheduler ΒΆ
type Scheduler struct {
DB *gorm.DB
WorkerEngine *worker.WorkerEngine
Ticker *time.Ticker
StopChan chan struct{}
// contains filtered or unexported fields
}
Scheduler manages periodic monitor polling and probe task dispatching.
func NewScheduler ΒΆ
func NewScheduler(database *gorm.DB, engine *worker.WorkerEngine) *Scheduler
NewScheduler initializes a new monitor check scheduler.
func (*Scheduler) RunCheckCycle ΒΆ
func (s *Scheduler) RunCheckCycle()
RunCheckCycle queries active monitors from DB and dispatches probe tasks.
func (*Scheduler) RunOnce ΒΆ
RunOnce executes a single check cycle synchronously (useful for tests).
Click to show internal directories.
Click to hide internal directories.