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
}
// Registrar returns registry.
func (a *App) Registrar() registry.Registrar {
// Registry returns registry.
func (a *App) Registry() registry.Registrar {
return a.opts.registrar
}

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

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

Loading…
Cancel
Save