Versions in this module Expand all Collapse all v1 v1.0.0 Dec 3, 2026 Changes in this version + const DirEnvVar + func ConfigPath() string + func DetachAttr() *syscall.SysProcAttr + func Dir() string + func IsAlive(pid int) bool + func LogPath() string + func PidPath() string + func ReadPid() (int, error) + func Remove() error + func RemovePid() error + func Save(state State) error + func SendStop(addr string, timeout time.Duration) error + func StatePath() string + func WritePid(pid int) error + type ControlServer struct + func NewControlServer(listener net.Listener, onStatus func() (Snapshot, error), onStop func()) *ControlServer + func (c *ControlServer) Addr() string + func (c *ControlServer) Serve() + type Management struct + func DialManagement(addr string, timeout time.Duration) (*Management, error) + func (m *Management) Close() error + func (m *Management) Disconnect() error + func (m *Management) State() (string, error) + type Snapshot struct + CountryLong string + HostName string + IPAddr string + PID int + StartedAt time.Time + State string + func SendStatus(addr string, timeout time.Duration) (Snapshot, error) + type State struct + ControlAddr string + CountryLong string + HostName string + IPAddr string + OpenVPNPID int + PID int + StartedAt time.Time + func Load() (State, error)