mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 04:04:21 +01:00
* add "block" scheduler type + sweep integration test * increase timeout in integrationtests * remove config logs * rename scheduler package name * rename package * rename packages
19 lines
261 B
Go
19 lines
261 B
Go
package ports
|
|
|
|
type TimeUnit int
|
|
|
|
const (
|
|
UnixTime TimeUnit = iota
|
|
BlockHeight
|
|
)
|
|
|
|
type SchedulerService interface {
|
|
Start()
|
|
Stop()
|
|
|
|
Unit() TimeUnit
|
|
AddNow(lifetime int64) int64
|
|
AfterNow(expiry int64) bool
|
|
ScheduleTaskOnce(at int64, task func()) error
|
|
}
|