Skip to content

Commit

Permalink
add grpcmetadata chain element and unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
  • Loading branch information
NikitaSkrynnik committed Oct 18, 2022
1 parent 654a02d commit dad1c4d
Show file tree
Hide file tree
Showing 24 changed files with 1,338 additions and 771 deletions.
5 changes: 5 additions & 0 deletions pkg/networkservice/chains/nsmgr/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import (
registryconnect "github.com/networkservicemesh/sdk/pkg/registry/common/connect"
"github.com/networkservicemesh/sdk/pkg/registry/common/dial"
"github.com/networkservicemesh/sdk/pkg/registry/common/expire"
"github.com/networkservicemesh/sdk/pkg/registry/common/grpcmetadata"
"github.com/networkservicemesh/sdk/pkg/registry/common/localbypass"
"github.com/networkservicemesh/sdk/pkg/registry/common/memory"
registryrecvfd "github.com/networkservicemesh/sdk/pkg/registry/common/recvfd"
Expand Down Expand Up @@ -205,6 +206,7 @@ func NewServer(ctx context.Context, tokenGenerator token.GeneratorFunc, options
clienturl.NewNetworkServiceRegistryClient(opts.regURL),
begin.NewNetworkServiceRegistryClient(),
clientconn.NewNetworkServiceRegistryClient(),
grpcmetadata.NewNetworkServiceRegistryClient(),
dial.NewNetworkServiceRegistryClient(ctx,
dial.WithDialOptions(opts.dialOptions...),
),
Expand All @@ -214,6 +216,7 @@ func NewServer(ctx context.Context, tokenGenerator token.GeneratorFunc, options
}

nsRegistry = chain.NewNetworkServiceRegistryServer(
grpcmetadata.NewNetworkServiceRegistryServer(),
updatepath.NewNetworkServiceRegistryServer(opts.name),
updatetoken.NewNetworkServiceRegistryServer(tokenGenerator),
opts.authorizeNSRegistryServer,
Expand All @@ -227,6 +230,7 @@ func NewServer(ctx context.Context, tokenGenerator token.GeneratorFunc, options
begin.NewNetworkServiceEndpointRegistryClient(),
clienturl.NewNetworkServiceEndpointRegistryClient(opts.regURL),
clientconn.NewNetworkServiceEndpointRegistryClient(),
grpcmetadata.NewNetworkServiceEndpointRegistryClient(),
dial.NewNetworkServiceEndpointRegistryClient(ctx,
dial.WithDialOptions(opts.dialOptions...),
),
Expand All @@ -243,6 +247,7 @@ func NewServer(ctx context.Context, tokenGenerator token.GeneratorFunc, options
}

var nseRegistry = chain.NewNetworkServiceEndpointRegistryServer(
grpcmetadata.NewNetworkServiceEndpointRegistryServer(),
updatepath.NewNetworkServiceEndpointRegistryServer(opts.name),
begin.NewNetworkServiceEndpointRegistryServer(),
updatetoken.NewNetworkServiceEndpointRegistryServer(tokenGenerator),
Expand Down
Loading

0 comments on commit dad1c4d

Please sign in to comment.