From 209619b5d251471d8a86c727f381ce6deb5ee6a0 Mon Sep 17 00:00:00 2001 From: Ruslan Bayandinov Date: Tue, 21 Feb 2023 14:52:47 +0000 Subject: [PATCH] fix dependencies Signed-off-by: Ruslan Bayandinov --- .golangci.yml | 1 + go.mod | 12 ++++++------ go.sum | 20 ++++++++++---------- internal/imports/imports_linux.go | 2 ++ main.go | 7 ++++--- 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index c9e4d67e..d3e8b4ad 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -170,6 +170,7 @@ issues: - path: main.go linters: - revive + text: 'package-comments: should have a package comment' - path: main.go linters: - funlen diff --git a/go.mod b/go.mod index 45250a60..004f102d 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ require ( github.com/antonfisher/nested-logrus-formatter v1.3.1 github.com/edwarnicke/debug v1.0.0 github.com/edwarnicke/exechelper v1.0.3 + github.com/edwarnicke/genericsync v0.0.0-20220910010113-61a344f9bc29 github.com/edwarnicke/govpp v0.0.0-20230130211138-14ef5d20b1d0 github.com/edwarnicke/grpcfd v1.1.2 github.com/edwarnicke/vpphelper v0.0.0-20210512223648-f914b171f679 @@ -14,10 +15,10 @@ require ( github.com/google/uuid v1.2.0 github.com/kelseyhightower/envconfig v1.4.0 github.com/networkservicemesh/api v1.7.2-0.20230123083145-4a6c3ec589e1 - github.com/networkservicemesh/sdk v0.5.1-0.20230214013943-438ec051e69b - github.com/networkservicemesh/sdk-k8s v0.0.0-20230214093953-233b1ac6214a - github.com/networkservicemesh/sdk-sriov v0.0.0-20230214123342-528783e52303 - github.com/networkservicemesh/sdk-vpp v0.0.0-20230214123245-36ad9b74b357 + github.com/networkservicemesh/sdk v0.5.1-0.20230221131021-bcd1eb0f52b4 + github.com/networkservicemesh/sdk-k8s v0.0.0-20230221132440-43b4f167f9de + github.com/networkservicemesh/sdk-sriov v0.0.0-20230221132402-5b03677ef136 + github.com/networkservicemesh/sdk-vpp v0.0.0-20230221135914-b23aef5cb3e4 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.0 github.com/spiffe/go-spiffe/v2 v2.0.0 @@ -35,7 +36,6 @@ require ( github.com/agnivade/levenshtein v1.1.1 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/edwarnicke/genericsync v0.0.0-20220910010113-61a344f9bc29 // indirect github.com/edwarnicke/log v1.0.0 // indirect github.com/edwarnicke/serialize v1.0.7 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect @@ -52,7 +52,7 @@ require ( github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/lunixbochs/struc v0.0.0-20200521075829-a4cb8d33dbbe // indirect - github.com/networkservicemesh/sdk-kernel v0.0.0-20230214122858-b7a1313f02af // indirect + github.com/networkservicemesh/sdk-kernel v0.0.0-20230221133432-0e73f4d59e95 // indirect github.com/open-policy-agent/opa v0.44.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect diff --git a/go.sum b/go.sum index e23afc46..9cb6fc8a 100644 --- a/go.sum +++ b/go.sum @@ -232,16 +232,16 @@ github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc= github.com/networkservicemesh/api v1.7.2-0.20230123083145-4a6c3ec589e1 h1:RxNKksXsXsnDsEo+Cfn43pdPfML024ad//QcdKfgXK4= github.com/networkservicemesh/api v1.7.2-0.20230123083145-4a6c3ec589e1/go.mod h1:hOF2844BSstH1311oDMDgqqXS+kdc77htZNPRKl9mf8= -github.com/networkservicemesh/sdk v0.5.1-0.20230214013943-438ec051e69b h1:DAAqODDVm0Pm3bCfSfOKD71fRkfbDn746oiFcBuIjfk= -github.com/networkservicemesh/sdk v0.5.1-0.20230214013943-438ec051e69b/go.mod h1:4w0ue1+jI3lHNdSr+rzSpFIBwoGfM5vRcjVkNKZNRxk= -github.com/networkservicemesh/sdk-k8s v0.0.0-20230214093953-233b1ac6214a h1:giqwEayFMl4AM9gauq7LnNKMhgRURJ3Ymf2QVIUciMk= -github.com/networkservicemesh/sdk-k8s v0.0.0-20230214093953-233b1ac6214a/go.mod h1:URGvn9eMZv/YKxL9WcmK62xuNAatVS4q8h+oZfT193I= -github.com/networkservicemesh/sdk-kernel v0.0.0-20230214122858-b7a1313f02af h1:eIXf3IXkRZnL3xS6fEzR6WEElxHLf4Zm4Gy2WXRsMoA= -github.com/networkservicemesh/sdk-kernel v0.0.0-20230214122858-b7a1313f02af/go.mod h1:PA9AjrnlqpFOKpjU2IKOXmiw5afBNI+HdBxtz2pjrRU= -github.com/networkservicemesh/sdk-sriov v0.0.0-20230214123342-528783e52303 h1:dENMp3Dy0HRU8CveGhD36Cmhr/wNriJH0ly3CrVK95Y= -github.com/networkservicemesh/sdk-sriov v0.0.0-20230214123342-528783e52303/go.mod h1:1OwsVqQvKFSuZfltjsrNSc314BOkTdMFp5yq3yltuqw= -github.com/networkservicemesh/sdk-vpp v0.0.0-20230214123245-36ad9b74b357 h1:dyGADn2x5zSW9tozEb3S7bPBz3FJZSFNq6Q5DqV/IMo= -github.com/networkservicemesh/sdk-vpp v0.0.0-20230214123245-36ad9b74b357/go.mod h1:B7EPH1Kfvarlu2ZmGGv1LjdczcQ+IJAvmf1drtlTB1Y= +github.com/networkservicemesh/sdk v0.5.1-0.20230221131021-bcd1eb0f52b4 h1:VDof/obB0MvjQNP4xpCi9yYV1f1jkAc/3+Xy1Zkh84Q= +github.com/networkservicemesh/sdk v0.5.1-0.20230221131021-bcd1eb0f52b4/go.mod h1:4w0ue1+jI3lHNdSr+rzSpFIBwoGfM5vRcjVkNKZNRxk= +github.com/networkservicemesh/sdk-k8s v0.0.0-20230221132440-43b4f167f9de h1:w4JglmzBohsAcRQiyAW8JlVDETRUm5roT7V6XDO7hw8= +github.com/networkservicemesh/sdk-k8s v0.0.0-20230221132440-43b4f167f9de/go.mod h1:gf/Dc0MBA4gg4Wf7y43AZ1QC7kbUL3FCb3MxLpTOLhk= +github.com/networkservicemesh/sdk-kernel v0.0.0-20230221133432-0e73f4d59e95 h1:tlkZ+4o2DUog+mCROehlSJV7ODC6wK9briVSXX6WZ+c= +github.com/networkservicemesh/sdk-kernel v0.0.0-20230221133432-0e73f4d59e95/go.mod h1:SSrVGXRq+xi57RO2gIieN0rbUhiFtBK/6RCnc/FoFeY= +github.com/networkservicemesh/sdk-sriov v0.0.0-20230221132402-5b03677ef136 h1:/QNKqVPx0g2mXp8+LYwZ1cG+8pFk+/EbYxMGV1Utec8= +github.com/networkservicemesh/sdk-sriov v0.0.0-20230221132402-5b03677ef136/go.mod h1:xEl/7kX1tbF90ZtE5k6cwkXof76EUYVKMr9tptKIjpg= +github.com/networkservicemesh/sdk-vpp v0.0.0-20230221135914-b23aef5cb3e4 h1:5FqdwOlkRzoCNlrgqqnXyxBjnTnclqTS1KWzsPSSSmc= +github.com/networkservicemesh/sdk-vpp v0.0.0-20230221135914-b23aef5cb3e4/go.mod h1:ZQs8yLWU4SdJibJkEnHkaWu8vZD1J49ZVsarfjn9pHc= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.1.0 h1:e3YP4dN/HYPpGh29X1ZkcxcEICsOls9huyVCRBaxjq8= github.com/onsi/gomega v1.1.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= diff --git a/internal/imports/imports_linux.go b/internal/imports/imports_linux.go index 1b5d797d..7f4a29fc 100644 --- a/internal/imports/imports_linux.go +++ b/internal/imports/imports_linux.go @@ -10,6 +10,7 @@ import ( _ "github.com/antonfisher/nested-logrus-formatter" _ "github.com/edwarnicke/debug" _ "github.com/edwarnicke/exechelper" + _ "github.com/edwarnicke/genericsync" _ "github.com/edwarnicke/govpp/binapi/acl" _ "github.com/edwarnicke/govpp/binapi/acl_types" _ "github.com/edwarnicke/govpp/binapi/af_packet" @@ -91,6 +92,7 @@ import ( _ "github.com/pkg/errors" _ "github.com/sirupsen/logrus" _ "github.com/spiffe/go-spiffe/v2/bundle/x509bundle" + _ "github.com/spiffe/go-spiffe/v2/spiffeid" _ "github.com/spiffe/go-spiffe/v2/spiffetls/tlsconfig" _ "github.com/spiffe/go-spiffe/v2/svid/x509svid" _ "github.com/spiffe/go-spiffe/v2/workloadapi" diff --git a/main.go b/main.go index cb45a770..752f3653 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022 Cisco and/or its affiliates. +// Copyright (c) 2020-2023 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // @@ -30,9 +30,11 @@ import ( nested "github.com/antonfisher/nested-logrus-formatter" "github.com/edwarnicke/debug" + "github.com/edwarnicke/genericsync" "github.com/edwarnicke/grpcfd" "github.com/edwarnicke/vpphelper" "github.com/sirupsen/logrus" + "github.com/spiffe/go-spiffe/v2/spiffeid" "github.com/spiffe/go-spiffe/v2/spiffetls/tlsconfig" "github.com/spiffe/go-spiffe/v2/workloadapi" "google.golang.org/grpc" @@ -57,7 +59,6 @@ import ( authmonitor "github.com/networkservicemesh/sdk/pkg/tools/monitorconnection/authorize" "github.com/networkservicemesh/sdk/pkg/tools/opentelemetry" "github.com/networkservicemesh/sdk/pkg/tools/spiffejwt" - "github.com/networkservicemesh/sdk/pkg/tools/spire" "github.com/networkservicemesh/sdk/pkg/tools/token" "github.com/networkservicemesh/sdk/pkg/tools/tracing" @@ -234,7 +235,7 @@ func main() { grpcfd.WithChainStreamInterceptor(), grpcfd.WithChainUnaryInterceptor(), } - spiffeIDConnMap := spire.SpiffeIDConnectionMap{} + spiffeIDConnMap := genericsync.Map[spiffeid.ID, *genericsync.Map[string, struct{}]]{} endpoint := xconnectns.NewServer( ctx, spiffejwt.TokenGeneratorFunc(source, cfg.MaxTokenLifetime),