Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Daemon ¶
func Daemon(mainFunc func(), onKill func()) (err error)
Daemon make your program ability of 1.daemonize 2.forever 3.logging stdout to file. If you used Daemon, you can run your program with arguments `--daemon` `--forever` `--flog foo.log` optionally. If you want to disable logging, specify the -flog null. mainFunc is your `main`, if onKill not nil, it will be called when one signal of syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT received,
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
Package gdaemon does add daemon, logging and forever function to your program.
|
Package gdaemon does add daemon, logging and forever function to your program. |
Package ghook package does prevent your program main function to exit when all your worker code in goroutine.
|
Package ghook package does prevent your program main function to exit when all your worker code in goroutine. |
Package gprofiling package help you do profiling your program in easy way.
|
Package gprofiling package help you do profiling your program in easy way. |
Click to show internal directories.
Click to hide internal directories.