mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-20 01:06:45 +00:00
[manager] ingress ports manager support (#3268)
* add peers manager * Extend peers manager to support retrieving all peers Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> * add network map calc * move integrations interface * update management-integrations * merge main and fix * go mod tidy * [management] port forwarding add peer manager fix network map (#3264) * [management] fix testing tools (#3265) * Fix net.IPv4 conversion to []byte * update test to check ipv4 --------- Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> Co-authored-by: bcmmbaga <bethuelmbaga12@gmail.com> Co-authored-by: Zoltán Papp <zoltan.pmail@gmail.com>
This commit is contained in:
27
management/server/integrations/port_forwarding/controller.go
Normal file
27
management/server/integrations/port_forwarding/controller.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package port_forwarding
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
nbtypes "github.com/netbirdio/netbird/management/server/types"
|
||||
)
|
||||
|
||||
type Controller interface {
|
||||
SendUpdate(ctx context.Context, accountID string, affectedProxyID string, affectedPeerIDs []string)
|
||||
GetProxyNetworkMaps(ctx context.Context, accountID string) (map[string]*nbtypes.NetworkMap, error)
|
||||
}
|
||||
|
||||
type ControllerMock struct {
|
||||
}
|
||||
|
||||
func NewControllerMock() *ControllerMock {
|
||||
return &ControllerMock{}
|
||||
}
|
||||
|
||||
func (c *ControllerMock) SendUpdate(ctx context.Context, accountID string, affectedProxyID string, affectedPeerIDs []string) {
|
||||
// noop
|
||||
}
|
||||
|
||||
func (c *ControllerMock) GetProxyNetworkMaps(ctx context.Context, accountID string) (map[string]*nbtypes.NetworkMap, error) {
|
||||
return make(map[string]*nbtypes.NetworkMap), nil
|
||||
}
|
||||
Reference in New Issue
Block a user