Strip namespace from router

This commit is contained in:
Asim Aslam 2020-04-08 15:39:01 +01:00
parent 2c1d1afd71
commit b2079669f7

View File

@ -7,10 +7,9 @@ import (
) )
type Options struct { type Options struct {
Namespace string Handler string
Handler string Registry registry.Registry
Registry registry.Registry Resolver resolver.Resolver
Resolver resolver.Resolver
} }
type Option func(o *Options) type Option func(o *Options)
@ -28,7 +27,6 @@ func NewOptions(opts ...Option) Options {
if options.Resolver == nil { if options.Resolver == nil {
options.Resolver = micro.NewResolver( options.Resolver = micro.NewResolver(
resolver.WithHandler(options.Handler), resolver.WithHandler(options.Handler),
resolver.WithNamespace(options.Namespace),
) )
} }
@ -41,12 +39,6 @@ func WithHandler(h string) Option {
} }
} }
func WithNamespace(ns string) Option {
return func(o *Options) {
o.Namespace = ns
}
}
func WithRegistry(r registry.Registry) Option { func WithRegistry(r registry.Registry) Option {
return func(o *Options) { return func(o *Options) {
o.Registry = r o.Registry = r