mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
21 lines
407 B
Go
21 lines
407 B
Go
package scheduler
|
|
|
|
import (
|
|
"github.com/crawlab-team/crawlab/core/interfaces"
|
|
"time"
|
|
)
|
|
|
|
type Option func(svc interfaces.TaskSchedulerService)
|
|
|
|
func WithConfigPath(path string) Option {
|
|
return func(svc interfaces.TaskSchedulerService) {
|
|
svc.SetConfigPath(path)
|
|
}
|
|
}
|
|
|
|
func WithInterval(interval time.Duration) Option {
|
|
return func(svc interfaces.TaskSchedulerService) {
|
|
svc.SetInterval(interval)
|
|
}
|
|
}
|