Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WGClient ¶
type WGClient interface { io.Closer ConfigureDevice(string, wgtypes.Config) error Device(string) (*wgtypes.Device, error) Devices() ([]*wgtypes.Device, error) }
WGClient represents the wireguard client
type WGServer ¶
type WGServer struct {
// contains filtered or unexported fields
}
WGServer keeps data about wireguard server
func NewWGServer ¶
NewWGServer creates a new instance of WGServer
func (WGServer) ConfigureDevice ¶
ConfigureDevice configures a WireGuard device by its interface name.
If the device specified by name does not exist or is not a WireGuard device, an error is returned which can be checked using `errors.Is(err, os.ErrNotExist)` os.ErrInvalid is returned on invalid input.
Click to show internal directories.
Click to hide internal directories.