reuse the default client

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2021-02-18 13:06:36 +00:00
parent 7736d26e0c
commit d4585933ac

View File

@@ -33,7 +33,7 @@ func NewService(opts ...Option) Service {
// first add a server because it will reset any options
micro.Server(mgrpcs.NewServer()),
// also add a client that can be used after initializing the service
micro.Client(mgrpcc.NewClient()),
micro.Client(DefaultClient),
micro.Address(sopts.Address),
micro.Name(strings.Join([]string{sopts.Namespace, sopts.Name}, ".")),
micro.Version(sopts.Version),