mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-17 04:10:44 +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.IWGIface
|
|
}
|
|
|
|
func NewSysOps(wgInterface iface.IWGIface) *SysOps {
|
|
return &SysOps{
|
|
wgInterface: wgInterface,
|
|
}
|
|
}
|