From ca791d7e8d8f2363e8a9dcfe76fe811cfae6e476 Mon Sep 17 00:00:00 2001 From: Ben Toogood Date: Wed, 13 May 2020 18:47:53 +0100 Subject: [PATCH 1/2] Disable Clients --- service.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/service.go b/service.go index 749f53ae..84347084 100644 --- a/service.go +++ b/service.go @@ -16,8 +16,6 @@ import ( "github.com/micro/go-micro/v2/debug/trace" "github.com/micro/go-micro/v2/logger" "github.com/micro/go-micro/v2/plugin" - registrySrv "github.com/micro/go-micro/v2/registry/service" - "github.com/micro/go-micro/v2/runtime" "github.com/micro/go-micro/v2/server" "github.com/micro/go-micro/v2/store" signalutil "github.com/micro/go-micro/v2/util/signal" @@ -54,10 +52,10 @@ func newService(opts ...Option) Service { ) // set the client in the service implementations - options.Auth.Init(auth.WithClient(options.Client)) - options.Registry.Init(registrySrv.WithClient(options.Client)) - options.Runtime.Init(runtime.WithClient(options.Client)) - options.Store.Init(store.WithClient(options.Client)) + // options.Auth.Init(auth.WithClient(options.Client)) + // options.Registry.Init(registrySrv.WithClient(options.Client)) + // options.Runtime.Init(runtime.WithClient(options.Client)) + // options.Store.Init(store.WithClient(options.Client)) // set opts service.opts = options @@ -126,10 +124,10 @@ func (s *service) Init(opts ...Option) { // previously in newService for micro (since init is never called) // however it needs to be done again here since for normal go-micro // services the implementation may have changed by CLI flags. - s.opts.Auth.Init(auth.WithClient(s.Client())) - s.opts.Registry.Init(registrySrv.WithClient(s.Client())) - s.opts.Runtime.Init(runtime.WithClient(s.Client())) - s.opts.Store.Init(store.WithClient(s.Client())) + // s.opts.Auth.Init(auth.WithClient(s.Client())) + // s.opts.Registry.Init(registrySrv.WithClient(s.Client())) + // s.opts.Runtime.Init(runtime.WithClient(s.Client())) + // s.opts.Store.Init(store.WithClient(s.Client())) }) } From 57b060bac5adfab097139fa572c85b11164484c7 Mon Sep 17 00:00:00 2001 From: Ben Toogood Date: Wed, 13 May 2020 18:49:36 +0100 Subject: [PATCH 2/2] Disable Addresses --- auth/service/service.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auth/service/service.go b/auth/service/service.go index 197462a2..ccf2999b 100644 --- a/auth/service/service.go +++ b/auth/service/service.go @@ -307,9 +307,9 @@ func NewAuth(opts ...auth.Option) auth.Auth { } addrs := options.Addrs - if len(addrs) == 0 { - addrs = []string{"127.0.0.1:8010"} - } + // if len(addrs) == 0 { + // addrs = []string{"127.0.0.1:8010"} + // } service := &svc{ auth: pb.NewAuthService("go.micro.auth", options.Client),