mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
21 lines
380 B
Go
21 lines
380 B
Go
package process
|
|
|
|
import (
|
|
"github.com/crawlab-team/crawlab/core/interfaces"
|
|
"time"
|
|
)
|
|
|
|
type DaemonOption func(d interfaces.ProcessDaemon)
|
|
|
|
func WithDaemonMaxErrors(maxErrors int) DaemonOption {
|
|
return func(d interfaces.ProcessDaemon) {
|
|
d.SetMaxErrors(maxErrors)
|
|
}
|
|
}
|
|
|
|
func WithExitTimeout(timeout time.Duration) DaemonOption {
|
|
return func(d interfaces.ProcessDaemon) {
|
|
|
|
}
|
|
}
|