Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFirewall ¶
NewFirewall if supported, returns an iptables manager, otherwise returns a nftables manager
Types ¶
type DefaultManager ¶
type DefaultManager struct {
// contains filtered or unexported fields
}
DefaultManager is the default instance of a route manager
func NewManager ¶
func NewManager(ctx context.Context, pubKey string, wgInterface *iface.WGIface, statusRecorder *status.Status) *DefaultManager
NewManager returns a new route manager
func (*DefaultManager) Stop ¶
func (m *DefaultManager) Stop()
Stop stops the manager watchers and clean firewall rules
func (*DefaultManager) UpdateRoutes ¶
func (m *DefaultManager) UpdateRoutes(updateSerial uint64, newRoutes []*route.Route) error
UpdateRoutes compares received routes with existing routes and remove, update or add them to the client and server maps
type MockManager ¶
type MockManager struct { UpdateRoutesFunc func(updateSerial uint64, newRoutes []*route.Route) error StopFunc func() }
MockManager is the mock instance of a route manager
func (*MockManager) Stop ¶
func (m *MockManager) Stop()
Stop mock implementation of Stop from Manager interface
func (*MockManager) UpdateRoutes ¶
func (m *MockManager) UpdateRoutes(updateSerial uint64, newRoutes []*route.Route) error
UpdateRoutes mock implementation of UpdateRoutes from Manager interface
Click to show internal directories.
Click to hide internal directories.