Documentation ¶
Index ¶
- type Config
- type Controller
- func (c *Controller) CreateInterface(iface *structs.Interface) error
- func (c *Controller) DeleteAllInterfaces() error
- func (c *Controller) DeleteInterfaceByAlias(s string) error
- func (c *Controller) DeleteInterfaceByName(s string) error
- func (c *Controller) Interfaces() ([]*structs.Interface, error)
- func (c *Controller) UpdateInterface(iface *structs.Interface) error
- type NetworkInterfaceController
- type PrivateKey
- type PrivateKeyStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // InterfacesPrefix defines the string prepended to each interface name. // Example: if InterfacePrefix is "abc", interfaces will be named as // "abc-xxxxxx", where "xxxxxx" is a random string. InterfacesPrefix string // WireguardPath is the path to a userspace Wireguard binary. In case // it is not defined, Drago will try to use the kernel module. WireguardPath string // KeyStore is an implementation of the KeyStore interface, used by the // Controller to cache private keys for each interface. KeyStore PrivateKeyStore }
Config contains configurations for a network controller.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller : network interface controller.
func (*Controller) CreateInterface ¶
func (c *Controller) CreateInterface(iface *structs.Interface) error
CreateInterface ...
func (*Controller) DeleteAllInterfaces ¶
func (c *Controller) DeleteAllInterfaces() error
DeleteAllInterfaces deletes all network interfaces and routes.
func (*Controller) DeleteInterfaceByAlias ¶
func (c *Controller) DeleteInterfaceByAlias(s string) error
DeleteInterfaceByAlias deletes a network interface and all associated routes by alias.
func (*Controller) DeleteInterfaceByName ¶
func (c *Controller) DeleteInterfaceByName(s string) error
DeleteInterfaceByName deletes a network interface and all associated routes by name.
func (*Controller) Interfaces ¶
func (c *Controller) Interfaces() ([]*structs.Interface, error)
Interfaces returns a slice of all network interfaces managed by the controller.
func (*Controller) UpdateInterface ¶
func (c *Controller) UpdateInterface(iface *structs.Interface) error
UpdateInterface :
type NetworkInterfaceController ¶
type NetworkInterfaceController interface { Interfaces() ([]*structs.Interface, error) CreateInterface(iface *structs.Interface) error UpdateInterface(iface *structs.Interface) error DeleteInterfaceByAlias(s string) error DeleteInterfaceByName(s string) error DeleteAllInterfaces() error }
NetworkInterfaceController provides network configuration capabilities.
type PrivateKey ¶
type PrivateKeyStore ¶
type PrivateKeyStore interface { KeyByID(id string) (*PrivateKey, error) UpsertKey(key *PrivateKey) error DeleteKey(id string) error }
Click to show internal directories.
Click to hide internal directories.