mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-04 14:03:35 +01:00
28 lines
469 B
Go
28 lines
469 B
Go
|
package systemops
|
||
|
|
||
|
import (
|
||
|
"net"
|
||
|
"net/netip"
|
||
|
|
||
|
"github.com/netbirdio/netbird/client/internal/routemanager/refcounter"
|
||
|
"github.com/netbirdio/netbird/iface"
|
||
|
)
|
||
|
|
||
|
type Nexthop struct {
|
||
|
IP netip.Addr
|
||
|
Intf *net.Interface
|
||
|
}
|
||
|
|
||
|
type ExclusionCounter = refcounter.Counter[any, Nexthop]
|
||
|
|
||
|
type SysOps struct {
|
||
|
refCounter *ExclusionCounter
|
||
|
wgInterface *iface.WGIface
|
||
|
}
|
||
|
|
||
|
func NewSysOps(wgInterface *iface.WGIface) *SysOps {
|
||
|
return &SysOps{
|
||
|
wgInterface: wgInterface,
|
||
|
}
|
||
|
}
|