Documentation ¶
Index ¶
- func IsExist(err error) bool
- func IsNotExist(err error) bool
- func IsNotSupported(err error) bool
- type Interface
- type RealNetlink
- func (r *RealNetlink) AddrAdd(link netlink.Link, addr *netlink.Addr) error
- func (r *RealNetlink) AddrDel(link netlink.Link, addr *netlink.Addr) error
- func (r *RealNetlink) AddrList(link netlink.Link, family int) ([]netlink.Addr, error)
- func (r *RealNetlink) Delete()
- func (r *RealNetlink) LinkAdd(link netlink.Link) error
- func (r *RealNetlink) LinkByName(name string) (netlink.Link, error)
- func (r *RealNetlink) LinkDel(link netlink.Link) error
- func (r *RealNetlink) LinkList() ([]netlink.Link, error)
- func (r *RealNetlink) LinkSetMTU(link netlink.Link, mtu int) error
- func (r *RealNetlink) LinkSetUp(link netlink.Link) error
- func (r *RealNetlink) NeighAdd(neigh *netlink.Neigh) error
- func (r *RealNetlink) NeighDel(a *netlink.Neigh) error
- func (r *RealNetlink) NeighList(linkIndex, family int) ([]netlink.Neigh, error)
- func (r *RealNetlink) NeighSet(a *netlink.Neigh) error
- func (r *RealNetlink) RouteAdd(route *netlink.Route) error
- func (r *RealNetlink) RouteDel(route *netlink.Route) error
- func (r *RealNetlink) RouteListFiltered(family int, filter *netlink.Route, filterMask uint64) ([]netlink.Route, error)
- func (r *RealNetlink) RouteListFilteredIter(family int, filter *netlink.Route, filterMask uint64, ...) error
- func (r *RealNetlink) RouteReplace(route *netlink.Route) error
- func (r *RealNetlink) RuleAdd(rule *netlink.Rule) error
- func (r *RealNetlink) RuleDel(rule *netlink.Rule) error
- func (r *RealNetlink) RuleList(family int) ([]netlink.Rule, error)
- func (r *RealNetlink) SetSocketTimeout(to time.Duration) error
- func (r *RealNetlink) SetStrictCheck(b bool) error
- type Wireguard
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotExist ¶
func IsNotSupported ¶
Types ¶
type Interface ¶
type Interface interface { SetSocketTimeout(to time.Duration) error SetStrictCheck(b bool) error LinkList() ([]netlink.Link, error) LinkByName(name string) (netlink.Link, error) LinkAdd(link netlink.Link) error LinkDel(link netlink.Link) error LinkSetMTU(link netlink.Link, mtu int) error LinkSetUp(link netlink.Link) error RouteListFiltered(family int, filter *netlink.Route, filterMask uint64) ([]netlink.Route, error) RouteListFilteredIter(family int, filter *netlink.Route, filterMask uint64, f func(netlink.Route) (cont bool)) error RouteAdd(route *netlink.Route) error RouteReplace(route *netlink.Route) error RouteDel(route *netlink.Route) error AddrList(link netlink.Link, family int) ([]netlink.Addr, error) AddrAdd(link netlink.Link, addr *netlink.Addr) error AddrDel(link netlink.Link, addr *netlink.Addr) error RuleList(family int) ([]netlink.Rule, error) RuleAdd(rule *netlink.Rule) error RuleDel(rule *netlink.Rule) error Delete() NeighAdd(neigh *netlink.Neigh) error NeighList(linkIndex, family int) ([]netlink.Neigh, error) NeighSet(a *netlink.Neigh) error NeighDel(a *netlink.Neigh) error }
func NewRealNetlink ¶
type RealNetlink ¶
type RealNetlink struct {
// contains filtered or unexported fields
}
func (*RealNetlink) Delete ¶
func (r *RealNetlink) Delete()
func (*RealNetlink) LinkByName ¶
func (r *RealNetlink) LinkByName(name string) (netlink.Link, error)
func (*RealNetlink) LinkSetMTU ¶
func (r *RealNetlink) LinkSetMTU(link netlink.Link, mtu int) error
func (*RealNetlink) NeighList ¶
func (r *RealNetlink) NeighList(linkIndex, family int) ([]netlink.Neigh, error)
func (*RealNetlink) RouteListFiltered ¶
func (*RealNetlink) RouteListFilteredIter ¶
func (*RealNetlink) RouteReplace ¶
func (r *RealNetlink) RouteReplace(route *netlink.Route) error
func (*RealNetlink) SetSocketTimeout ¶
func (r *RealNetlink) SetSocketTimeout(to time.Duration) error
func (*RealNetlink) SetStrictCheck ¶
func (r *RealNetlink) SetStrictCheck(b bool) error
type Wireguard ¶
type Wireguard interface { Close() error DeviceByName(name string) (*wgtypes.Device, error) Devices() ([]*wgtypes.Device, error) ConfigureDevice(name string, cfg wgtypes.Config) error }
Wireguard is a shim interface for mocking linkClient calls to manage the wireguard key and peer configuration.
func NewRealWireguard ¶
Click to show internal directories.
Click to hide internal directories.