fix registry option

pull/740/head
chenzhihui 4 years ago
parent b103c72192
commit b97c3c4160
  1. 4
      app.go
  2. 4
      options.go
  3. 4
      transport/grpc/client.go

@ -57,8 +57,8 @@ func (a *App) Server() []transport.Server {
return a.opts.servers return a.opts.servers
} }
// Registrar returns registry. // Registry returns registry.
func (a *App) Registrar() registry.Registrar { func (a *App) Registry() registry.Registrar {
return a.opts.registrar return a.opts.registrar
} }

@ -69,8 +69,8 @@ func Logger(logger log.Logger) Option {
return func(o *options) { o.logger = logger } return func(o *options) { o.logger = logger }
} }
// Registrar with service registry. // Registry with service registry.
func Registrar(r registry.Registrar) Option { func Registry(r registry.Registrar) Option {
return func(o *options) { o.registrar = r } return func(o *options) { o.registrar = r }
} }

@ -38,8 +38,8 @@ func WithMiddleware(m middleware.Middleware) ClientOption {
} }
} }
// WithDiscoverer with client registry. // WithRegistry with client registry.
func WithDiscoverer(d registry.Discoverer) ClientOption { func WithRegistry(d registry.Discoverer) ClientOption {
return func(o *clientOptions) { return func(o *clientOptions) {
o.discoverer = d o.discoverer = d
} }

Loading…
Cancel
Save