From 8d5ff9284ccddb2439aba55d846a0f4760e2ef8c Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik Date: Mon, 6 Jun 2022 14:37:58 +0700 Subject: [PATCH 1/2] add clientinfo chain element Signed-off-by: Nikita Skrynnik --- internal/pkg/imports/imports_linux.go | 1 + main.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/internal/pkg/imports/imports_linux.go b/internal/pkg/imports/imports_linux.go index 62930e9..1ba73e5 100644 --- a/internal/pkg/imports/imports_linux.go +++ b/internal/pkg/imports/imports_linux.go @@ -29,6 +29,7 @@ import ( _ "github.com/networkservicemesh/sdk/pkg/networkservice/ipam/point2pointipam" _ "github.com/networkservicemesh/sdk/pkg/registry/chains/client" _ "github.com/networkservicemesh/sdk/pkg/registry/common/begin" + _ "github.com/networkservicemesh/sdk/pkg/registry/common/clientinfo" _ "github.com/networkservicemesh/sdk/pkg/registry/common/expire" _ "github.com/networkservicemesh/sdk/pkg/registry/common/memory" _ "github.com/networkservicemesh/sdk/pkg/registry/common/recvfd" diff --git a/main.go b/main.go index fd113e0..a944768 100644 --- a/main.go +++ b/main.go @@ -66,6 +66,7 @@ import ( "github.com/networkservicemesh/sdk/pkg/networkservice/core/chain" "github.com/networkservicemesh/sdk/pkg/networkservice/ipam/point2pointipam" registryclient "github.com/networkservicemesh/sdk/pkg/registry/chains/client" + "github.com/networkservicemesh/sdk/pkg/registry/common/clientinfo" registrysendfd "github.com/networkservicemesh/sdk/pkg/registry/common/sendfd" "github.com/networkservicemesh/sdk/pkg/tools/debug" dnstools "github.com/networkservicemesh/sdk/pkg/tools/dnscontext" @@ -287,6 +288,7 @@ func main() { registryclient.WithClientURL(&config.ConnectTo), registryclient.WithDialOptions(clientOptions...), registryclient.WithNSEAdditionalFunctionality( + clientinfo.NewNetworkServiceEndpointRegistryClient(), registrysendfd.NewNetworkServiceEndpointRegistryClient(), ), ) @@ -294,6 +296,7 @@ func main() { nse, err = nseRegistryClient.Register(ctx, nse) logrus.Infof("nse: %+v", nse) + logrus.Info("MY_INFO") if err != nil { log.FromContext(ctx).Fatalf("unable to register nse %+v", err) } From bfc7790bf5b46c73f8ff33293ca24a1558a61811 Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik Date: Thu, 23 Jun 2022 20:30:17 +1100 Subject: [PATCH 2/2] cleanup Signed-off-by: Nikita Skrynnik --- main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/main.go b/main.go index a944768..b6291f2 100644 --- a/main.go +++ b/main.go @@ -296,7 +296,6 @@ func main() { nse, err = nseRegistryClient.Register(ctx, nse) logrus.Infof("nse: %+v", nse) - logrus.Info("MY_INFO") if err != nil { log.FromContext(ctx).Fatalf("unable to register nse %+v", err) }