Documentation ¶ Overview ¶ Package schedulers 实现了部分时间调度的算法 Index ¶ type Scheduler Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Scheduler ¶ type Scheduler interface { // Next 生成相对于 last 的下一次时间。 // // 如果返回的时间值,已经小于当前时间,那么该任务会被安排在最先执行。 // 如果返回是零值,表示该调度已经终结,不会再执行该任务,后续也都应返回零值。 // // 传递相同的 last 参数,其返回值应该也相同,或是返回一个零值。 Next(last time.Time) time.Time } Scheduler 时间调度算法需要实现的接口 Source Files ¶ View all Source files scheduler.go Directories ¶ Show internal Expand all Path Synopsis at Package at 提供类似于 at 指令的定时器 Package at 提供类似于 at 指令的定时器 cron Package cron 实现了 cron 表达式的 Scheduler 接口 Package cron 实现了 cron 表达式的 Scheduler 接口 ticker Package ticker 时间段固定的定时器 Package ticker 时间段固定的定时器 Click to show internal directories. Click to hide internal directories.