Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrorConfigsNotFound indicates that no openvpn configuration files were found in the specified path. ErrorConfigsNotFound = errors.New("no valid openvpn configuration files were found") // ErrorNoUnusedConfigs indicates that all given configurations have been used previously. ErrorNoUnusedConfigs = errors.New("no unused openvpn configuration files were found") )
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a type that is used to configure and control a instances of OpenVPN.
func NewManager ¶
NewManager returns a configured instance of *Manager.
func (*Manager) Backup ¶
Backup is meant to be used after starting an OpenVPN instance fails. This function attempts to start an instance of OpenVPN and returns the config used to spawn the instance if successful in trying to do so.
func (*Manager) IsConfigUsed ¶
IsConfigUsed returns true if the provided config has been used before.
func (*Manager) Restart ¶
Restart restarts the currently running instance of OpenVPN with the provided config.
Click to show internal directories.
Click to hide internal directories.