Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename prioritymechanisms to mechanismpriority #666

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/google/uuid v1.2.0
github.com/hashicorp/go-multierror v1.1.1
github.com/networkservicemesh/api v1.6.2-0.20221205183940-84c7ff837cdd
github.com/networkservicemesh/sdk v0.5.1-0.20221206103812-b6979bfe147d
github.com/networkservicemesh/sdk v0.5.1-0.20221207111307-2f2beee3ae60
github.com/networkservicemesh/sdk-kernel v0.0.0-20221206104345-fd91dd9e8f6d
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.8.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ 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.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.20221206103812-b6979bfe147d h1:m6B7ls2B+c48SNHiXak7HTxB1bs/aX4rmygixFhIlgg=
github.com/networkservicemesh/sdk v0.5.1-0.20221206103812-b6979bfe147d/go.mod h1:zEYFbCVXGlTT5f0x6sx8XtL2GazkYBpCoEpooxkz2vE=
github.com/networkservicemesh/sdk v0.5.1-0.20221207111307-2f2beee3ae60 h1:g2oF2RnQw85HM5Jc64EI9rTqhhf4RqKJvgFTqyYXo00=
github.com/networkservicemesh/sdk v0.5.1-0.20221207111307-2f2beee3ae60/go.mod h1:zEYFbCVXGlTT5f0x6sx8XtL2GazkYBpCoEpooxkz2vE=
github.com/networkservicemesh/sdk-kernel v0.0.0-20221206104345-fd91dd9e8f6d h1:enSFaWQzfU2MS90DUh2f5muBLnmL9SxoAKXv4fUNEKY=
github.com/networkservicemesh/sdk-kernel v0.0.0-20221206104345-fd91dd9e8f6d/go.mod h1:t4A46Ph49k1kfuiEUPjmFvnIeaU3cfigQjUxr+gSmwE=
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
Expand Down
8 changes: 4 additions & 4 deletions pkg/networkservice/chains/forwarder/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type forwarderOptions struct {
clientURL *url.URL
dialTimeout time.Duration
domain2Device map[string]string
prioriyMechanismList []string
mechanismPrioriyList []string
statsOpts []stats.Option
cleanupOpts []cleanup.Option
vxlanOpts []vxlan.Option
Expand Down Expand Up @@ -98,10 +98,10 @@ func WithVlanDomain2Device(domain2Device map[string]string) Option {
}
}

// WithPriorityMechanisms sets prioritymechanisms option
func WithPriorityMechanisms(priorityList []string) Option {
// WithMechanismPriority sets mechanismpriority option
func WithMechanismPriority(priorityList []string) Option {
return func(o *forwarderOptions) {
o.prioriyMechanismList = priorityList
o.mechanismPrioriyList = priorityList
}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/networkservice/chains/forwarder/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ import (
"github.com/networkservicemesh/sdk/pkg/networkservice/common/connect"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/discover"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/filtermechanisms"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanismpriority"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms/recvfd"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms/sendfd"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanismtranslation"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/prioritymechanisms"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/roundrobin"
authmonitor "github.com/networkservicemesh/sdk/pkg/tools/monitorconnection/authorize"
"github.com/networkservicemesh/sdk/pkg/tools/token"
Expand Down Expand Up @@ -158,7 +158,7 @@ func NewServer(ctx context.Context, tokenGenerator token.GeneratorFunc, vppConn
ipsec.NewClient(vppConn, tunnelIP),
vlan.NewClient(vppConn, opts.domain2Device),
filtermechanisms.NewClient(),
prioritymechanisms.NewClient(opts.prioriyMechanismList...),
mechanismpriority.NewClient(opts.mechanismPrioriyList...),
pinhole.NewClient(vppConn, pinhole.WithSharedMutex(pinholeMutex)),
recvfd.NewClient(),
nsmonitor.NewClient(ctx),
Expand Down