Documentation
¶
Index ¶
- type DNSProxy
- type LinuxAdapter
- func (a *LinuxAdapter) ApplyInterfaceConfig(iface model.NetworkInterface) error
- func (a *LinuxAdapter) ApplyStaticRoute(route model.StaticRoute) error
- func (a *LinuxAdapter) GetInterfaces() ([]model.NetworkInterface, error)
- func (a *LinuxAdapter) GetRoutes() ([]model.StaticRoute, error)
- func (a *LinuxAdapter) ValidateConnectivity(targets []model.ConnectivityTarget) (model.ConnectivityReport, error)
- type MDNSServer
- type NetworkAdapter
- type NetworkManager
- func (nm *NetworkManager) ApplyConfig(interfaces []model.NetworkInterface, routes []model.StaticRoute) error
- func (nm *NetworkManager) ApplyConfigWithTransaction(interfaces []model.NetworkInterface, routes []model.StaticRoute, ...) error
- func (nm *NetworkManager) GetInterfaces() ([]model.NetworkInterface, error)
- func (nm *NetworkManager) GetRoutes() ([]model.StaticRoute, error)
- type WindowsAdapter
- func (a *WindowsAdapter) ApplyInterfaceConfig(iface model.NetworkInterface) error
- func (a *WindowsAdapter) ApplyStaticRoute(route model.StaticRoute) error
- func (a *WindowsAdapter) GetInterfaces() ([]model.NetworkInterface, error)
- func (a *WindowsAdapter) GetRoutes() ([]model.StaticRoute, error)
- func (a *WindowsAdapter) ValidateConnectivity(targets []model.ConnectivityTarget) (model.ConnectivityReport, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSProxy ¶
type DNSProxy struct {
// contains filtered or unexported fields
}
DNSProxy handles DNS requests for bare hostname access
func (*DNSProxy) ServeDNS ¶
func (d *DNSProxy) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
ServeDNS implements the dns.Handler interface
type LinuxAdapter ¶
type LinuxAdapter struct{}
func NewLinuxAdapter ¶
func NewLinuxAdapter() *LinuxAdapter
func (*LinuxAdapter) ApplyInterfaceConfig ¶
func (a *LinuxAdapter) ApplyInterfaceConfig(iface model.NetworkInterface) error
func (*LinuxAdapter) ApplyStaticRoute ¶
func (a *LinuxAdapter) ApplyStaticRoute(route model.StaticRoute) error
func (*LinuxAdapter) GetInterfaces ¶
func (a *LinuxAdapter) GetInterfaces() ([]model.NetworkInterface, error)
func (*LinuxAdapter) GetRoutes ¶
func (a *LinuxAdapter) GetRoutes() ([]model.StaticRoute, error)
func (*LinuxAdapter) ValidateConnectivity ¶
func (a *LinuxAdapter) ValidateConnectivity(targets []model.ConnectivityTarget) (model.ConnectivityReport, error)
type MDNSServer ¶
type MDNSServer struct {
// contains filtered or unexported fields
}
MDNSServer manages mDNS services
func (*MDNSServer) Start ¶
func (s *MDNSServer) Start(cfg model.HostnameConfig) error
Start starts the mDNS services based on configuration
type NetworkAdapter ¶
type NetworkAdapter interface {
ApplyInterfaceConfig(iface model.NetworkInterface) error
ApplyStaticRoute(route model.StaticRoute) error
GetInterfaces() ([]model.NetworkInterface, error)
GetRoutes() ([]model.StaticRoute, error)
ValidateConnectivity(targets []model.ConnectivityTarget) (model.ConnectivityReport, error)
}
NetworkAdapter defines the interface for OS-specific network operations
func NewNetworkAdapter ¶
func NewNetworkAdapter() NetworkAdapter
NewNetworkAdapter creates a platform-specific network adapter
type NetworkManager ¶
type NetworkManager struct {
// contains filtered or unexported fields
}
NetworkManager manages network configurations and operations
func NewNetworkManager ¶
func NewNetworkManager() *NetworkManager
NewNetworkManager creates a new NetworkManager
func (*NetworkManager) ApplyConfig ¶
func (nm *NetworkManager) ApplyConfig(interfaces []model.NetworkInterface, routes []model.StaticRoute) error
ApplyConfig applies the given network configuration
func (*NetworkManager) ApplyConfigWithTransaction ¶
func (nm *NetworkManager) ApplyConfigWithTransaction(interfaces []model.NetworkInterface, routes []model.StaticRoute, validationTargets []model.ConnectivityTarget) error
ApplyConfigWithTransaction applies the given network configuration with transaction support (rollback on failure)
func (*NetworkManager) GetInterfaces ¶
func (nm *NetworkManager) GetInterfaces() ([]model.NetworkInterface, error)
GetInterfaces returns the current status of all interfaces
func (*NetworkManager) GetRoutes ¶
func (nm *NetworkManager) GetRoutes() ([]model.StaticRoute, error)
GetRoutes returns the current static routes
type WindowsAdapter ¶
type WindowsAdapter struct{}
WindowsAdapter implements NetworkAdapter for Windows
func (*WindowsAdapter) ApplyInterfaceConfig ¶
func (a *WindowsAdapter) ApplyInterfaceConfig(iface model.NetworkInterface) error
func (*WindowsAdapter) ApplyStaticRoute ¶
func (a *WindowsAdapter) ApplyStaticRoute(route model.StaticRoute) error
func (*WindowsAdapter) GetInterfaces ¶
func (a *WindowsAdapter) GetInterfaces() ([]model.NetworkInterface, error)
func (*WindowsAdapter) GetRoutes ¶
func (a *WindowsAdapter) GetRoutes() ([]model.StaticRoute, error)
func (*WindowsAdapter) ValidateConnectivity ¶
func (a *WindowsAdapter) ValidateConnectivity(targets []model.ConnectivityTarget) (model.ConnectivityReport, error)