fix for latest micro

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-11-03 02:06:53 +03:00
parent e20ed5dc32
commit 860a1929f4
3 changed files with 27 additions and 7 deletions

View File

@@ -10,10 +10,10 @@ import (
"sync"
"time"
jsonrpc "github.com/unistack-org/micro-codec-jsonrpc"
protorpc "github.com/unistack-org/micro-codec-protorpc"
"github.com/unistack-org/micro/v3/broker"
"github.com/unistack-org/micro/v3/codec"
jsonrpc "github.com/unistack-org/micro/v3/codec/jsonrpc"
protorpc "github.com/unistack-org/micro/v3/codec/protorpc"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/registry"
"github.com/unistack-org/micro/v3/server"
@@ -167,7 +167,7 @@ func (h *httpServer) Register() error {
logger.Infof("Registering node: %s", opts.Name+"-"+opts.Id)
})
if err := opts.Registry.Register(service, rOpts...); err != nil {
if err := opts.Registry.Register(h.opts.Context, service, rOpts...); err != nil {
return err
}
@@ -217,7 +217,7 @@ func (h *httpServer) Deregister() error {
return err
}
if err := opts.Registry.Deregister(service); err != nil {
if err := opts.Registry.Deregister(h.opts.Context, service); err != nil {
return err
}