This commit is contained in:
cubixle
2021-07-24 21:09:32 +01:00
commit 645ff9d698
4 changed files with 49 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package l1
import "time"
// Runner
type Runner struct {
MaxConnections int
Timeout int
RunTime time.Duration
}
func NewRunner(opts ...Opt) {
r := &Runner{
RunTime: 60 * time.Second,
}
for _, o := range opts {
o(r)
}
}
// F defines the function type for runners.
type F func(url string) error