mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-02 19:49:07 +02:00
Rename interface to firewaller
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
nberrors "github.com/netbirdio/netbird/client/errors"
|
||||
"github.com/netbirdio/netbird/client/firewall/interface"
|
||||
"github.com/netbirdio/netbird/client/firewall/firewaller"
|
||||
"github.com/netbirdio/netbird/client/firewall/types"
|
||||
"github.com/netbirdio/netbird/client/internal/acl/id"
|
||||
"github.com/netbirdio/netbird/client/ssh"
|
||||
@@ -31,14 +31,14 @@ type Manager interface {
|
||||
|
||||
// DefaultManager uses firewall manager to handle
|
||||
type DefaultManager struct {
|
||||
firewall _interface.Firewall
|
||||
firewall firewaller.Firewall
|
||||
ipsetCounter int
|
||||
peerRulesPairs map[id.RuleID][]types.Rule
|
||||
routeRules map[id.RuleID]struct{}
|
||||
mutex sync.Mutex
|
||||
}
|
||||
|
||||
func NewDefaultManager(fm _interface.Firewall) *DefaultManager {
|
||||
func NewDefaultManager(fm firewaller.Firewall) *DefaultManager {
|
||||
return &DefaultManager{
|
||||
firewall: fm,
|
||||
peerRulesPairs: make(map[id.RuleID][]types.Rule),
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
"github.com/golang/mock/gomock"
|
||||
|
||||
"github.com/netbirdio/netbird/client/firewall"
|
||||
"github.com/netbirdio/netbird/client/firewall/interface"
|
||||
"github.com/netbirdio/netbird/client/iface"
|
||||
"github.com/netbirdio/netbird/client/internal/acl/mocks"
|
||||
mgmProto "github.com/netbirdio/netbird/management/proto"
|
||||
@@ -56,7 +55,7 @@ func TestDefaultManager(t *testing.T) {
|
||||
t.Errorf("create firewall: %v", err)
|
||||
return
|
||||
}
|
||||
defer func(fw _interface.Firewall) {
|
||||
defer func(fw firewaller.Firewall) {
|
||||
_ = fw.Reset(nil)
|
||||
}(fw)
|
||||
acl := NewDefaultManager(fw)
|
||||
@@ -349,7 +348,7 @@ func TestDefaultManagerEnableSSHRules(t *testing.T) {
|
||||
t.Errorf("create firewall: %v", err)
|
||||
return
|
||||
}
|
||||
defer func(fw _interface.Firewall) {
|
||||
defer func(fw firewaller.Firewall) {
|
||||
_ = fw.Reset(nil)
|
||||
}(fw)
|
||||
acl := NewDefaultManager(fw)
|
||||
|
||||
Reference in New Issue
Block a user