micro/registry/options.go

22 lines
314 B
Go
Raw Normal View History

2015-12-19 21:28:08 +03:00
package registry
import (
"time"
"golang.org/x/net/context"
2015-12-19 21:28:08 +03:00
)
type Options struct {
Timeout time.Duration
// Other options for implementations of the interface
// can be stored in a context
Context context.Context
2015-12-19 21:28:08 +03:00
}
func Timeout(t time.Duration) Option {
return func(o *Options) {
o.Timeout = t
}
}