diff --git a/go.mod b/go.mod index c0858aa..5741b29 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/golang/protobuf v1.5.2 github.com/google/uuid v1.2.0 github.com/networkservicemesh/api v1.6.2-0.20221205183940-84c7ff837cdd - github.com/networkservicemesh/sdk v0.5.1-0.20221219152652-beec79b7ec9d + github.com/networkservicemesh/sdk v0.5.1-0.20221229093003-75d6d5d1c617 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.0 github.com/stretchr/testify v1.8.0 diff --git a/go.sum b/go.sum index 54634b8..7980b8d 100644 --- a/go.sum +++ b/go.sum @@ -239,8 +239,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/networkservicemesh/api v1.6.2-0.20221205183940-84c7ff837cdd h1:26HR90HrJFZHIPPP3SCLGNRpPCMFoEnSSZfhHH8MPSo= github.com/networkservicemesh/api v1.6.2-0.20221205183940-84c7ff837cdd/go.mod h1:hOF2844BSstH1311oDMDgqqXS+kdc77htZNPRKl9mf8= -github.com/networkservicemesh/sdk v0.5.1-0.20221219152652-beec79b7ec9d h1:cx0Z/xWuoW0JS3VmA+5Ckg5g+iirB7RJglGDnJzmGEo= -github.com/networkservicemesh/sdk v0.5.1-0.20221219152652-beec79b7ec9d/go.mod h1:++MSpR2wuFlCpCYoR6lELxJ4ILKd650vDQ8d9CtGAzA= +github.com/networkservicemesh/sdk v0.5.1-0.20221229093003-75d6d5d1c617 h1:icUm4c2okUrtNtz1iTU0iyE9CU6U6uLlg44Xu87+E3M= +github.com/networkservicemesh/sdk v0.5.1-0.20221229093003-75d6d5d1c617/go.mod h1:++MSpR2wuFlCpCYoR6lELxJ4ILKd650vDQ8d9CtGAzA= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU= github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= diff --git a/pkg/registry/chains/registryk8s/registry-k8s.go b/pkg/registry/chains/registryk8s/registry-k8s.go index c0c20c6..4d9e138 100644 --- a/pkg/registry/chains/registryk8s/registry-k8s.go +++ b/pkg/registry/chains/registryk8s/registry-k8s.go @@ -129,9 +129,9 @@ func NewServer(config *Config, tokenGenerator token.GeneratorFunc, options ...Op nseChain := chain.NewNetworkServiceEndpointRegistryServer( grpcmetadata.NewNetworkServiceEndpointRegistryServer(), - begin.NewNetworkServiceEndpointRegistryServer(), updatepath.NewNetworkServiceEndpointRegistryServer(tokenGenerator), opts.authorizeNSERegistryServer, + begin.NewNetworkServiceEndpointRegistryServer(), switchcase.NewNetworkServiceEndpointRegistryServer(switchcase.NSEServerCase{ Condition: func(c context.Context, nse *registry.NetworkServiceEndpoint) bool { if interdomain.Is(nse.GetName()) { @@ -164,7 +164,7 @@ func NewServer(config *Config, tokenGenerator token.GeneratorFunc, options ...Op Condition: func(c context.Context, nse *registry.NetworkServiceEndpoint) bool { return true }, Action: chain.NewNetworkServiceEndpointRegistryServer( setregistrationtime.NewNetworkServiceEndpointRegistryServer(), - expire.NewNetworkServiceEndpointRegistryServer(config.ChainCtx, config.ExpirePeriod), + expire.NewNetworkServiceEndpointRegistryServer(config.ChainCtx, expire.WithDefaultExpiration(config.ExpirePeriod)), etcd.NewNetworkServiceEndpointRegistryServer(config.ChainCtx, config.Namespace, config.ClientSet), ), },