Documentation
¶
Overview ¶
Package cmdctrl provides standard startup logic for servers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CurrentProcessControl = ProcessControl(os.Getpid())
Provides ProcessControl for the current process.
Functions ¶
func SimpleStart ¶
func SimpleStart()
Simple Start is a os.Exiting version of the standard startup procedure. This provides simpler semantics and serves as an easy to use API for the standard case by automatically handling flag parsing, stop/restart/kill commands and only returning when the requested command was a "start" command.
Types ¶
type ProcessControl ¶
type ProcessControl int
Provides control over the process identified by the underlying pid.
func (ProcessControl) Kill ¶
func (p ProcessControl) Kill() error
Send a signal to forcefully kill the server dropping all active connections.
func (ProcessControl) Restart ¶
func (p ProcessControl) Restart() error
Send a signal to the process to gracefully restart.
func (ProcessControl) Stop ¶
func (p ProcessControl) Stop() error
Send a signal to the process to gracefully stop.
Click to show internal directories.
Click to hide internal directories.
