Files
crawlab/core/ds/options.go
2024-06-14 15:42:50 +08:00

15 lines
316 B
Go

package ds
import (
"github.com/crawlab-team/crawlab/core/interfaces"
"time"
)
type DataSourceServiceOption func(svc interfaces.DataSourceService)
func WithMonitorInterval(duration time.Duration) DataSourceServiceOption {
return func(svc interfaces.DataSourceService) {
svc.SetMonitorInterval(duration)
}
}