Documentation
¶
Overview ¶
Package daemon provide functions to control execution of deamons
Index ¶
- Constants
- Variables
- func CleanUp() error
- func GetInitType() config.InitType
- func HardRestart() error
- func Install() error
- func IsDaemonProcess() bool
- func MigrateWindowsService() bool
- func RemoveAllLockFiles()
- func RequestInProcessReset() <-chan struct{}
- func Restart() error
- func SetDaemonMode()
- func SetInProcessReset(fn func(done chan struct{}))
- func Start() error
- func Stop() error
Constants ¶
const ExecDir = "/sbin/"
Variables ¶
var (
LogFile = "/var/log/netclient.log"
)
Functions ¶
func GetInitType ¶ added in v0.20.5
func HardRestart ¶ added in v0.20.5
func HardRestart() error
HardRestart - restarts system daemon using init system
func Install ¶
func Install() error
Install - Calls the correct function to install the netclient as a daemon service on the given operating system.
func IsDaemonProcess ¶ added in v1.8.0
func IsDaemonProcess() bool
IsDaemonProcess reports whether this process is the long-running daemon.
func MigrateWindowsService ¶ added in v1.8.0
func MigrateWindowsService() bool
MigrateWindowsService is a no-op outside Windows.
func RemoveAllLockFiles ¶ added in v0.22.0
func RemoveAllLockFiles()
RemoveAllLockFiles - removes all lock files used by netclient
func RequestInProcessReset ¶ added in v1.8.0
func RequestInProcessReset() <-chan struct{}
RequestInProcessReset asks the daemon to rebuild in place and reports when that rebuild has finished. Nil means no daemon is listening.
func SetDaemonMode ¶ added in v1.5.1
func SetDaemonMode()
SetDaemonMode marks the current process as the running daemon.
func SetInProcessReset ¶ added in v1.8.0
func SetInProcessReset(fn func(done chan struct{}))
SetInProcessReset registers the function the daemon uses to rebuild its goroutines without exiting. The callback receives a channel to close when the rebuild has finished. A Windows service restart drops the desktop API.
Types ¶
This section is empty.