1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-18 08:26:38 +02:00
go-micro/api/resolver/options.go

25 lines
452 B
Go
Raw Normal View History

2019-06-03 19:44:43 +02:00
package resolver
// NewOptions returns new initialised options
func NewOptions(opts ...Option) Options {
var options Options
for _, o := range opts {
o(&options)
}
return options
}
// WithHandler sets the handler being used
func WithHandler(h string) Option {
return func(o *Options) {
o.Handler = h
}
}
// WithNamespace sets the namespace being used
func WithNamespace(n string) Option {
return func(o *Options) {
o.Namespace = n
}
}