Documentation
¶
Index ¶
- Variables
- func Restart(process *cmd.Cmd, config, auth, args string, timeout time.Duration) (*cmd.Cmd, <-chan cmd.Status, error)
- func Start(config, auth, args string, timeout time.Duration) (*cmd.Cmd, <-chan cmd.Status, error)
- func Stop(process *cmd.Cmd) (err error)
- type ErrorVpnFailure
- type ErrorVpnTimedOut
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrorConfigNotFound is returned when a specified OpenVPN file is not found. ErrorConfigNotFound = errors.New("specified openvpn config not found") // ErrorNoVpnProcess is returned when a user attempts to stop an OpenVPN instance that // does not exist. ErrorNoVpnProcess = errors.New("no openvpn processes were found") )
Functions ¶
func Restart ¶
func Restart( process *cmd.Cmd, config, auth, args string, timeout time.Duration, ) (*cmd.Cmd, <-chan cmd.Status, error)
Restart is a function which attempts to restart the OpenVPN process with the provided configuration, credentials and arguments.
Types ¶
type ErrorVpnFailure ¶
type ErrorVpnFailure struct {
// contains filtered or unexported fields
}
ErrorVpnFailure is returned when the OpenVPN process fails to start-up.
func (ErrorVpnFailure) Error ¶
func (e ErrorVpnFailure) Error() string
type ErrorVpnTimedOut ¶
type ErrorVpnTimedOut struct{ Msg string }
ErrorVpnTimedOut is returned when the OpenVPN proccess doesn't launch within the specified timeout.
func (ErrorVpnTimedOut) Error ¶
func (e ErrorVpnTimedOut) Error() string
Click to show internal directories.
Click to hide internal directories.