mirror of
https://github.com/cubixle/l1.git
synced 2026-04-30 09:08:45 +01:00
updates
This commit is contained in:
@@ -11,9 +11,9 @@ func WithMaxConns(amount int) Opt {
|
||||
}
|
||||
}
|
||||
|
||||
func WithTimeout(s int) Opt {
|
||||
func WithTimeout(timeInSecs int) Opt {
|
||||
return func(r *Runner) {
|
||||
r.Timeout = s
|
||||
r.Timeout = time.Duration(timeInSecs) * time.Second
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,3 +22,21 @@ func WithRunTime(timeInSecs int) Opt {
|
||||
r.RunTime = time.Duration(timeInSecs) * time.Second
|
||||
}
|
||||
}
|
||||
|
||||
func WithMaxParrellConns(amount int) Opt {
|
||||
return func(r *Runner) {
|
||||
r.MaxParrellConnections = amount
|
||||
}
|
||||
}
|
||||
|
||||
func WithTarget(target string) Opt {
|
||||
return func(r *Runner) {
|
||||
r.Target = target
|
||||
}
|
||||
}
|
||||
|
||||
func WithRunFunc(f F) Opt {
|
||||
return func(r *Runner) {
|
||||
r.RunFunc = f
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user