Allow setting of timeout for registry
This commit is contained in:
15
registry/options.go
Normal file
15
registry/options.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package registry
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Options struct {
|
||||
Timeout time.Duration
|
||||
}
|
||||
|
||||
func Timeout(t time.Duration) Option {
|
||||
return func(o *Options) {
|
||||
o.Timeout = t
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user